/* ==========================================================================
   TOKENS
   ========================================================================== */
:root{
  --bg-deep:   #1B0509;
  --bg-mid:    #2A0C10;
  --bg-card:   #34121A;
  --bg-card-2: #3E1620;

  --gold-light:#F2D98A;
  --gold:      #C9A24B;
  --gold-deep: #8A6A2E;

  --cream:     #F4EBE1;
  --muted:     #C0A697;
  --muted-2:   #8C7368;

  --hairline:  rgba(201,162,75,0.22);

  --font-display: 'Fraunces', serif;
  --font-script:  'Instrument Serif', serif;
  --font-body:    'Manrope', sans-serif;

  --ease: cubic-bezier(.22,.68,.16,1);
  --container: 1180px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }

body{
  background:var(--bg-deep);
  color:var(--cream);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

.section-inner{
  max-width:var(--container);
  margin:0 auto;
  padding:0 6vw;
}

/* film grain overlay for texture, matches the pressed-paper feel of the logo */
.grain{
  position:fixed; inset:0; z-index:999; pointer-events:none;
  opacity:.05; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   CURSOR (desktop)
   ========================================================================== */
.cursor-dot,.cursor-ring{
  position:fixed; top:0; left:0; pointer-events:none; z-index:998;
  border-radius:50%; transform:translate(-50%,-50%);
  transition:opacity .3s ease;
}
.cursor-dot{ width:6px; height:6px; background:var(--gold-light); }
.cursor-ring{ width:34px; height:34px; border:1px solid var(--gold-deep); transition:transform .18s var(--ease), opacity .3s ease; }
@media (hover:none), (pointer:coarse){
  .cursor-dot,.cursor-ring{ display:none; }
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader{
  position:fixed; inset:0; z-index:1000;
  background:var(--bg-deep);
  display:flex; align-items:center; justify-content:center;
  transition:opacity .8s var(--ease), visibility .8s var(--ease);
}
.preloader-mark{
  width:64px; height:64px; object-fit:cover; border-radius:14px;
  animation:pulseMark 1.4s ease-in-out infinite;
}
.preloader.done{ opacity:0; visibility:hidden; }
@keyframes pulseMark{
  0%,100%{ opacity:.4; transform:scale(.94); }
  50%{ opacity:1; transform:scale(1); }
}

/* ==========================================================================
   REVEAL ANIMATION UTILITIES (driven by JS toggling .is-visible)
   ========================================================================== */
.reveal-up{
  opacity:0; transform:translateY(28px);
  transition:opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay:var(--d,0s);
}
.reveal-up.is-visible{ opacity:1; transform:translateY(0); }

.reveal-scale{
  opacity:0; transform:scale(.94);
  transition:opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal-scale.is-visible{ opacity:1; transform:scale(1); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav{
  position:fixed; top:0; left:0; right:0; z-index:200;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 5vw;
  background:linear-gradient(to bottom, rgba(27,5,9,.85), rgba(27,5,9,0));
  backdrop-filter:blur(2px);
}
.nav-mark img{ width:34px; height:34px; object-fit:cover; border-radius:7px; box-shadow:0 2px 10px rgba(0,0,0,.35); }
.nav-links{ display:flex; gap:36px; }
.nav-links a{
  font-size:14px; letter-spacing:.02em; color:var(--muted);
  position:relative; padding-bottom:4px;
  transition:color .3s ease;
}
.nav-links a::after{
  content:''; position:absolute; left:0; bottom:0; width:0; height:1px;
  background:var(--gold); transition:width .35s var(--ease);
}
.nav-links a:hover{ color:var(--cream); }
.nav-links a:hover::after{ width:100%; }

.nav-cta{
  font-size:13px; font-weight:600; letter-spacing:.02em;
  border:1px solid var(--gold-deep); color:var(--gold-light);
  padding:9px 20px; border-radius:100px;
  transition:background .35s ease, color .35s ease, border-color .35s ease;
}
.nav-cta:hover{ background:var(--gold); color:var(--bg-deep); border-color:var(--gold); }

.nav-burger{ display:none; }

@media (max-width: 860px){
  .nav-links{ display:none; }
  .nav-cta{ display:none; }
  .nav-burger{
    display:flex; flex-direction:column; gap:5px; justify-content:center;
    width:34px; height:24px; background:none; border:none; cursor:pointer;
    position:relative; z-index:201;
  }
  .nav-burger span{ height:1px; width:100%; background:var(--gold-light); transition:transform .35s var(--ease), opacity .3s ease; }
  .nav-burger.active span:first-child{ transform:translateY(3px) rotate(45deg); }
  .nav-burger.active span:last-child{ transform:translateY(-3px) rotate(-45deg); }
}

.mobile-menu{
  position:fixed; inset:0; z-index:199;
  background:var(--bg-deep);
  display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:26px;
  padding:6vw 8vw;
  transform:translateY(-100%);
  transition:transform .5s var(--ease);
}
.mobile-menu.open{ transform:translateY(0); }
.mobile-menu a{ font-family:var(--font-display); font-size:32px; color:var(--cream); }
.mobile-cta{
  margin-top:12px; font-family:var(--font-body) !important; font-size:15px !important;
  border:1px solid var(--gold); color:var(--gold-light); padding:12px 24px; border-radius:100px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position:relative; min-height:100vh; min-height:100svh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:120px 6vw 60px;
  overflow:hidden;
}
.hero-bg{ position:absolute; inset:0; z-index:0; }
.hero-bg::before{
  content:''; position:absolute; inset:0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 18%, rgba(140,60,50,.35), transparent 60%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 70%);
}
.hero-glow{
  position:absolute; top:38%; left:50%; width:640px; height:640px;
  transform:translate(-50%,-50%);
  background:radial-gradient(circle, rgba(201,162,75,.16) 0%, transparent 70%);
}
.hero-flourish{
  position:absolute; bottom:-40px; right:-60px; width:420px; opacity:.5;
}
.hero-flourish path{
  stroke-dasharray:900; stroke-dashoffset:900;
  animation:drawFlourish 2.6s var(--ease) .6s forwards;
}
@keyframes drawFlourish{ to{ stroke-dashoffset:0; } }

.hero-inner{ position:relative; z-index:1; max-width:760px; }

.eyebrow{
  font-family:var(--font-body); font-size:12px; font-weight:700;
  letter-spacing:.24em; text-transform:uppercase; color:var(--gold);
  margin-bottom:18px;
}

.hero-mark{ width:88px; margin:0 auto 22px; }
.hero-mark img{
  width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:16px;
  border:1px solid rgba(242,217,138,.35);
  box-shadow:0 10px 30px rgba(0,0,0,.5), 0 0 40px rgba(201,162,75,.12);
}

.hero-title{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(52px, 10vw, 108px); line-height:.98; letter-spacing:-.01em;
  color:var(--cream);
  display:flex; flex-direction:column; align-items:center; gap:0;
}
.hero-title-italic{
  font-style:italic; font-weight:400;
  background:linear-gradient(100deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

.hero-sub{
  margin:26px auto 0; max-width:520px;
  font-size:17px; color:var(--muted); line-height:1.7;
}

.hero-actions{ margin-top:38px; display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }

.scroll-cue{
  position:absolute; bottom:34px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:10px;
  z-index:1;
}
.scroll-cue span{ font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted-2); }
.scroll-line{ width:1px; height:44px; background:rgba(201,162,75,.2); overflow:hidden; }
.scroll-line i{ display:block; width:100%; height:16px; background:var(--gold); animation:scrollDown 1.8s ease-in-out infinite; }
@keyframes scrollDown{
  0%{ transform:translateY(-16px); }
  100%{ transform:translateY(44px); }
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee{
  border-top:1px solid var(--hairline); border-bottom:1px solid var(--hairline);
  background:var(--bg-mid); overflow:hidden; padding:16px 0;
}
.marquee-track{
  display:flex; align-items:center; gap:18px; white-space:nowrap; width:max-content;
  animation:marqueeScroll 34s linear infinite;
  font-family:var(--font-display); font-style:italic; font-size:17px; color:var(--muted);
}
.marquee-track .dot{ color:var(--gold-deep); font-style:normal; }
.marquee:hover .marquee-track{ animation-play-state:paused; }
@keyframes marqueeScroll{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }
}
@media (prefers-reduced-motion: reduce){
  .marquee-track{ animation:none; }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:15px 30px; border-radius:100px; font-size:14.5px; font-weight:600;
  letter-spacing:.01em; transition:transform .4s var(--ease), background .35s ease, color .35s ease, border-color .35s ease, box-shadow .4s ease;
  white-space:nowrap;
}
.btn-gold{
  background:linear-gradient(100deg, var(--gold-light), var(--gold));
  color:#241009; box-shadow:0 8px 24px rgba(201,162,75,.18);
}
.btn-gold:hover{ transform:translateY(-2px); box-shadow:0 12px 30px rgba(201,162,75,.3); }
.btn-ghost{
  border:1px solid rgba(244,235,225,.28); color:var(--cream);
}
.btn-ghost:hover{ border-color:var(--gold); color:var(--gold-light); transform:translateY(-2px); }
.btn-lg{ padding:18px 34px; font-size:15px; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about{ padding:180px 0 140px; position:relative; }
.about-grid{ max-width:940px; }
.about-statement{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(28px, 4vw, 44px); line-height:1.28; letter-spacing:-.01em;
  color:var(--cream); margin:8px 0 52px;
}
.about-statement em{
  font-style:italic; color:var(--gold-light);
}
.about-details{
  display:grid; grid-template-columns:.95fr 1.05fr; gap:60px;
  align-items:start;
  padding-top:44px; border-top:1px solid var(--hairline);
}
.about-copy p{ color:var(--muted); font-size:16px; margin-bottom:34px; }
.about-stats{ display:flex; flex-direction:column; gap:26px; }
.stat{ display:flex; flex-direction:column; gap:6px; }
.stat-num{ font-family:var(--font-script); font-style:italic; font-size:28px; color:var(--gold-light); }
.stat-label{ font-size:13.5px; color:var(--muted-2); }

/* -------- Terminal (signature "typing code" element) -------- */
.terminal{
  background:#120306; border:1px solid var(--hairline); border-radius:16px;
  overflow:hidden; box-shadow:0 30px 70px rgba(0,0,0,.5);
}
.terminal-head{
  display:flex; align-items:center; gap:8px;
  padding:14px 18px; background:#1B0709; border-bottom:1px solid var(--hairline);
}
.terminal-head .dot{ width:10px; height:10px; border-radius:50%; }
.terminal-head .dot.r{ background:#E5665A; }
.terminal-head .dot.y{ background:#E8B85C; }
.terminal-head .dot.g{ background:#7FBF7A; }
.terminal-title{ margin-left:10px; font-family:var(--font-body); font-size:12px; color:var(--muted-2); letter-spacing:.02em; }
.terminal-body{
  margin:0; padding:24px 22px 28px; min-height:290px;
  font-family:'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px; line-height:1.9; color:#E7D9C8;
  white-space:pre-wrap; word-break:break-word;
}
.terminal-body .tok-comment{ color:var(--muted-2); }
.terminal-body .tok-ok{ color:#8FCB86; }
.caret{
  display:inline-block; width:7px; height:15px; margin-left:2px;
  background:var(--gold-light); vertical-align:middle;
  animation:caretBlink 1s step-end infinite;
}
@keyframes caretBlink{ 50%{ opacity:0; } }

@media (max-width:760px){
  .about{ padding:120px 0 90px; }
  .about-details{ grid-template-columns:1fr; gap:36px; }
  .terminal-body{ min-height:0; font-size:12.5px; }
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services{ padding:0 0 150px; }
.section-title{
  font-family:var(--font-display); font-weight:400;
  font-size:clamp(34px,5vw,56px); letter-spacing:-.01em; color:var(--cream);
  margin-bottom:56px;
}
.service-list{ display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--hairline); border:1px solid var(--hairline); border-radius:18px; overflow:hidden; }
.service{
  background:var(--bg-mid); padding:44px 40px; transition:background .4s ease;
}
.service:hover{ background:var(--bg-card); }
.service-head{ display:flex; align-items:baseline; gap:14px; margin-bottom:16px; flex-wrap:wrap; }
.service-head h3{ font-family:var(--font-display); font-size:26px; font-weight:400; color:var(--cream); }
.service-tag{ font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--gold); border:1px solid var(--gold-deep); padding:4px 10px; border-radius:100px; }
.service p{ color:var(--muted); font-size:15px; }

@media (max-width:760px){
  .service-list{ grid-template-columns:1fr; }
  .services{ padding-bottom:100px; }
}

/* ==========================================================================
   WORK / CASE STUDY
   ========================================================================== */
.work{ padding-bottom:150px; position:relative; }

.case-intro{
  display:grid; grid-template-columns:1fr .8fr; gap:70px; align-items:start;
  margin-bottom:80px;
}
.case-badge{
  display:inline-block; font-size:11.5px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--gold); border:1px solid var(--gold-deep); padding:5px 12px; border-radius:100px;
  margin-bottom:16px;
}
.case-title{ font-family:var(--font-display); font-size:clamp(38px,6vw,64px); font-weight:400; color:var(--gold-light); }
.case-kicker{ font-size:14px; color:var(--muted-2); margin-top:6px; margin-bottom:26px; }
.case-text{ color:var(--muted); font-size:15.5px; margin-bottom:18px; }
.case-highlight{
  color:var(--cream); padding:18px 20px; border-left:2px solid var(--gold);
  background:rgba(201,162,75,.06); border-radius:0 10px 10px 0;
}
.case-features{ margin-top:28px; display:flex; flex-direction:column; gap:10px; }
.case-features li{
  font-size:14px; color:var(--muted); padding-left:22px; position:relative;
}
.case-features li::before{
  content:''; position:absolute; left:0; top:8px; width:10px; height:1px; background:var(--gold);
}
.case-hero-shot{
  border-radius:20px; overflow:hidden; border:1px solid var(--hairline);
  box-shadow:0 30px 60px rgba(0,0,0,.45);
  max-width:320px; justify-self:end;
}

.case + .case{
  margin-top:100px; padding-top:100px; border-top:1px solid var(--hairline);
}
.case-alt .case-intro{ grid-template-columns:.8fr 1fr; }
.case-alt .case-info{ order:2; }
.case-alt .case-hero-shot{ order:1; justify-self:start; }

@media (max-width:860px){
  .case-intro{ grid-template-columns:1fr; gap:40px; }
  .case-hero-shot{ max-width:220px; justify-self:start; }
  .case-alt .case-info{ order:1; }
  .case-alt .case-hero-shot{ order:2; }
  .case + .case{ margin-top:70px; padding-top:70px; }
}
.case-gallery{
  display:flex; gap:26px; padding:0 6vw;
  overflow-x:auto; scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}
.case-gallery::-webkit-scrollbar{ display:none; }
.frame{
  flex:0 0 auto; width:230px; scroll-snap-align:start;
  border-radius:16px; overflow:hidden; border:1px solid var(--hairline);
  background:var(--bg-mid); box-shadow:0 20px 40px rgba(0,0,0,.35);
  transition:transform .5s var(--ease);
}
.frame:hover{ transform:translateY(-8px); }
.frame img{ width:100%; display:block; }
.frame figcaption{
  padding:12px 16px; font-size:12.5px; color:var(--muted-2); letter-spacing:.02em;
  border-top:1px solid var(--hairline);
}

.case-testimonial{
  max-width:640px; text-align:center; margin:20px auto 60px; padding-top:20px;
}
.quote-mark{ font-family:var(--font-script); font-style:italic; font-size:64px; color:var(--gold-deep); line-height:.5; display:block; margin-bottom:10px; }
.case-testimonial p{ font-family:var(--font-display); font-size:22px; font-style:italic; color:var(--cream); line-height:1.5; }
.quote-source{ display:block; margin-top:16px; font-size:12.5px; color:var(--muted-2); letter-spacing:.05em; }

.case-more{ text-align:center; color:var(--muted-2); font-size:13.5px; letter-spacing:.03em; margin-top:60px; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact{
  position:relative; padding:160px 0 140px; text-align:center; overflow:hidden;
  background:linear-gradient(180deg, var(--bg-deep), var(--bg-mid) 60%, var(--bg-deep));
}
.contact-flourish{
  position:absolute; top:-60px; left:50%; transform:translateX(-50%) rotate(180deg);
  width:520px; opacity:.35; pointer-events:none;
}
.contact-inner{ position:relative; z-index:1; max-width:640px; }
.contact-title{
  font-family:var(--font-display); font-weight:400; font-style:italic;
  font-size:clamp(38px,6vw,64px); color:var(--gold-light); margin-bottom:20px;
}
.contact-sub{ color:var(--muted); font-size:16px; margin-bottom:40px; }
.contact-actions{ display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer{
  padding:50px 6vw 40px; display:flex; align-items:center; justify-content:center;
  flex-direction:column; gap:14px; border-top:1px solid var(--hairline);
  text-align:center;
}
.footer-mark{ width:28px; height:28px; object-fit:cover; border-radius:6px; opacity:.85; }
.footer p{ font-size:12.5px; color:var(--muted-2); }
.footer-links{ display:flex; gap:20px; }
.footer-links a{ font-size:12.5px; color:var(--muted); transition:color .3s ease; }
.footer-links a:hover{ color:var(--gold-light); }

/* ==========================================================================
   RESPONSIVE FINE-TUNING
   ========================================================================== */
@media (max-width:480px){
  .hero{ padding-top:110px; }
  .hero-actions{ flex-direction:column; width:100%; }
  .hero-actions .btn{ width:100%; }
  .contact-actions{ flex-direction:column; width:100%; }
  .contact-actions .btn{ width:100%; }
  .case-testimonial p{ font-size:19px; }
  .frame{ width:190px; }
}

