/* ==========================================================================
   ZANSHIN · DARK STUDIO AESTHETIC
   ========================================================================== */

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  --bg:          #0A0A0C;
  --bg-2:        #0F0F12;
  --surface:     #14141A;
  --surface-2:   #1B1B22;

  --ink:         #F4F3EE;
  --ink-2:       #C9C7BF;
  --ink-muted:   #7E7C72;
  --ink-dim:     #50504A;
  --ink-faint:   #2E2E32;

  --line:        #1F1F26;
  --line-2:      #15151B;

  --accent:      #C7F284;
  --accent-2:    #B6E667;
  --accent-glow: rgba(199, 242, 132, 0.10);

  --max:         1320px;
  --gutter:      clamp(20px, 3.6vw, 40px);
  --header-h:    64px;
  --section-py:  clamp(80px, 11vw, 140px);
  --radius:      8px;
  --radius-lg:   14px;

  --sans:        'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:        ui-monospace, 'SF Mono', SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, monospace;

  --easing:      cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:      160ms;
  --t-med:       260ms;
  --t-slow:      520ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
  position: relative;
  min-width: 320px;
}

/* Subtle film grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--easing), opacity var(--t-fast) var(--easing);
}

::selection { background: var(--accent); color: var(--bg); }

/* Scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  width: 100%;
}

/* ==========================================================================
   TYPOGRAPHY · fluid scales
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 8.6vw, 120px);
  font-weight: 200;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

h2 {
  font-size: clamp(34px, 6vw, 80px);
  font-weight: 200;
  letter-spacing: -0.045em;
  line-height: 1.0;
}

h3 {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h4 {
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p { font-size: 16px; line-height: 1.65; }

.italic { font-style: italic; font-weight: 200; }
.muted { color: var(--ink-muted); }
.dim   { color: var(--ink-dim); }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

.accent-text { color: var(--accent); }

.mono {
  font-family: var(--mono);
  font-size: clamp(10.5px, 0.85vw, 11.5px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  font-feature-settings: 'tnum';
}

.scene-tag {
  display: inline-block;
  color: var(--ink-muted);
  margin-bottom: clamp(20px, 2.4vw, 28px);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.scene-tag.centered { border-bottom: 0; padding-bottom: 0; margin-bottom: 32px; }

/* ==========================================================================
   BRAND
   ========================================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  white-space: nowrap;
}

.brand-word {
  font-family: var(--sans);
  font-size: clamp(20px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand-word.lg { font-size: clamp(24px, 2.4vw, 28px); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.80);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
  gap: 16px;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2.2vw, 28px);
  align-items: center;
}

.site-nav a {
  color: var(--ink-muted);
  position: relative;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -23px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--easing);
}

.site-nav a:hover::after { transform: scaleX(1); }

.site-nav .emphasis { color: var(--ink); }
.site-nav .emphasis:hover { color: var(--accent); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--easing),
              border-color var(--t-fast) var(--easing),
              color var(--t-fast) var(--easing),
              transform var(--t-fast) var(--easing);
}

.btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.btn.ghost:hover {
  border-color: var(--ink-2);
  color: var(--ink);
  background: var(--surface);
}

.arrow {
  display: inline-block;
  transition: transform var(--t-med) var(--easing);
}

.btn:hover .arrow,
.email-link:hover .arrow,
.case-cta:hover .arrow { transform: translateX(5px); }

/* ==========================================================================
   HERO · single-viewport poster, side-by-side composition
   ========================================================================== */
