/* TriuneDigi — everything Tailwind utilities don't cover: tokens, components, motion states. */

/* One variable file for the whole site. Plus Jakarta Sans is variable across
   200-800, so the four weights the design uses all come out of these 27 KB.
   Latin subset only: it carries U+0000-00FF and U+2000-206F, which covers the
   middot, the en and em dashes and the arrows the page actually prints.
   font-display: swap, so text is readable before the file lands. */
/* The display face. Bricolage Grotesque is variable 400-800, so one 77 KB
   file covers every heading weight. It is the reason the page stops looking
   like every other template: Plus Jakarta is clean but has no voice. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Palette K, from the Color Hunt popular feed (FEF3E2 F4AE52 D4621A 2A1A0E),
     with two additions the original four could not cover: a muted brown for
     captions and a darker burnt orange for links.
     Measured, not guessed:
       ink #2A1A0E on cream      15.27:1  AAA  body
       ink on white card         16.37:1  AAA
       muted #6B5341 on cream     6.51:1  AA   captions
       links #A84A10 on cream     5.24:1  AA
       ink on amber #F4AE52       8.80:1  AA   the button
       cream on ink              15.27:1  AAA  the button, hovered
       ink on sand #FBE3C4       13.48:1  AAA  the calm band
     Burnt orange #D4621A is a FILL ONLY: ink on it is 4.44:1, which clears the
     3:1 bar for a graphic but not the 4.5:1 one for a label. Nothing with text
     in it is ever burnt orange. */
  --color-base: #FEF3E2;          /* cream - the page */
  --color-surface: #FFFCF6;
  --color-surface-2: #FBE3C4;     /* sand - the calm band */
  --color-text: #2A1A0E;          /* coffee */
  --color-text-muted: #6B5341;
  --color-accent: #A84A10;        /* links, eyebrows, focus */
  --color-accent-hover: #8A3A0C;
  --color-accent-light: #FBE3C4;
  --color-border: rgba(42, 26, 14, 0.14);
  --color-border-strong: rgba(42, 26, 14, 0.28);

  --amber: #F4AE52;               /* the button */
  --burnt: #D4621A;               /* fill only, never behind text */
  --sand: #FBE3C4;
  /* kept under their old names so existing rules keep working */
  --peri: #F4AE52;
  --coral: #D4621A;
  --mint: #FBE3C4;
  --sky: #F4AE52;
  --mist: #FBE3C4;
  --steel: #C9A078;
  --butter: #F8E8CF;
  --cream: #F6D9B0;

  --text-hero: clamp(33px, 4.6vw, 54px);
  --text-display: clamp(27px, 3.4vw, 36px);
  --text-heading: clamp(21px, 2.6vw, 28px);
  --text-body: 17px;
  --text-small: 14px;
  --text-label: 11px;

  /* One family. Playfair Display and JetBrains Mono are off the site. */
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Lenis (recommended base rules) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped, html.menu-open { overflow: hidden; }

body { background: var(--color-base); color: var(--color-text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--amber); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ── Type ── */
.t-hero, .t-display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.028em; text-wrap: balance; }
.t-hero { font-size: var(--text-hero); line-height: 1.1; }
.t-display { font-size: var(--text-display); line-height: 1.12; }
.label { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: var(--text-label); font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--color-accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 100px; border: 1.5px solid transparent;
  font-size: 15px; font-weight: 500; line-height: 1.2; cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.22s var(--ease);
}
.btn-primary { background: var(--amber); color: var(--color-text); }
.btn-primary:hover { background: var(--color-text); color: var(--color-base); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { border-color: var(--color-border-strong); color: var(--color-text); background: transparent; }
.btn-ghost:hover { background: var(--mint); border-color: var(--color-text); transform: translateY(-1px); }

/* ── Navigation ── */
.site-nav { background: transparent; border-bottom: 1px solid transparent; transition: background-color 0.4s, border-color 0.4s, transform 0.24s var(--ease); }
.site-nav.scrolled { background: rgba(254, 243, 226, 0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--color-border); }
.nav-link { color: var(--color-text); transition: color 0.3s; }
.nav-link:hover { color: var(--color-accent); }

.burger { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 44px; height: 44px; }
.burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--color-text); transition: transform 0.35s var(--ease); }
.menu-open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 40; background: var(--color-base); visibility: hidden; opacity: 0; transition: opacity 0.4s, visibility 0s 0.4s; }
.menu-open .menu { visibility: visible; opacity: 1; transition: opacity 0.4s; }
.menu-item { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.menu-open .menu-item { opacity: 1; transform: none; transition-delay: calc(0.15s + var(--i) * 0.09s); }

/* ── Hero ── */
.hero { background-image: radial-gradient(rgba(26, 26, 46, 0.06) 1px, transparent 1px); background-size: 32px 32px; }

/* ── Cards ── */
.card, .project-card, .why-card { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 32px; }
.card:hover, .project-card:hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08); }
.icon-bubble { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--color-accent-light); color: var(--color-accent); }

/* ── Work ── */
.project-card { display: flex; flex-direction: column; }
.project-link { transition: color 0.3s; }
.project-link:hover { color: var(--color-accent); }
.pill-type { display: inline-block; padding: 4px 12px; border-radius: 100px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--color-accent); background: var(--color-accent-light); }
.tag { padding: 4px 12px; border-radius: 100px; font-size: 12px; color: var(--color-text-muted); background: var(--color-surface-2); }

/* ── Process ── */
.process-line { display: none; }
.step { position: relative; padding-left: 28px; border-left: 2px solid var(--color-accent-light); }
.step-dot { display: none; }
@media (min-width: 768px) {
  .process-line { display: block; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--color-accent-light); }
  .process-line-fill { width: 0; height: 100%; background: var(--color-accent); }
  .step { padding: 32px 0 0; border-left: 0; }
  .step-dot { display: block; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--color-base); border: 2px solid var(--color-accent); }
}

/* ── Contact / form ── */
.form-card { padding: 36px; border-radius: 20px; background: var(--color-base); border: 1px solid var(--color-border); }
@media (max-width: 480px) { .form-card { padding: 24px 20px; } }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.field { width: 100%; padding: 13px 16px; border-radius: 10px; font-size: 15px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border-strong); transition: border-color 0.25s, box-shadow 0.25s; }
.field::placeholder { color: #9CA3AF; }
.field:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-light); }
.field[aria-invalid="true"] { border-color: #B42318; }
textarea.field { resize: vertical; min-height: 120px; }
.field-error { min-height: 0; margin-top: 4px; font-size: 13px; color: #B42318; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.social-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 100px; font-size: 14px; font-weight: 500; border: 1px solid var(--color-border-strong); transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.social-pill:hover { background: var(--color-accent-light); border-color: var(--color-accent-light); color: var(--color-accent); }

/* ── Footer ── */
.foot-link { color: rgba(255, 255, 255, 0.85); transition: color 0.3s; }
.foot-link:hover { color: var(--color-accent-light); }
.social-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.85); transition: background-color 0.3s, color 0.3s; }
.social-icon:hover { background: var(--color-accent-light); color: var(--color-accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
