/* =========================
   KRE8IVZ STUDIO – MASTER STYLESHEET (FINAL FIXED)
   ========================= */

/* Importing LATO Font */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

:root {
  --black: #000000;
  --white: #F9F9F9;
  --orange: #E85002;      /* Your Brand Orange */
  --orange-dark: #C94300;
  --dark-grey: #333333;   /* Your Brand Dark Grey */
  --light-grey: #A7A7A7;  /* Your Brand Light Grey */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  font-weight: 300;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* =========================
   UTILITIES
   ========================= */

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 80px 0;
  animation: fadeUp 0.8s ease forwards;
}

/* Utility to kill padding if needed via HTML classes */
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--orange);
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
}

.btn:hover {
  background: var(--orange);
  color: var(--black);
}

/* =========================
   HEADER / NAV
   ========================= */

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 32px;
  width: auto;
  display: block;
}

/* HIDE HAMBURGER ON DESKTOP */
.hamburger {
  display: none;
}

.nav-links a {
  margin-left: 32px;
  text-decoration: none;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-label { display: none; }

/* =========================
   HERO SECTIONS (FIXED)
   ========================= */

/* 1. Global/Home Hero */
.hero {
  min-height: auto; /* Stop stretching */
  display: flex;
  align-items: center;
  /* Top: 150px (clear header), Bottom: 50px (Tight) */
  padding: 150px 0 50px; 
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
  max-width: 900px;
}

.hero h1 span { color: var(--orange); }

.hero p {
  max-width: 520px;
  color: var(--light-grey);
  font-size: 16px;
  margin-bottom: 40px;
}

/* Orange Glow (Home) */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 80, 2, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* 2. Compact Hero (Services/About/Work/Contact) */
.about-hero {
  padding: 180px 0 60px;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 80, 2, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.about-hero h1 {
  font-size: 46px;
  font-weight: 700;
  margin-bottom: 20px;
}

.about-hero h1 span { color: var(--orange); }

.about-hero p {
  max-width: 580px;
  font-size: 15px;
  color: var(--light-grey);
}

/* =========================
   CONTACT PAGE
   ========================= */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: flex-start;
}

.contact-info {
  padding-top: 20px;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--white);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--light-grey);
  font-size: 16px;
  transition: all 0.3s ease;
  padding: 15px 20px;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.contact-link:hover {
  border-color: var(--orange);
  background: rgba(232, 80, 2, 0.05);
  color: var(--white);
  transform: translateX(5px);
}

.icon-box {
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-box svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

/* FORM STYLING */
.contact-form {
  background: #0a0a0a;
  padding: 40px;
  border: 1px solid #1f1f1f;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--light-grey);
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.form-input, .form-textarea {
  width: 100%;
  background: #111 !important;
  border: 1px solid #222 !important;
  padding: 16px;
  color: #fff !important;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  transition: 0.3s ease;
  outline: none;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--orange) !important;
  background: #161616 !important;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* =========================
   SERVICES: ICON CARDS
   ========================= */

.service-box-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.service-box {
  background: linear-gradient(145deg, #0f0f0f, #050505);
  border: 1px solid #1f1f1f;
  padding: 40px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-box:hover {
  border-color: var(--orange);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(232, 80, 2, 0.1);
}

.service-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 24px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-box h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #fff;
}

.service-box p {
  color: var(--light-grey);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-tag {
  font-size: 12px;
  background: rgba(255,255,255,0.05);
  padding: 6px 12px;
  border-radius: 4px;
  color: #bbb;
  border: 1px solid transparent;
}

.service-box:hover .service-tag {
  border-color: rgba(232, 80, 2, 0.3);
  color: #fff;
}

/* Services: Process Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

/* Services: List (Home) */
.section-label {
  font-size: 12px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: block;
  font-weight: 700;
}

.services-list {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

.service-item {
  border-top: 1px solid #1a1a1a;
  padding: 40px 0;
  transition: all 0.4s ease;
  cursor: default;
}

.service-item:last-child {
  border-bottom: 1px solid #1a1a1a;
}

.service-item h3 {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--white);
  transition: color 0.3s ease;
}

.service-item p {
  font-size: 15px;
  color: var(--light-grey);
  max-width: 500px;
}

.service-item:hover {
  padding-left: 20px;
  border-color: #333;
}

.service-item:hover h3 {
  color: var(--orange);
}

/* =========================
   WORK GRID
   ========================= */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 20px;
}

.work-card {
  display: block;
  text-decoration: none;
  border: 1px solid #161616;
  padding: 25px;
  background: #0d0d0d;
  color: var(--white);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  border-color: var(--orange);
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(232, 80, 2, 0.12);
}

.work-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #161616;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.9);
  transition: transform 0.4s ease, filter 0.3s ease;
}

.work-card:hover .work-image img {
  transform: scale(1.06);
  filter: brightness(1);
}

.work-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--white);
  transition: color 0.3s ease;
}

