/* ============================================================
   TimWebsites — Design System
   Palette: warm cream + ink black + orange #ff5a36
   Type: Space Grotesk (display) / Hanken Grotesk (body) / Space Mono (labels)
   ============================================================ */

:root {
  /* Light (default) */
  --bg:        #faf9f6;
  --bg-2:      #f1efe8;
  --surface:   #ffffff;
  --ink:       #16130f;
  --ink-soft:  #3a352e;
  --muted:     #756e63;
  --line:      #e4e0d6;
  --line-2:    #d6d1c4;
  --accent:    #ff5a36;
  --accent-ink:#c2400f;
  --accent-soft:#ffe7df;
  /* inverted (always-dark) panels — CTA bands, footer, builder, etc. */
  --invert:    #16130f;
  --invert-2:  #241d15;
  --invert-ink:#faf9f6;
  --invert-muted: rgba(250,249,246,.62);
  --glow:      transparent;
  --shadow:    0 1px 2px rgba(22,19,15,.04), 0 12px 32px -12px rgba(22,19,15,.16);
  --shadow-lg: 0 2px 4px rgba(22,19,15,.05), 0 40px 80px -30px rgba(22,19,15,.30);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --r-sm: 10px;
  --r: 18px;
  --r-lg: 28px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

[data-theme="dark"] {
  --bg:        #0d0b09;
  --bg-2:      #15110d;
  --surface:   #1a1612;
  --ink:       #f6f2ea;
  --ink-soft:  #d8d2c6;
  --muted:     #9a9285;
  --line:      #2a2419;
  --line-2:    #362f22;
  --accent:    #ff6a44;
  --accent-ink:#ffb59f;
  --accent-soft:#2a1810;
  --invert:    #1b1611;
  --invert-2:  #271f17;
  --invert-ink:#f6f2ea;
  --invert-muted: rgba(246,242,234,.6);
  --glow:      rgba(255,90,54,.35);
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 16px 40px -14px rgba(0,0,0,.7);
  --shadow-lg: 0 2px 8px rgba(0,0,0,.5), 0 50px 90px -30px rgba(0,0,0,.85);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(72px, 11vw, 160px); position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--ink);
  --t: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  background: var(--b);
  color: var(--t);
  border: 1.5px solid var(--b);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease), background .3s;
  will-change: transform;
}
.btn span { position: relative; z-index: 1; }
.btn .arr { transition: transform .4s var(--ease-out); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -14px rgba(0,0,0,.4); }
.btn:hover .arr { transform: translateX(5px); }
.btn:active { transform: translateY(-1px); }
.btn--accent { --b: var(--accent); --t: #fff; box-shadow: 0 0 0 0 var(--glow); }
.btn--accent:hover { box-shadow: 0 18px 36px -12px var(--accent), 0 0 40px var(--glow); }
.btn--ghost {
  --b: transparent; --t: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--ink); background: transparent; }

/* ---------- pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--ink-soft);
  background: var(--surface);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- placeholder imagery (striped) ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg, var(--bg-2) 0 11px, transparent 11px 22px),
    var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid var(--line);
}

/* ---------- utility ---------- */
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.center { text-align: center; }
.hidden { display: none !important; }
