:root {
  --banner-h: 34px;
  --radius: 24px;
  --sans: "Inter Tight", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --shadow: 0 24px 70px rgba(18, 16, 14, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 6px 18px;
  background: rgba(16, 14, 12, 0.9);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(16px);
}
.banner a {
  color: #fff;
  font-weight: 600;
  text-underline-offset: 2px;
}

.nav {
  position: sticky;
  top: var(--banner-h);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  margin: 10px auto 0;
  padding: 10px 14px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}
.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  font-weight: 560;
}
.nav nav { display: flex; gap: 16px; margin-right: auto; }
.nav nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
}
.nav nav a:hover { color: var(--ink); }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  position: relative;
  padding: 54px 0 18px;
  overflow: clip;
  background:
    radial-gradient(900px 420px at 88% -20%, var(--glow), transparent 60%),
    radial-gradient(680px 380px at -12% 10%, var(--glow-2), transparent 55%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 36px;
  align-items: center;
}
.kicker {
  margin: 0 0 14px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(3rem, 6.4vw, 6.1rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.lede { max-width: 38rem; margin: 18px 0 0; font-size: 1.12rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn:hover, .btn-ghost:hover { transform: translateY(-2px); }

.hero-media {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: var(--shadow);
  background:
    radial-gradient(500px 280px at 20% 10%, var(--glow), transparent 70%),
    radial-gradient(420px 260px at 90% 80%, var(--glow-2), transparent 70%),
    var(--card);
}
.hero-media img { width: 100%; height: 460px; object-fit: cover; object-position: center; background: var(--card); }
.hero-media.compact {
  min-height: 0;
  width: min(1120px, calc(100% - 32px));
  margin: 16px auto 0;
}
.hero-media.compact img { height: 280px; }
.photo-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.photo-strip img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.glass {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  max-width: calc(100% - 32px);
  padding: 14px 16px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.glass b { display: block; font-size: 1.25rem; letter-spacing: -0.03em; }
.glass span { color: var(--muted); font-size: 0.85rem; }

.marquee {
  margin-top: 28px;
  overflow: hidden;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  padding: 14px 0;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee-track span::before { content: "·"; margin-right: 28px; color: var(--accent); }

.section { padding: 64px 0; }
.section h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 560;
}
.intro { max-width: 38rem; margin: 0 0 22px; color: var(--muted); }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.tile {
  grid-column: span 2;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease);
}
.tile:hover { transform: translateY(-3px); }
.tile h3 { margin: 0 0 8px; font-size: 1.2rem; letter-spacing: -0.03em; }
.tile p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.tile-lg { grid-column: span 3; min-height: 180px; }
.tile-xl { grid-column: span 4; }
.tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tile-photo { padding: 0; overflow: hidden; min-height: 240px; }
.tile-photo img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; object-position: center; background: var(--card); }
/* Bento fill: 4+2 / 2+2+2 / wide photo, so the desktop grid has no empty cells. */
.bento > .tile-lg { grid-column: span 4; }
.bento > .tile-photo:last-child { grid-column: 1 / -1; }
.bento > .tile-photo:last-child img { height: 320px; min-height: 0; }

.hours { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.day {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.day b { display: block; margin-bottom: 4px; }
.day span { color: var(--muted); font-variant-numeric: tabular-nums; }
.note {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px solid var(--line);
}

.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 16px; align-items: stretch; }
.panel {
  padding: 22px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.panel ul { margin: 10px 0 0; padding-left: 18px; }
.panel a { font-weight: 600; }
.map {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 28px;
  background: var(--card);
}

.finale {
  margin: 10px auto 40px;
  padding: 42px 36px;
  border-radius: 32px;
  background:
    radial-gradient(500px 200px at 0% 0%, var(--glow), transparent 70%),
    radial-gradient(400px 180px at 100% 100%, var(--glow-2), transparent 70%),
    var(--ink);
  color: var(--bg);
}
.finale .kicker, .finale p { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.finale h2 { color: var(--bg); margin-top: 0; }
.finale .btn { background: var(--bg); color: var(--ink); }

.dock {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 35;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.dock .btn, .dock .btn-ghost { flex: 1; }

[data-reveal] { opacity: 1; }
[data-layout="editorial"] .hero-grid { grid-template-columns: 1fr; }
[data-layout="editorial"] .lede { max-width: 36rem; }
[data-layout="editorial"] .hero-media { margin-top: 8px; }
[data-layout="editorial"] h1 { max-width: 11ch; font-size: clamp(3.4rem, 8vw, 7.2rem); }
[data-vertical="barber"] h1,
[data-vertical="barber"] h2 { font-family: var(--sans); font-weight: 650; }
[data-vertical="finance"] h1,
[data-vertical="finance"] h2 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.055em; }
[data-vertical="auto"] h1,
[data-vertical="auto"] h2,
[data-vertical="drive"] h1,
[data-vertical="drive"] h2 { font-family: var(--sans); font-weight: 650; letter-spacing: -0.045em; }

[data-layout="night"] .hero { padding-top: 28px; }
[data-layout="night"] h1 { font-family: var(--sans); font-weight: 700; letter-spacing: -0.06em; }
[data-layout="poster"] h1 {
  font-size: clamp(3.6rem, 11vw, 8.4rem);
  line-height: 0.84;
  text-transform: uppercase;
}

[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] .nav { background: color-mix(in srgb, var(--bg) 70%, transparent); }
[data-theme="dark"] .tile,
[data-theme="dark"] .panel,
[data-theme="dark"] .day { background: color-mix(in srgb, white 5%, var(--bg)); }

.calc-shell { width: min(1120px, calc(100% - 32px)); margin: 28px auto 48px; }
.calc-head h1 { font-size: clamp(2.6rem, 5vw, 4.6rem); max-width: 14ch; }
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  border: 1px solid var(--line);
}
.calc-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 16px; margin-top: 22px; align-items: start; }
.form, .result {
  padding: 22px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.result { position: sticky; top: calc(var(--banner-h) + 78px); }
label { display: grid; gap: 6px; font-size: 0.86rem; font-weight: 650; margin-bottom: 12px; }
input[type="text"] {
  min-height: 52px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0 14px;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.segset { border: 0; margin: 0 0 14px; padding: 0; }
.segset legend { font-size: 0.86rem; font-weight: 650; margin-bottom: 8px; }
.segctl {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, var(--bg));
  border: 1px solid var(--line);
}
.segctl button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}
.segctl button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.net {
  margin: 4px 0 12px;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.bar {
  display: flex;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.bar i { display: block; height: 100%; width: 0; transition: width 0.6s var(--ease); }
.bar .cas { background: #6d7cff; }
.bar .cass { background: #2faf78; }
.bar .tax { background: #e2a23a; }
.bar .netseg { background: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 10px 0 4px; padding: 0; list-style: none; font-size: 0.8rem; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 6px; }
.rows { margin: 8px 0 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.row dt, .row dd { margin: 0; }
.row.netrow { font-weight: 750; }
.err { min-height: 1.2em; color: #b42318; font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0; list-style: none; }
.chips li { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.84rem; }
.snippet {
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-radius: 16px;
  background: #0e1116;
  color: #e8edf5;
  font-size: 0.82rem;
  line-height: 1.45;
}
.fine { color: var(--muted); font-size: 0.92rem; }
.rules { color: var(--muted); }

[data-layout="ticket"] .calc-grid { grid-template-columns: 1fr; }
[data-layout="ticket"] .result { position: static; order: -1; }

@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: ticker 32s linear infinite; }
  [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  [data-reveal].is-in { opacity: 1; transform: none; }
  @keyframes ticker { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .tile:hover { transform: none; }
  .bar i { transition: none; }
}

@media (max-width: 900px) {
  .hero-grid, .split, .calc-grid, .bento { grid-template-columns: 1fr; }
  .tile, .tile-lg, .tile-xl, .bento > .tile-lg, .bento > .tile-photo:last-child { grid-column: auto; }
  .nav { width: calc(100% - 20px); border-radius: 22px; flex-wrap: wrap; }
  .nav nav { order: 3; width: 100%; }
  .nav .btn { margin-left: auto; }
  h1,
  [data-layout="editorial"] h1,
  [data-layout="poster"] h1 {
    font-size: clamp(2.55rem, 11vw, 3.7rem);
    max-width: none;
  }
  .hero-media img, .hero-media.compact img { height: auto; aspect-ratio: 4 / 3; }
  .hero-media.compact img { aspect-ratio: 16 / 10; }
  .hero-media { min-height: 0; border-radius: 22px; }
  .glass { left: 10px; bottom: 10px; padding: 8px 12px; border-radius: 14px; }
  .glass b { font-size: 1rem; }
  .glass span { font-size: 0.72rem; }
  .photo-strip { grid-template-columns: 1fr; }
  .photo-strip img { height: auto; aspect-ratio: 3 / 2; }
  .tile-photo { min-height: 0; }
  .tile-photo img, .bento > .tile-photo:last-child img { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  .dock { display: flex; }
  body { padding-bottom: 84px; }
  .finale { padding: 28px 20px; }
  .result { position: static; }
}