.work-card:hover h3 { color: var(--orange-dark); }

.work-card p {
  color: var(--light-grey);
  font-size: 13px;
}

.back-link {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 14px;
  color: var(--light-grey);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link:hover { color: var(--orange); }

/* =========================
   ABOUT CONTENT & FOUNDER
   ========================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1150px;
  margin: 0 auto;
}

.about-card {
  padding: 28px;
  border: 1px solid #1c1c1c;
  background: rgba(255,255,255,0.01);
  transition: 0.3s ease;
}

.about-card:hover { border-color: var(--orange); }
.about-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.about-card p { font-size: 14px; line-height: 1.7; color: var(--light-grey); }

/* FOUNDER CONTAINER */
.founder-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px; 
  max-width: 1150px;
  margin: 0 auto; 
  padding: 0 5%; 
}

.founder-text { flex: 1; max-width: 520px; }
.founder-text h2 { font-size: 34px; margin-bottom: 24px; }
.founder-text p { font-size: 14px; line-height: 1.75; margin-bottom: 16px; color: var(--light-grey); }
.founder-text strong { color: var(--white); }
.founder-image { flex: 1; display: flex; justify-content: flex-end; }
.founder-image img { width: 100%; max-width: 420px; border-radius: 10px; }

/* =========================
   CASE STUDY / PROJECT PAGE
   ========================= */

.case-hero {
  padding: 180px 0 80px;
  border-bottom: 1px solid #1a1a1a;
}

.case-title {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 20px;
  line-height: 1.1;
}

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #1a1a1a;
}

.meta-item h4 {
  font-size: 12px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.meta-item p {
  color: var(--white);
  font-size: 16px;
}

.case-main-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin: 60px 0;
  border: 1px solid #1a1a1a;
}

.case-content {
  max-width: 800px;
  margin: 0 auto 80px;
}

.case-content h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--white);
}

.case-content p {
  color: var(--light-grey);
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.case-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 100px;
}

.case-gallery img {
  width: 100%;
  height: auto;
  border: 1px solid #1a1a1a;
  transition: 0.3s ease;
}

.case-gallery img:hover {
  transform: scale(1.02);
  border-color: var(--orange);
}

.next-project {
  padding: 100px 0;
  text-align: center;
  background: #0d0d0d;
  border-top: 1px solid #1a1a1a;
}

.next-project h3 {
  font-size: 14px;
  color: var(--orange);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.next-project a {
  font-size: 48px;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  transition: 0.3s ease;
}

.next-project a:hover {
  color: var(--light-grey);
}

/* =========================
   CLIENTS & FOOTER
   ========================= */
.clients-section { background: var(--dark-grey); padding: 100px 0; overflow: hidden; }
.clients-title { color: var(--white); font-size: 28px; margin-bottom: 60px; }
.clients-marquee { overflow: hidden; position: relative; }
.clients-track { display: flex; align-items: center; gap: 120px; width: max-content; animation: scrollClients 80s linear infinite; will-change: transform; }
@keyframes scrollClients { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.cta { text-align: center; padding: 100px 8%; border-top: 1px solid var(--dark-grey); background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0)); }
.cta h2 { font-size: 36px; margin-bottom: 20px; }
.cta h2 span { color: var(--orange); }

