/**
 * Canonical design tokens — Yaniv Sela portfolio
 *
 * Light-only UI. Case study “paper” surfaces: `data-canvas="case-study"` on `<html>`.
 *
 * Imported by `work/case-study.css`, `design-system.html`.
 * Homepage should load this file first; keep inline `:root` in index removed / synced.
 */

/* ── Fallback (no-JS): light home ─────────────────────────── */
:root {
  color-scheme: dark;
  --font-display: 'Onest', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-hover: 200ms;
  --duration-panel: 280ms;
  --duration-page: 850ms;
  --duration-marquee: 90s;
  --ink: #ffffff;
  --accent: #f2f2f2;
  --accent-soft: #a3a3a3;
  --mid: rgba(255, 255, 255, 0.62);
  --light: rgba(255, 255, 255, 0.42);
  --green: #d4d4d4;
  --border: rgba(255, 255, 255, 0.14);

  --heading-on-light: #ffffff;
  --heading-on-dark: #ffffff;
  --body-text: rgba(255, 255, 255, 0.78);
  --nav-text: rgba(255, 255, 255, 0.88);
  --label-caps: rgba(255, 255, 255, 0.5);
  --accent-ink: #ffffff;

  --btn-primary-fg: #0a0a0c;

  --bg-section: #0a0a0c;
  --surface-raised: #141416;
  --hairline: rgba(255, 255, 255, 0.14);

  --max: 100vw;
  --r: 12px;
  /* Buttons, icon controls, CTAs */
  --radius-btn: 1px;
  /* Square corners for case-study images, accordion stage, outcomes shell */
  --radius-media: 0;
  --modal-max: 1100px;
  --cs-max: 100vw;
  /* Case study UI shells (light monochrome — no black bands) */
  --cs-dark: #0a0a0c;
  --cs-dark-elevated: #141416;
  --cs-dark-border: rgba(255, 255, 255, 0.14);
  --cs-band-bg: #0a0a0c;

  --bg: #0a0a0c;
  --bg-off: #141416;

  /* Nav glass */
  --nav-bg: rgba(255, 255, 255, 0.96);
  --nav-border: rgba(0, 0, 0, 0.08);
  --nav-shadow-scrolled: 0 2px 16px rgba(0, 0, 0, 0.06);
  --modal-topbar-bg: rgba(255, 255, 255, 0.86);

  /* Homepage #about-strip — light band, dark text */
  --about-strip-bg: #f0f0f0;
  --about-strip-label: rgba(10, 12, 14, 0.55);
  --about-strip-body: rgba(10, 12, 14, 0.88);
  --about-pill-group: rgba(10, 12, 14, 0.45);
  --about-pill-bg: rgba(255, 255, 255, 0.85);
  --about-pill-border: rgba(10, 12, 14, 0.14);
  --about-pill-text: #0a0a0c;
  --about-pill-highlight-bg: rgba(10, 12, 14, 0.06);
  --about-pill-highlight-border: rgba(10, 12, 14, 0.2);

  /* Apple-style segmented control (filters / tabs) */
  --segmented-track-bg: #e8e8ed;
  --segmented-track-border: rgba(0, 0, 0, 0.06);
  --segmented-active-bg: #1d1d1f;
  --segmented-active-fg: #f5f5f7;
  --segmented-inactive-fg: #1d1d1f;

  /* Icons (Lucide / stroke SVGs — use color + currentColor) */
  --icon-color: var(--mid);
  --icon-color-muted: var(--light);
  --icon-color-emphasis: var(--accent-ink);
  --icon-size-sm: 20px;
  --icon-size-md: 24px;
  --icon-size-lg: 48px;

  /* Gradient text (hero / highlights) */
  --text-gradient-from: var(--accent-ink);
  --text-gradient-to: var(--accent);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-11: 56px;
  --space-12: 64px;
  --space-13: 72px;
  --space-14: 80px;
  --space-15: 96px;
  --space-18: 160px;

  --page-inline: var(--space-8);
  /* Viewport distance to inner right edge of .wrap / .nav-inner (matches “About” column) */
  --site-gutter-right: calc((100vw - min(100vw, var(--max))) / 2 + var(--page-inline));
  --section-gap: var(--space-14);
  --block-gap: var(--space-6);
  --stack-tight: var(--space-3);
  --stack-standard: var(--space-4);
  --stack-relaxed: var(--space-6);

  /* Global footer (intentional dark band — tokenized for consistency) */
  --footer-bg: #000000;
  --footer-fg: rgba(255, 255, 255, 0.72);
  --footer-fg-muted: rgba(255, 255, 255, 0.45);
  --footer-fg-strong: #ffffff;
  --footer-border: rgba(255, 255, 255, 0.12);
  --footer-hover-bg: rgba(255, 255, 255, 0.08);
}