.hero {
  min-height: calc(100svh - var(--header-h));
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-glow {
  position: absolute;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 140%);
  height: 800px;
  background: radial-gradient(circle, rgba(199, 242, 132, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero > .container {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: clamp(36px, 6vw, 64px);
  padding-bottom: clamp(20px, 3vw, 32px);
}

.hero-meta {
  display: inline-block;
  align-self: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  max-width: 100%;
}

.hero-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  padding: clamp(24px, 4vw, 40px) 0;
}

.hero-title {
  font-size: clamp(44px, 8.6vw, 120px);
  letter-spacing: -0.055em;
  max-width: none;
  margin-bottom: 0;
  word-break: break-word;
}

.hero-title .accent-text {
  font-style: italic;
  font-weight: 200;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 32px);
  max-width: 460px;
}

.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero .lede {
  margin-bottom: 0;
  max-width: 44ch;
}

.lede.centered {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   SCENE · shared
   ========================================================================== */
.scene {
  padding: var(--section-py) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.scene:last-of-type { border-bottom: 0; }

.section-sub {
  margin-top: clamp(18px, 2vw, 24px);
  font-size: clamp(15px, 1.4vw, 16px);
  max-width: 32ch;
  line-height: 1.55;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(48px, 7vw, 96px);
  align-items: start;
}

.col-meta { position: sticky; top: 100px; }
.col-meta h2 { margin-top: 12px; }

/* ==========================================================================
   PRACTICE / CREED · list pattern
   ========================================================================== */
.topic-list,
.creed {
  border-top: 1px solid var(--line);
}

.topic-list li,
.creed li {
  display: grid;
  grid-template-columns: clamp(40px, 5vw, 56px) 1fr;
  gap: clamp(18px, 2.5vw, 28px);
  padding: clamp(28px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-med) var(--easing);
}

.topic-list li:last-child,
.creed li:last-child { border-bottom: 0; }

.topic-list li:hover,
.creed li:hover { background: rgba(199, 242, 132, 0.012); }

.topic-num,
.creed-num {
  color: var(--accent);
  font-size: 11px;
  padding-top: 8px;
  letter-spacing: 0.18em;
}

.topic-body h3,
.creed h3 {
  margin-bottom: 10px;
  color: var(--ink);
}

.topic-body p,
.creed p {
  color: var(--ink-muted);
  font-size: clamp(14.5px, 1.4vw, 15.5px);
  line-height: 1.6;
  max-width: 56ch;
}

/* Beliefs section: slightly larger headings to vary rhythm from Practice */
.beliefs .creed h3 {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  letter-spacing: -0.03em;
}

/* ==========================================================================
   03 / OUR PRODUCT · DEVKI
   ========================================================================== */
.work { background: var(--bg-2); }

.work-head {
  margin-bottom: clamp(48px, 6vw, 80px);
  max-width: 760px;
}

.work-h2 {
  font-size: clamp(30px, 4.4vw, 60px);
  letter-spacing: -0.04em;
  font-weight: 200;
  line-height: 1.05;
}

.case {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: clamp(24px, 4vw, 56px);
  position: relative;
  overflow: hidden;
}

.case::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.case-head {
  padding-bottom: clamp(28px, 3vw, 36px);
  margin-bottom: clamp(28px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}

.case-meta {
  display: inline-block;
  color: var(--ink-muted);
  margin-bottom: clamp(18px, 2vw, 24px);
}

.case-name {
  font-family: var(--sans);
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 200;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-bottom: 18px;
  color: var(--ink);
  word-break: break-word;
}

.case-tag {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-2);
  max-width: 56ch;
  line-height: 1.55;
}

.case-prose {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 64ch;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.layers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: clamp(36px, 4vw, 48px);
}

.layer-cell {
  background: var(--bg-2);
  padding: clamp(28px, 3vw, 36px) clamp(22px, 2.5vw, 30px) clamp(32px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--t-med) var(--easing);
}

.layer-cell:hover { background: var(--surface); }

.layer-name {
  font-family: var(--sans);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 200;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ink);
  margin-top: 4px;
  word-break: break-word;
}

.layer-name::first-letter {
  color: var(--accent);
}

.layer-cat {
  color: var(--ink-muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.layer-desc {
  font-size: clamp(14px, 1.3vw, 15px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 38ch;
}

.case-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 12px 0 4px;
  border-bottom: 1px solid var(--ink);
  transition: color var(--t-fast) var(--easing), border-color var(--t-fast) var(--easing);
}

.case-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.work-footnote {
  margin-top: clamp(32px, 4vw, 48px);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* ==========================================================================
   04 / CONTACT
   ========================================================================== */
.contact {
  padding: clamp(120px, 14vw, 180px) 0 clamp(140px, 16vw, 200px);
  text-align: center;
  border-bottom: 0;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  bottom: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 110%);
  height: 600px;
  background: radial-gradient(circle, rgba(199, 242, 132, 0.05), transparent 60%);
  pointer-events: none;
}

.contact-inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contact-title {
  font-size: clamp(48px, 9.6vw, 132px);
  letter-spacing: -0.055em;
  margin: 0 0 clamp(28px, 4vw, 40px);
  line-height: 0.95;
}

.contact .lede {
  margin: 0 auto clamp(36px, 5vw, 56px);
  max-width: 52ch;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: clamp(24px, 4.4vw, 44px);
  font-weight: 300;
  letter-spacing: -0.035em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 10px;
  transition: color var(--t-fast) var(--easing),
              border-color var(--t-fast) var(--easing);
  word-break: break-word;
}

.email-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-coda {
  margin-top: clamp(32px, 4vw, 48px);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 7vw, 80px) 0 32px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(48px, 7vw, 80px);
  border-bottom: 1px solid var(--line);
}

.footer-tag {
  margin-top: 18px;
  font-size: 13.5px;
  max-width: 36ch;
  line-height: 1.55;
  color: var(--ink-2);
}

.col-head {
  color: var(--ink-dim);
  margin-bottom: 18px;
  font-size: 11px;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.footer-col a { color: var(--ink-2); }
.footer-col a:hover { color: var(--accent); }

.footer-base {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  color: var(--ink-muted);
  font-size: 10.5px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ==========================================================================
   1280+   default desktop (no overrides)
   1100    smaller laptops (gentle adjustments)
    960    tablet portrait + collapse 2-col layouts
    768    mobile, header trims, footer single column
    560    small mobile, full-width buttons, padding tightening
    380    very small (iPhone SE width and below)
   ========================================================================== */

@media (max-width: 1280px) {
  /* Slightly tighter two-col on smaller laptops */
  .two-col { gap: clamp(40px, 5vw, 72px); }
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
  }

  .hero-right { max-width: 420px; }

  .two-col {
    grid-template-columns: minmax(240px, 300px) 1fr;
  }
}

@media (max-width: 960px) {
  /* Hero becomes a centered vertical poster — title is the headline moment */
  .hero > .container {
    align-items: center;
    text-align: center;
  }

  .hero-meta { align-self: center; }

  .hero-content {
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vw, 40px);
    align-items: center;
    justify-items: center;
    padding: clamp(40px, 7vw, 64px) 0;
    width: 100%;
  }

  .hero-title {
    font-size: clamp(64px, 13.5vw, 104px);
    letter-spacing: -0.06em;
    max-width: 14ch;
    line-height: 0.94;
  }

  .hero-right {
    max-width: 460px;
    width: 100%;
    align-items: center;
    gap: clamp(20px, 3vw, 28px);
  }

  .hero .lede { max-width: 38ch; }

  .cta-row {
    justify-content: center;
    width: auto;
  }

  /* Other 2-col / 3-col collapses */
  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .col-meta { position: static; }

  .layers-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }

  .nav-row {
    height: 56px;
    gap: 12px;
  }

  /* On mobile only the Contact CTA stays — the rest collapses */
  .site-nav a:not(.emphasis) { display: none; }

  .scene { padding: clamp(72px, 12vw, 96px) 0; }

  .hero { min-height: calc(100svh - 56px); }

  .hero > .container {
    padding-top: clamp(28px, 5vw, 40px);
    padding-bottom: clamp(16px, 3vw, 24px);
  }

  .hero-content {
    padding: clamp(28px, 6vw, 48px) 0;
    gap: clamp(24px, 4vw, 32px);
  }

  .hero-title {
    font-size: clamp(64px, 13vw, 96px);
    letter-spacing: -0.062em;
  }

  .work-head { margin-bottom: clamp(32px, 5vw, 48px); }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 36px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: clamp(60px, 14vw, 84px);
    letter-spacing: -0.064em;
  }

  .hero .lede { max-width: 32ch; }

  .cta-row {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .cta-row .btn { width: 100%; }

  .case-prose,
  .case-tag,
  .layer-desc { max-width: 100%; }
}

@media (max-width: 380px) {
  /* very small phones — final guardrails */
  :root { --gutter: 18px; }

  .brand-word { font-size: 19px; }
  .site-nav { font-size: 10px; gap: 12px; }

  .hero-meta { font-size: 10px; }

  .hero-title {
    font-size: 56px;
    line-height: 0.94;
    letter-spacing: -0.066em;
  }

  .case-name { font-size: 48px; }
  .contact-title { font-size: 52px; }
  .email-link { font-size: 24px; }

  .layer-cell { padding: 24px 20px 28px; }

  .case { padding: 22px 18px; }
}

/* Short viewports, e.g. landscape phones — trim hero padding so it still fits */
@media (max-height: 620px) and (orientation: landscape) {
  .hero > .container {
    padding-top: 20px;
    padding-bottom: 16px;
  }
  .hero-content { padding: 16px 0; gap: 28px; }
  .hero-title { font-size: clamp(40px, 6.5vw, 72px); }
}

/* ==========================================================================
   ENTRANCE ANIMATION
   ========================================================================== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-meta,
.hero-title,
.hero .lede,
.cta-row {
  opacity: 0;
  animation: fade-up 720ms var(--easing) forwards;
}

.hero-meta   { animation-delay:  60ms; }
.hero-title  { animation-delay: 160ms; }
.hero .lede  { animation-delay: 280ms; }
.cta-row     { animation-delay: 380ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
  .hero-meta, .hero-title, .hero .lede, .cta-row {
    opacity: 1;
  }
}
