/* ================================
   RESET & VARIABLES
================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --obsidian:   #0F0E0C;
  --vault:      #1A1916;
  --parchment:  #F2EDE6;
  --ash:        #9C9589;
  --gilt:       #C9A04C;
  --gilt-light: #D4B896;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--obsidian);
  color: var(--parchment);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* ================================
   GRAIN TEXTURE — Film grain overlay
   Animated to simulate organic noise
================================ */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(1) infinite;
}

@keyframes grain {
  0%   { transform: translate(0,    0   ); }
  10%  { transform: translate(-4%,  -8% ); }
  20%  { transform: translate(-12%, 4%  ); }
  30%  { transform: translate(6%,   -20%); }
  40%  { transform: translate(-4%,  22% ); }
  50%  { transform: translate(-14%, 8%  ); }
  60%  { transform: translate(14%,  0%  ); }
  70%  { transform: translate(0%,   14% ); }
  80%  { transform: translate(3%,   30% ); }
  90%  { transform: translate(-8%,  10% ); }
  100% { transform: translate(8%,   8%  ); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

/* ================================
   PAGE LOADER
================================ */
#loader {
  position: fixed;
  inset: 0;
  background: var(--obsidian);
  z-index: 99999;
  pointer-events: none;
}

/* ================================
   CUSTOM CURSOR
================================ */
#cursor {
  width: 10px;
  height: 10px;
  border: 1px solid var(--gilt);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  opacity: 0;
  mix-blend-mode: difference;
}

/* ================================
   NAVIGATION
================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 28px 8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transition: background 0.6s ease, backdrop-filter 0.6s ease;
}

#nav.scrolled {
  background: rgba(15, 14, 12, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-logo {
  font-family: 'Cormorant Display', serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--parchment);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.3s ease, letter-spacing 0.4s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gilt);
  transition: width 0.4s ease;
}

.nav-links a:hover {
  color: var(--parchment);
  letter-spacing: 0.18em;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.nav-cta {
  color: var(--gilt);
  letter-spacing: 0.18em;
}

.nav-links a.nav-cta:hover {
  color: var(--gilt-light);
  letter-spacing: 0.21em;
}

/* ================================
   HERO
================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 8%;
  background: var(--obsidian);
  position: relative;
}

.hero-content {
  max-width: 900px;
  padding-top: 80px;
}

#hero-headline {
  font-family: 'Cormorant Display', serif;
  font-weight: 300;
  font-size: clamp(64px, 10.5vw, 152px);
  line-height: 0.93;
  color: var(--parchment);
  letter-spacing: -0.015em;
  opacity: 0;
}

.letter {
  display: inline-block;
  will-change: transform, opacity;
}

#hero-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.75;
  color: var(--ash);
  margin-top: 52px;
  opacity: 0;
  transform: translateY(20px);
}

.cta-link {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gilt);
  text-decoration: none;
  margin-top: 64px;
  opacity: 0;
  position: relative;
  transition: letter-spacing 0.4s ease, color 0.3s ease;
}

.cta-link:hover {
  letter-spacing: 0.25em;
  color: var(--gilt-light);
}

.cta-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gilt);
  transition: width 0.5s ease;
}

.cta-link:hover::after {
  width: 100%;
}

/* Scroll cue: solid gilt line, pulsing */
.scroll-cue {
  position: absolute;
  bottom: 52px;
  left: 8%;
  width: 1px;
  height: 48px;
  background: var(--gilt);
  opacity: 0.22;
  animation: scrollPulse 2.6s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.12; transform: scaleY(0.85); }
  50%       { opacity: 0.35; transform: scaleY(1);    }
}

/* ================================
   SHARED SECTION STYLES
================================ */
section {
  padding: 140px 8%;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gilt);
  margin-bottom: 48px;
  display: block;
}

.section-title {
  font-family: 'Cormorant Display', serif;
  font-weight: 300;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.04;
  color: var(--parchment);
  margin-bottom: 80px;
}

.gilt-line {
  width: 48px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.35;
  margin-bottom: 52px;
}

.gilt-line-center {
  width: 48px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.35;
  margin: 0 auto 52px;
}

/* Reveal — initial state for generic scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}

/* ================================
   LINE-SPLIT ANIMATION
   Used for headline elements with data-lines attribute.
   Each line slides up from below its container.
================================ */
.line-outer {
  display: block;
  overflow: hidden;
  line-height: inherit;
}

.line-inner {
  display: block;
  transform: translateY(108%);
  will-change: transform;
}

/* ================================
   MANIFESTO
================================ */
#manifesto {
  background: var(--vault);
  position: relative;
  overflow: hidden;
}

/* Ambient glow — subtle radial warmth behind the text */
#manifesto::before {
  content: '';
  position: absolute;
  left: -15%;
  top: 50%;
  transform: translateY(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(201, 160, 76, 0.055) 0%, transparent 65%);
  pointer-events: none;
}

.manifesto-rule {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: none; /* handled by GSAP */
}

.manifesto-headline {
  font-family: 'Cormorant Display', serif;
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.02;
  color: var(--parchment);
  max-width: 700px;
  margin-bottom: 44px;
}

.manifesto-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.85;
  color: var(--parchment);
  max-width: 520px;
  margin-bottom: 20px;
  opacity: 0.9;
}

.manifesto-body:last-of-type {
  margin-bottom: 0;
}

/* ================================
   CLIENTS
================================ */
#clients {
  background: var(--obsidian);
  padding: 80px 8%;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  row-gap: 0;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  opacity: 0.6;
  transition: opacity 0.5s ease;
}

.client-logo:hover {
  opacity: 1;
}

.client-logo img {
  max-width: 180px;
  max-height: 70px;
  width: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(1.2);
  mix-blend-mode: screen;
}