/* Case study — same black field as the homepage */
html[data-canvas="case-study"] {
  --bg: #0a0a0c;
  --bg-off: #141416;
  --body-text: rgba(255, 255, 255, 0.82);
  --heading-on-light: #ffffff;
  --nav-text: rgba(255, 255, 255, 0.88);
  --label-caps: rgba(255, 255, 255, 0.55);
  --mid: rgba(255, 255, 255, 0.68);
  --light: rgba(255, 255, 255, 0.42);
  --accent-ink: #ffffff;
  --border: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.12);
  --surface-raised: #141416;
  --segmented-inactive-fg: #1d1d1f;
  --segmented-active-bg: #1d1d1f;
  --segmented-active-fg: #f5f5f7;
  --icon-color: rgba(255, 255, 255, 0.72);
  --icon-color-muted: rgba(255, 255, 255, 0.48);
  --icon-color-emphasis: #ffffff;
  --text-gradient-from: #ffffff;
  --text-gradient-to: var(--accent);
}

/* ── Gradient text (shared with homepage hero emphasis) ── */
.text-gradient {
  font-style: normal;
  background: linear-gradient(90deg, var(--text-gradient-from) 0%, var(--text-gradient-to) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ── Icon library: Lucide defaults (stroke inherits currentColor) ── */
.icon,
[data-lucide] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
  flex-shrink: 0;
}

.icon--muted,
.icon--muted[data-lucide] {
  color: var(--icon-color-muted);
}

.icon--accent,
.icon--accent[data-lucide] {
  color: var(--icon-color-emphasis);
}

.icon--sm,
.icon--sm[data-lucide] {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
}

.icon--md,
.icon--md[data-lucide] {
  width: var(--icon-size-md);
  height: var(--icon-size-md);
}

.icon--lg,
.icon--lg[data-lucide] {
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
}

.icon svg,
[data-lucide] svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Apple-style segmented filter (Explore the lineup pattern) ── */
.segmented {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: var(--space-1);
  gap: 2px;
  border-radius: 999px;
  background: var(--segmented-track-bg);
  border: 1px solid var(--segmented-track-border);
  width: fit-content;
  max-width: 100%;
}

.segmented[role="tablist"] {
  /* same */
}

.segmented__btn {
  appearance: none;
  border: none;
  background: transparent;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--segmented-inactive-fg);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.segmented__btn:hover:not([aria-selected="true"]) {
  color: var(--heading-on-light);
}

.segmented__btn[aria-selected="true"] {
  background: var(--segmented-active-bg);
  color: var(--segmented-active-fg);
}

.segmented__btn:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .segmented__btn {
    transition: none;
  }
}

.segmented-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--heading-on-light);
  margin: 0 0 var(--space-6);
}

.segmented-hint {
  font-size: 14px;
  color: var(--mid);
  max-width: 65ch;
  margin-bottom: var(--space-6);
}

/* ── UNIFIED BUTTON FAMILY ─────────────────────────────── */
/* Standard arrow SVG: 16px, translates +2px on hover */
.btn-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary,
.btn-secondary,
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

/* PRIMARY: Filled accent background */
.btn-primary {
  background: var(--accent-ink);
  color: var(--btn-primary-fg);
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  box-shadow: none;
}

.btn-primary:hover {
  opacity: 0.85;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary .btn-arrow {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(2px);
}

/* SECONDARY: Border + fill on hover */
.btn-secondary {
  border: 1px solid var(--border);
  color: var(--heading-on-light);
  padding: 10px 14px;
  border-radius: var(--radius-btn);
}

.btn-secondary:hover {
  background: rgba(10, 12, 14, 0.04);
  border-color: var(--heading-on-light);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-secondary:hover .btn-arrow {
  transform: translateX(2px);
}

/* LINK: Text only, underline on hover */
.btn-link {
  color: var(--accent-ink);
  padding: 0;
  position: relative;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent-ink);
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-link:hover::after {
  opacity: 1;
}

.btn-link:hover .btn-arrow {
  transform: translateX(2px);
}

.type-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--heading-on-light);
}

.type-body {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--body-text);
}

.type-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label-caps);
}

.link-quiet {
  color: var(--ink);
  text-decoration: none;
}

.link-quiet:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-secondary,
  .btn-link,
  .btn-arrow {
    transition: none;
  }
}
