/* v2 — light (warm Apple) + dark (v1 gold on charcoal) */

:root,
[data-theme="light"] {
  color-scheme: light;
  --canvas: #f2eee7;
  --surface: #faf8f4;
  --ink: #1c1915;
  --muted: #6b645b;
  --faint: #8a8278;
  --line: rgba(28, 25, 21, 0.09);
  --line-strong: rgba(28, 25, 21, 0.14);
  --gold: #b08a4a;
  --gold-soft: #dfc09a;
  --gold-wash: rgba(176, 138, 74, 0.11);
  --gold-line: rgba(176, 138, 74, 0.45);
  --btn-bg: #1c1915;
  --btn-ink: #ffffff;
  --btn-hover: #000000;
  --glow-a: rgba(176, 138, 74, 0.12);
  --glow-b: rgba(176, 138, 74, 0.06);
  --glow-c: transparent;
  --inset: rgba(255, 255, 255, 0.8);
  --shadow: rgba(28, 25, 21, 0.1);
  --photo-bg: #e8e4dc;
  --skip-bg: #000;
  --skip-ink: #fff;
  --theme-meta: #f2eee7;
}

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101218;
  --surface: #171a24;
  --ink: #f0ebe3;
  --muted: #a39e94;
  --faint: #7a756c;
  --line: rgba(240, 235, 227, 0.12);
  --line-strong: rgba(240, 235, 227, 0.18);
  --gold: #d4a574;
  --gold-soft: #e8c49a;
  --gold-wash: rgba(212, 165, 116, 0.14);
  --gold-line: rgba(212, 165, 116, 0.4);
  --btn-bg: #d4a574;
  --btn-ink: #1a120a;
  --btn-hover: #e0b888;
  --glow-a: rgba(212, 165, 116, 0.18);
  --glow-b: rgba(120, 140, 180, 0.08);
  --glow-c: transparent;
  --inset: rgba(255, 255, 255, 0.04);
  --shadow: rgba(0, 0, 0, 0.35);
  --photo-bg: #1a1d28;
  --skip-bg: #fff;
  --skip-ink: #000;
  --theme-meta: #101218;
}

:root {
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 120ms;
  --dur-ui: 220ms;
  --dur-enter: 560ms;
  --stagger: 55ms;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --r: 1.15rem;
  --r-sm: 0.85rem;
  --shell: 56rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 0% -10%, var(--glow-a), transparent 55%),
    radial-gradient(720px 420px at 88% 12%, var(--glow-a), transparent 60%),
    radial-gradient(700px 400px at 100% 20%, var(--glow-b), transparent 50%),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 280ms var(--ease-out), color 280ms var(--ease-out);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--gold);
}

a:hover {
  color: var(--gold-soft);
}

a:focus-visible,
.btn:focus-visible,
.nav__mark:focus-visible,
.nav__links a:focus-visible,
.nav-toggle:focus-visible,
.theme-toggle:focus-visible,
.group__row:focus-visible,
.text-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: var(--skip-bg);
  color: var(--skip-ink);
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

.shell {
  width: min(var(--shell), calc(100% - 2.75rem));
  margin-inline: auto;
  padding-bottom: 4rem;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0.65rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 3.5rem;
  max-height: 80px;
  margin-top: 0.65rem;
  margin-bottom: 0.35rem;
  padding-inline: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px var(--shadow);
}

.nav__end {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.nav__mark {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav__mark:hover {
  color: var(--gold);
}

.nav__links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.85rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

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

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 980px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    background var(--dur-ui) ease,
    border-color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out);
}

.nav-toggle:hover {
  border-color: var(--gold-line);
}

.nav-toggle:active {
  transform: scale(0.96);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1rem;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 200ms var(--ease-out), opacity 160ms ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 980px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition:
    background var(--dur-ui) ease,
    border-color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out);
}

.theme-toggle:hover {
  border-color: var(--gold-line);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Show bulb that matches current theme (on = light, out = dark) */
[data-theme="light"] .theme-toggle .icon-bulb-off,
[data-theme="dark"] .theme-toggle .icon-bulb-on {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-bulb-on {
  color: var(--gold);
}

/* Phone / narrow: burger — one row with mark + theme */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav__links {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.55rem);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.2rem;
    margin: 0;
    padding: 0.75rem 0.9rem;
    /* Solid — translucent bleed made hero type show through the panel */
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    box-shadow: 0 16px 36px var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.35rem);
    pointer-events: none;
    transition:
      opacity 240ms var(--ease-out),
      transform 240ms var(--ease-out),
      visibility 0s linear 240ms;
  }

  .nav__links.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition:
      opacity 240ms var(--ease-out),
      transform 240ms var(--ease-out),
      visibility 0s linear 0s;
  }

  .nav__links a {
    padding: 0.9rem 1.25rem;
    border-radius: 0.55rem;
    border-top: none;
  }

  .nav__links a:hover {
    background: var(--gold-wash);
    color: var(--ink);
  }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .nav__links {
    transform: none;
    transition: opacity 120ms ease, visibility 0s linear 120ms;
  }

  .nav__links.is-open {
    transform: none;
    transition: opacity 120ms ease, visibility 0s linear 0s;
  }
}

/* —— Hero: v1-like name/photo mass —— */
.hero {
  display: grid;
  gap: 2rem 2.5rem;
  align-items: center;
  padding: 2.75rem 0 4rem;
  min-height: 0;
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem);
    gap: 2rem 2.75rem;
    padding-top: 3.25rem;
  }
}