/* Text fallback for clients without logo file */
.client-logo--text {
  font-family: 'Cormorant Display', serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.4;
  color: var(--parchment);
  text-align: center;
  letter-spacing: 0.06em;
  flex-direction: column;
}

.client-logo--text span {
  display: block;
  font-size: 11px;
  color: var(--ash);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ================================
   SERVICES
================================ */
#services {
  background: var(--vault);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px;
}

.service {
  position: relative;
  padding-top: 36px;
}

/* Gilt top-line sweep on hover */
.service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gilt);
  opacity: 0.55;
  transition: width 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.service:hover::before {
  width: 100%;
}

.service h3 {
  font-family: 'Cormorant Display', serif;
  font-weight: 400;
  font-size: clamp(24px, 2vw, 28px);
  color: var(--parchment);
  margin-bottom: 24px;
  line-height: 1.1;
  transition: color 0.3s ease;
}

.service p {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ash);
  margin-bottom: 16px;
  transition: color 0.35s ease;
}

.service p:last-of-type {
  margin-bottom: 36px;
}

.service:hover p {
  color: rgba(156, 149, 137, 0.75);
}

.service-link {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gilt);
  text-decoration: none;
  position: relative;
  transition: letter-spacing 0.4s ease;
}

.service-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gilt);
  transition: width 0.45s ease;
}

.service-link:hover {
  letter-spacing: 0.19em;
}

.service-link:hover::after {
  width: 100%;
}

/* ================================
   WORK
================================ */
#work {
  background: var(--obsidian);
}

.case {
  max-width: 700px;
  padding: 88px 0;
  position: relative;
}

/* Ghost case number — editorial depth */
.case::before {
  content: attr(data-num);
  position: absolute;
  right: -60px;
  top: 60px;
  font-family: 'Cormorant Display', serif;
  font-weight: 300;
  font-size: min(240px, 22vw);
  line-height: 1;
  color: var(--parchment);
  opacity: 0.022;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.case-number {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gilt);
  margin-bottom: 18px;
}

.case-client {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--ash);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.case-title {
  font-family: 'Cormorant Display', serif;
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.04;
  color: var(--parchment);
  margin-bottom: 36px;
}

.case-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.85;
  color: var(--parchment);
  margin-bottom: 20px;
  opacity: 0.88;
}

.case-body:last-of-type {
  margin-bottom: 48px;
}

.case-result {
  font-family: 'Cormorant Display', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  color: var(--gilt);
  opacity: 0;
  transform: translateY(20px);
}

.case-divider {
  width: 100%;
  height: 1px;
  background: var(--gilt);
  opacity: 0.14;
}

/* ================================
   ABOUT
================================ */
#about {
  background: var(--vault);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 120px;
  overflow: hidden;
}

.about-photo-img {
  width: 100%;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.7s ease, transform 0.7s ease;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--vault);
}

.about-photo:hover .about-photo-img {
  filter: grayscale(60%);
}

.about-name {
  font-family: 'Cormorant Display', serif;
  font-weight: 400;
  font-size: clamp(36px, 4vw, 52px);
  color: var(--parchment);
  margin-bottom: 36px;
  line-height: 1;
}

.about-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.85;
  color: var(--parchment);
  margin-bottom: 28px;
  opacity: 0.9;
}

/* ================================
   CONTACT
================================ */
#contact {
  background: var(--obsidian);
  padding: 200px 8% 220px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Ambient glow behind contact headline */
#contact::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(201, 160, 76, 0.04) 0%, transparent 65%);
  pointer-events: none;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.contact-headline {
  font-family: 'Cormorant Display', serif;
  font-weight: 300;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 0.97;
  color: var(--parchment);
  margin-bottom: 56px;
}

.contact-email {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--gilt);
  text-decoration: none;
  position: relative;
  margin-bottom: 18px;
  transition: color 0.3s ease;
  letter-spacing: 0.02em;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gilt);
  transition: width 0.5s ease;
}

.contact-email:hover {
  color: var(--gilt-light);
}

.contact-email:hover::after {
  width: 100%;
}

.contact-note {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--ash);
  margin-top: 18px;
  display: block;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ================================
   FOOTER
================================ */
footer {
  background: var(--vault);
  padding: 44px 8%;
  border-top: 1px solid rgba(201, 160, 76, 0.09);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-name {
  font-family: 'Cormorant Display', serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--parchment);
  letter-spacing: 0.02em;
}

.footer-tagline {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: var(--ash);
  letter-spacing: 0.03em;
}

.footer-right {
  display: flex;
  gap: 36px;
}

.footer-right a {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.3s ease, letter-spacing 0.4s ease;
}

.footer-right a:hover {
  color: var(--parchment);
  letter-spacing: 0.18em;
}

.footer-copy {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--ash);
  opacity: 0.4;
  text-align: center;
  max-width: 1200px;
  margin: 28px auto 0;
  letter-spacing: 0.03em;
}

/* ================================
   RESPONSIVE — TABLET
================================ */
@media (max-width: 1100px) {
  .case::before {
    opacity: 0.015;
    right: -20px;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 52px;
  }

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ================================
   RESPONSIVE — MOBILE
================================ */
@media (max-width: 768px) {
  section {
    padding: 100px 6%;
  }

  #contact {
    padding: 140px 6% 160px;
  }

  #nav {
    padding: 22px 6%;
  }

  .nav-links {
    gap: 22px;
  }

  .nav-links a {
    font-size: 11px;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .about-photo {
    position: static;
  }

  .case::before {
    display: none;
  }

  #manifesto::before {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 0;
  }

  .footer-right {
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    padding-top: 60px;
  }
}
