/* ==========================================================================
   Forms & Funnels — stylesheet
   1. Tokens        2. Base       3. Layout      4. Header
   5. Components    6. Sections   7. Form        8. Footer   9. Responsive
   Change a value in section 1 and it updates everywhere.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --bg: #161826;
  --bg-lift: #1f2138;
  --surface: #1a1c2c;
  --surface-hover: #1e2032;
  --fg: #e9e9ed;
  --muted: #9b9caa;
  --faint: #6f7080;
  --line: #222434;
  --line-strong: #262838;
  --accent: #9184d9;
  --accent-ink: #c3bbee;
  --chip-bg: #2a2c40;
  --chip-fg: #e9e9ed;
  --tab-on: #242640;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;

  --radius: 8px;
  --radius-sm: 6px;
  --gutter: 56px;
  --section-gap: 88px;
}

[data-theme='light'] {
  --bg: #f5f5f7;
  --bg-lift: #ffffff;
  --surface: #ffffff;
  --surface-hover: #fafafc;
  --fg: #161826;
  --muted: #5d5e6e;
  --faint: #8a8b99;
  --line: #e4e4ea;
  --line-strong: #dcdce4;
  --accent: #6b5fc0;
  --accent-ink: #584bad;
  --chip-bg: #f0eff8;
  --chip-fg: #2c2a44;
  --tab-on: #ecebf6;
}

/* 2. Base ------------------------------------------------------------------ */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(120% 80% at 10% -20%, var(--bg-lift) 0%, var(--bg) 55%);
  transition: background-color .25s, color .25s;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
img { display: block; max-width: 100%; }
input, textarea, button { font: inherit; }
::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2 { margin: 0; font-weight: 500; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* 3. Layout ---------------------------------------------------------------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  padding: 92px var(--gutter) 0;
}

.section { display: flex; flex-direction: column; gap: 26px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.section-note { font-size: 14px; color: var(--muted); }
.section-intro { margin: 0; max-width: 640px; font-size: 15px; line-height: 1.65; color: var(--muted); }

/* 4. Header ---------------------------------------------------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand:hover { color: inherit; }

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-amp { color: var(--accent); }

.mark-fg { fill: var(--fg); }
.mark-accent { fill: var(--accent); }

.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-link { color: var(--muted); }

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-ink); }

/* 5. Components ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.btn-primary { border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent-ink); }
.btn-primary:active { background: color-mix(in oklab, var(--accent) 24%, transparent); }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); color: var(--accent-ink); }

.eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.pill {
  align-self: flex-start;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent-ink);
}

.chip {
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-size: 13px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  align-self: flex-start;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.tab {
  padding: 9px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.tab:hover { color: var(--accent-ink); }
.tab[aria-selected='true'] { background: var(--tab-on); color: var(--fg); }

.tab-panel { display: none; flex-direction: column; gap: 20px; }
.tab-panel.is-active { display: flex; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 20px; }

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color .18s, background .18s;
}
.card:hover { border-color: var(--accent); background: var(--surface-hover); color: inherit; }

.card-thumb {
  height: 176px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-hover);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--faint);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.card-body { display: flex; flex-direction: column; gap: 9px; padding: 20px 20px 22px; }
.card-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.card-text { font-size: 14px; line-height: 1.55; color: var(--faint); }

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Timeline rows */
.row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row-date { font-size: 14px; color: var(--faint); }
.row-body { display: flex; flex-direction: column; gap: 7px; }
.row-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.row-org { font-size: 14px; color: var(--accent-ink); }
.row-text { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 640px; }

/* 6. Sections -------------------------------------------------------------- */
.hero { display: flex; flex-direction: column; gap: 22px; max-width: 860px; }
.hero h1 { font-size: 58px; line-height: 1.06; letter-spacing: -.03em; text-wrap: pretty; }
.hero p { margin: 0; max-width: 620px; font-size: 17px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

.about {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(320px, 1fr);
  gap: 56px;
  align-items: start;
}

.about-photo {
  height: 440px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--faint);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-copy { display: flex; flex-direction: column; gap: 18px; max-width: 660px; }
.about-name { font-size: 44px; letter-spacing: -.03em; line-height: 1.05; }
.about-role { margin: 0; font-size: 18px; color: var(--muted); }
.about-copy p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }
.about-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }

/* 7. Form ------------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) minmax(240px, 1fr);
  gap: 56px;
  align-items: start;
}

.form { display: flex; flex-direction: column; gap: 18px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--muted); }

.input {
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font-size: 15px;
}
.input:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line-strong)); }
.input::placeholder { color: var(--faint); }
textarea.input { resize: vertical; }

.form-actions { display: flex; align-items: center; gap: 16px; }
.form-note { font-size: 14px; color: var(--accent-ink); }

.contact-details { display: flex; flex-direction: column; }
.detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 0 18px 18px;
  border-left: 2px solid var(--line-strong);
}
.detail:first-child { border-left-color: var(--accent); }
.detail-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.detail-value { font-size: 16px; }
.detail-meta { font-size: 14px; color: var(--muted); }

/* 8. Footer ---------------------------------------------------------------- */
.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 96px;
  padding: 34px var(--gutter) 40px;
  border-top: 1px solid var(--line);
}

.footer-brand { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--faint); }
.footer-links { display: flex; align-items: center; gap: 26px; font-size: 13px; }
.footer-links a { color: var(--muted); }
.footer-copy { color: var(--faint); }

/* 8b. Project page --------------------------------------------------------- */
.project-head { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 13px;
  color: var(--muted);
}
.back-link:hover { color: var(--accent-ink); }

.project-title { font-size: 46px; line-height: 1.08; letter-spacing: -.03em; text-wrap: pretty; }
.project-lede { margin: 0; max-width: 720px; font-size: 18px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shot-lead { grid-column: 1 / -1; }

.shot {
  margin: 0;
  min-height: 240px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--faint);
}
.shot-lead { min-height: 420px; }
.shot img { width: 100%; height: 100%; object-fit: cover; }

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-item { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; }

.prose { margin: 0; max-width: 720px; font-size: 16px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }

.row-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 640px;
}

.row-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.row-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.decisions { display: flex; flex-direction: column; }
.decision {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0 22px 20px;
  border-left: 2px solid var(--line-strong);
  max-width: 760px;
}
.decision:first-child { border-left-color: var(--accent); }
.decision-title { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.decision p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--chip-bg);
  color: var(--chip-fg);
}

.project-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}


/* 9. Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  :root { --gutter: 24px; --section-gap: 64px; }
  .main { padding-top: 56px; }
  .header { flex-wrap: wrap; gap: 16px; }
  .nav { gap: 18px; flex-wrap: wrap; }
  .hero h1 { font-size: 40px; }
  .about, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { height: 320px; }
  .form-pair { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 10px; }
  .project-title { font-size: 34px; }
  .shots { grid-template-columns: 1fr; }
  .shot-lead { min-height: 240px; }
}