.hero__role {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 6vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__lede {
  margin: 0 0 1.5rem;
  max-width: 32rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.15rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.2rem;
  border-radius: 980px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    background var(--dur-ui) ease,
    color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-ui) ease;
}

.btn:hover {
  background: var(--btn-hover);
  color: var(--btn-ink);
}

.btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--shadow);
  }

  .btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
  }
}

.text-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold-line);
  padding-bottom: 0.08rem;
  transition: color var(--dur-ui) ease, border-color var(--dur-ui) ease;
}

.text-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.hero__photo {
  margin: 0;
  justify-self: start;
}

@media (min-width: 720px) {
  .hero__photo {
    justify-self: end;
  }
}

.hero__photo img {
  display: block;
  width: min(15rem, 70vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 0.75rem;
  background: var(--photo-bg);
  transition: transform var(--dur-ui) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .hero__photo:hover img {
    transform: translateY(-2px);
  }
}

/* —— Sections —— */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.section--last {
  padding-bottom: 2rem;
}

.section h2 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.pillars {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.pillars article {
  padding: 1.35rem 1.25rem 1.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 0 var(--inset) inset;
  transition:
    transform var(--dur-ui) var(--ease-out),
    border-color var(--dur-ui) ease,
    box-shadow var(--dur-ui) ease,
    background var(--dur-ui) ease;
}

@media (hover: hover) and (pointer: fine) {
  .pillars article:hover {
    transform: translateY(-3px);
    border-color: var(--gold-line);
    box-shadow:
      0 1px 0 var(--inset) inset,
      0 14px 28px var(--shadow);
  }
}

.pillars .n {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.pillars h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pillars p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-wrap: pretty;
}

/* Apple Settings–style grouped list */
.group {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 0 var(--inset) inset;
}

.group__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem 1.25rem;
  align-items: start;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition:
    background var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out);
}

.group__row:last-child {
  border-bottom: 0;
}

.group__row:hover {
  background: var(--gold-wash);
}

.group__row:active {
  transform: scale(0.995);
}

@media (hover: hover) and (pointer: fine) {
  .group__row:hover {
    transform: translateX(3px);
  }

  .group__row:active {
    transform: translateX(1px) scale(0.995);
  }
}

.group__label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.group__label strong {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.group__label span {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.group__meta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.group__row:hover .group__meta {
  color: var(--gold);
}

.note {
  margin: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--faint);
}

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 36rem;
  display: grid;
  gap: 1rem;
}

.principles li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 1.12rem;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: pretty;
}

.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--gold);
}

.elsewhere {
  color: var(--muted);
}

.elsewhere p {
  margin: 0 0 0.65rem;
}

.elsewhere a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold-line);
  transition: color var(--dur-ui) ease, border-color var(--dur-ui) ease;
}

.elsewhere a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--faint);
}

.footer a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold-line);
}

.footer p {
  margin: 0;
}

/* —— FatDisco doodle easter egg —— */
.egg {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--canvas) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.egg.is-open {
  opacity: 1;
  pointer-events: auto;
}

.egg[hidden] {
  display: none;
}

.egg.is-open[hidden] {
  display: grid;
}

.egg__panel {
  width: min(28rem, 100%);
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 24px 48px var(--shadow);
  text-align: center;
  transform: translateY(12px) scale(0.96);
  transition: transform 320ms var(--ease-out);
}

.egg.is-open .egg__panel {
  transform: none;
}

.egg__title {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.egg__cast {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
  min-height: 9rem;
}

.egg__doodle {
  width: auto;
  height: clamp(5.5rem, 18vw, 8.5rem);
  object-fit: contain;
  /* PNGs already have transparent bg — screen blend washed colours white on light mobile panels */
  mix-blend-mode: normal;
  opacity: 0;
  transform: translateY(18px) scale(0.9);
  transition:
    opacity 420ms var(--ease-out),
    transform 420ms var(--ease-out);
  transition-delay: calc(80ms + var(--i, 0) * 70ms);
}

.egg.is-open .egg__doodle {
  opacity: 1;
  transform: none;
}

.egg__doodle:nth-child(2) {
  height: clamp(6.5rem, 22vw, 9.75rem);
  z-index: 1;
}

.egg__hint {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--faint);
}

@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .egg {
    background: var(--canvas);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .egg,
  .egg__panel,
  .egg__doodle {
    transition: none;
  }

  .egg__panel,
  .egg__doodle {
    transform: none;
    opacity: 1;
  }
}

/* —— Motion system (opt-in via .js-motion) —— */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition:
    opacity var(--dur-enter) var(--ease-out),
    transform var(--dur-enter) var(--ease-out);
  transition-delay: calc(var(--d, 0) * var(--stagger));
  will-change: opacity, transform;
}

html.js-motion .reveal--photo {
  transform: translateY(18px) scale(0.96);
}

html.js-motion .reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

html.js-motion .nav {
  opacity: 0;
  transform: translateY(-8px);
  animation: nav-in 480ms var(--ease-out) 40ms forwards;
}

@keyframes nav-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js-motion .reveal,
  html.js-motion .reveal--photo,
  html.js-motion .nav {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
    will-change: auto;
  }

  .btn,
  .text-link,
  .group__row,
  .nav__links a,
  .hero__photo img,
  .pillars article {
    transition: none;
  }

  .btn:active,
  .group__row:active {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .grain {
    display: none;
  }
}