footer { padding: 60px 0; border-top: 1px solid var(--dark-grey); text-align: center; font-size: 12px; color: var(--light-grey); }
.footer-socials { display: flex; gap: 20px; justify-content: center; align-items: center; margin-top: 14px; }
.footer-socials a { width: 20px; height: 20px; opacity: 0.7; transition: 0.3s ease; }
.footer-socials a:hover { opacity: 1; }
.footer-socials svg { fill: var(--light-grey); width: 100%; height: 100%; }
.footer-socials a:hover svg { fill: var(--orange); }

#backToTop { position: fixed; bottom: 30px; right: 30px; background: var(--orange); color: var(--black); border: none; width: 40px; height: 40px; font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: 0.3s ease; }
#backToTop.show { opacity: 1; pointer-events: auto; }
#backToTop:hover { transform: translateY(-4px); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================================
   MASTER MOBILE FIXES (ALL RESPONSIVE CODE HERE AT BOTTOM)
   ========================================================= */

@media (max-width: 992px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .service-box-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  
  /* FOUNDER MOBILE */
  .founder-container {
    flex-direction: column-reverse; /* Image on top */
    gap: 30px; /* Reduced gap */
    margin: 40px auto;
    text-align: center;
  }
  .founder-image { justify-content: center; }
  .founder-text { text-align: left; }
}

@media (max-width: 768px) {

  /* 1. Nav - Fixed Hamburger */
  .hamburger { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1200; position: relative; }
  .hamburger span { width: 24px; height: 2px; background: #fff; transition: all 0.35s ease; }
  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translateY(8px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translateY(-8px); }
  
  .nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: 0.3s; z-index: 1000; }
  .nav-overlay.active { opacity: 1; pointer-events: auto; }

  .nav-links {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 70%;
    background: #0a0a0a; display: flex; flex-direction: column; align-items: flex-start;
    padding: 35px 40px; gap: 30px; transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1100; border-left: 1px solid #151515; box-shadow: -12px 0 40px rgba(0,0,0,0.6);
  }
  .nav-links.active { right: 0; }
  .nav-links .nav-label { display: block; font-size: 12px; letter-spacing: 2px; color: var(--light-grey); text-transform: uppercase; margin-bottom: 10px; }
  .nav-links a { font-size: 18px; margin-left: 0; margin-bottom: 15px; display: inline-block; }
  .nav-links a:hover, .nav-links a:active { color: var(--orange); transform: translateX(10px); }

  /* 2. Contact Page */
  .contact-form { padding: 25px; }
  .form-input, .form-textarea { font-size: 16px; }

  /* 3. Work Grid */
  .work-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .work-card { padding: 12px !important; min-height: auto; }
  .work-card h3 { font-size: 13px !important; margin-bottom: 4px; }
  .work-card p { font-size: 10px !important; line-height: 1.2; opacity: 0.8; }
  .work-image { padding: 15px !important; margin-bottom: 12px !important; }

  /* 4. General (HERO MOBILE FIX) */
  .hero { 
    padding: 120px 0 30px; /* Reduced bottom padding to 30px */
    height: auto; 
    min-height: auto; /* Kills the 90vh stretching on tall phones */
  }
  .hero h1 { font-size: 34px; line-height: 1.2; }
  .section h2 { font-size: 28px; }
  .clients-title { text-align: center !important; }
  .clients-marquee h2 { font-size: 20px !important; margin: 0 15px !important; }
  
  /* 5. About & Services (FIXED MOBILE PADDING) */
  .about-hero { padding: 120px 0 40px; } 
  .about-hero h1 { font-size: 36px; }
  .about-grid { grid-template-columns: 1fr; }
  .founder-container { flex-direction: column; gap: 30px; }
  .founder-text { text-align: left; }
  .service-box-grid { grid-template-columns: 1fr; }
  
  .section .container > div[style*="display: flex"] {
    flex-direction: column !important; align-items: flex-start !important; gap: 10px; margin-bottom: 20px !important;
  }

  /* 6. Case Study Mobile */
  .case-meta-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .case-gallery { grid-template-columns: 1fr; }
  .next-project a { font-size: 32px; }
}