:root {
  --paper: #f3efe5;
  --paper-soft: #e6e8dc;
  --ink: #17201b;
  --muted: #5f6964;
  --line: rgba(23, 32, 27, 0.12);
  --green: #256a4d;
  --tomato: #c94d40;
  --turmeric: #d99b32;
  --blue: #315f78;
  --surface: var(--paper);
  --paper-96: rgba(243, 239, 229, 0.96);
  --paper-82: rgba(243, 239, 229, 0.82);
  --paper-70: rgba(243, 239, 229, 0.7);
  --paper-64: rgba(243, 239, 229, 0.64);
  --ink-shadow: rgba(23, 32, 27, 0.14);
  --shadow: 0 24px 70px var(--ink-shadow);
  --section-bg: var(--paper);
  --radius: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-7: 48px;
  font-family: "Instrument Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

html {
  background: var(--paper);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 50;
  transform: translateY(-140%);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 56px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--paper-96);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  gap: 10px;
  padding: 0 var(--space-4);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.section-rail a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.section-rail a[aria-current="true"] {
  border-color: var(--line);
  background: var(--paper-soft);
  color: var(--ink);
}

main {
  position: relative;
  padding-bottom: 68px;
}

.section-rail {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: var(--paper-96);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.section-rail::-webkit-scrollbar {
  display: none;
}

.section {
  position: relative;
  z-index: 0;
  display: grid;
  gap: var(--space-5);
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 72px;
}

.section::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--section-bg);
  box-shadow: 0 0 0 100vmax var(--section-bg);
  clip-path: inset(0 -100vmax);
  content: "";
}

.section:nth-of-type(even)::before {
  --section-bg: var(--paper-soft);
}

.section:target {
  outline: none;
}

.section-copy {
  display: grid;
  gap: var(--space-3);
  align-content: center;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

[data-accent="tomato"] .section-kicker { color: var(--tomato); }
[data-accent="blue"] .section-kicker { color: var(--blue); }
[data-accent="turmeric"] .section-kicker { color: var(--turmeric); }
[data-accent="green"] .section-kicker { color: var(--green); }

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: 34px;
  line-height: 1.02;
}

h2 {
  max-width: 560px;
  font-size: 30px;
  line-height: 1.04;
}

.section-copy p:not(.section-kicker) {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
}

.visual-slot {
  min-width: 0;
  align-self: center;
}

.hero-visual {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  align-items: end;
  max-height: 360px;
  overflow: hidden;
}

.section-workflow {
  grid-template-columns: 1fr;
}

.workflow-board,
.feature-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.workflow-card,
.feature-card {
  position: relative;
  display: grid;
  min-height: 104px;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-82);
  padding: 14px;
  box-shadow: 0 14px 36px var(--ink-shadow);
}

.workflow-card strong,
.feature-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.workflow-card span,
.feature-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.feature-card {
  min-height: 118px;
}

.feature-showcase {
  display: grid;
  gap: var(--space-4);
}

.app-surface {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-82);
  padding: var(--space-4);
  box-shadow: 0 18px 46px var(--ink-shadow);
}

.app-top,
.app-list span,
.app-message,
.app-note,
.app-input,
.app-grid span,
.app-platforms span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-64);
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.app-top strong {
  color: var(--ink);
}

.app-input {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
}

.app-grid,
.app-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.app-grid span,
.app-platforms span {
  min-height: 42px;
  padding: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.app-list {
  display: grid;
  gap: var(--space-2);
}

.app-list span,
.app-message,
.app-note {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.app-list strong,
.app-message strong {
  color: var(--ink);
}

.app-list-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-message {
  background: var(--paper);
}

.app-note {
  color: var(--tomato);
  font-weight: 800;
}

.mini-phone,
.phone-frame {
  overflow: hidden;
  border: 8px solid var(--ink);
  border-radius: 30px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.mini-phone {
  width: min(100%, 320px);
  min-height: 310px;
  padding: 12px;
}

.phone-frame {
  aspect-ratio: 390 / 844;
  max-height: min(520px, 58dvh);
  justify-self: center;
  width: min(100%, 288px);
}

.cook-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  align-items: stretch;
  max-height: none;
  overflow: visible;
}

.cook-shot {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 300px;
  max-height: none;
  justify-self: center;
  border-width: 4px;
  border-radius: 20px;
}

.cook-shot:first-child {
  aspect-ratio: 4 / 3;
  grid-column: 1 / -1;
  max-width: 330px;
}

.secondary-shot,
.tertiary-shot {
  aspect-ratio: 4 / 5;
  max-height: none;
}

.cook-shot .phone-screen {
  display: grid;
  align-content: start;
  border-radius: 15px;
  padding: 10px;
}

.cook-shot .phone-status {
  display: block;
  margin-bottom: 0;
  font-size: 10px;
  line-height: 1.2;
}

.cook-shot .big-step {
  margin: var(--space-2) 0;
  font-size: 22px;
  line-height: 1.08;
}

.cook-shot .timer-card {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-2);
  padding: var(--space-2);
}

.cook-shot .timer-card strong {
  font-size: 22px;
}

.cook-shot .ingredient-card,
.cook-shot .clip-card {
  margin-top: 0;
  padding: 6px;
  font-size: 10px;
  line-height: 1.15;
}

.secondary-shot .phone-screen,
.tertiary-shot .phone-screen {
  gap: 5px;
  padding: 8px;
}

.secondary-shot .review-note {
  margin-top: 0;
  padding: 6px;
  font-size: 9px;
  line-height: 1.2;
}

.phone-screen,
.mini-phone {
  background: var(--surface);
}

.phone-screen {
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px 18px;
}

.phone-top,
.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.phone-top strong,
.phone-status {
  color: var(--ink);
}

.search-pill,
.review-note {
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
}

.recipe-card,
.timer-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-82);
}

.recipe-card {
  display: grid;
  gap: 2px;
  margin-top: var(--space-3);
  padding: 12px;
}

.recipe-card span {
  color: var(--muted);
  font-size: 12px;
}

.big-step {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  color: var(--ink);
}

.step-number,
.timer-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ingredient-card,
.clip-card {
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.ingredient-card,
.clip-card {
  margin-top: var(--space-2);
}

.review-note {
  margin-top: var(--space-4);
  color: var(--tomato);
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-soft);
}

.progress-bar span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.big-step {
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  line-height: 1.05;
}

.timer-card {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding: var(--space-4);
}

.timer-card strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.compact-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.compact-list span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-64);
  color: var(--ink);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
}

.table-wrap {
  min-width: 0;
}

.competitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.competitor-table caption {
  margin-bottom: var(--space-3);
  color: var(--muted);
  text-align: left;
  font-size: 16px;
  font-weight: 800;
}

.competitor-table th,
.competitor-table td {
  border-top: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}

.competitor-table thead {
  display: none;
}

.competitor-table,
.competitor-table tbody,
.competitor-table tr,
.competitor-table th,
.competitor-table td {
  display: block;
}

.competitor-table tr {
  margin-bottom: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-70);
  overflow: hidden;
}

.competitor-table th,
.competitor-table td {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-3);
  border-top: 1px solid var(--line);
}

.competitor-table tr > :first-child {
  border-top: 0;
}

.competitor-table th::before,
.competitor-table td::before {
  content: attr(data-label);
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.source-link {
  display: inline-block;
  margin-top: var(--space-2);
  color: var(--blue);
  font-weight: 800;
  overflow-wrap: anywhere;
}

@media (min-width: 600px) {
  .section {
    width: min(1180px, calc(100vw - 48px));
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 40px;
  }

  .phone-frame {
    width: min(100%, 330px);
  }

  .workflow-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-surface {
    min-height: 240px;
  }

  .workflow-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  main {
    padding-right: var(--space-5);
    padding-bottom: 0;
    padding-left: 160px;
  }

  .brand {
    min-height: 56px;
    padding-left: var(--space-5);
  }

  .section {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    gap: var(--space-7);
    width: min(1180px, calc(100vw - 220px));
    padding: 58px 0;
    scroll-margin-top: 80px;
  }

  .section-product {
    min-height: 560px;
    align-items: center;
  }

  .section-cook {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-competitors,
  .section-regional,
  .section-feature,
  .section-workflow {
    grid-template-columns: 1fr;
  }

  .section-rail {
    position: fixed;
    top: 70px;
    right: auto;
    bottom: auto;
    left: 20px;
    z-index: 10;
    display: grid;
    gap: 2px;
    width: 132px;
    margin: 0;
    overflow: visible;
    border-top: 0;
    background: transparent;
    padding: 0;
    backdrop-filter: none;
  }

  .section-rail a {
    justify-self: start;
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }

  .hero-visual {
    max-height: 390px;
  }

  .phone-frame {
    width: min(100%, 360px);
  }

  .workflow-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .workflow-card {
    min-height: 128px;
    padding: 16px;
  }

  .workflow-card:last-child {
    grid-column: auto;
  }

  .workflow-card strong {
    font-size: 18px;
  }

  .workflow-card span {
    font-size: 14px;
  }

  .feature-board {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }

  .feature-showcase {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
    align-items: start;
  }

  .feature-card {
    min-height: 136px;
    padding: 16px;
  }

  .app-surface {
    position: sticky;
    top: 92px;
    min-height: 320px;
  }

  .cook-gallery {
    grid-template-columns: minmax(260px, 1.08fr) minmax(210px, 0.92fr);
    grid-template-rows: 1fr 1fr;
    align-items: stretch;
    height: min(520px, calc(100dvh - 128px));
    min-height: 430px;
    gap: 14px;
  }

  .cook-shot {
    aspect-ratio: auto;
    height: 100%;
    max-width: none;
    max-height: none;
    border-width: 8px;
    border-radius: 30px;
  }

  .cook-shot:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
    aspect-ratio: auto;
    max-width: none;
  }

  .secondary-shot,
  .tertiary-shot {
    aspect-ratio: auto;
    max-height: none;
  }

  .cook-shot .phone-screen {
    display: block;
    border-radius: 22px;
    padding: 22px 18px;
  }

  .cook-shot .phone-status {
    display: flex;
    margin-bottom: var(--space-4);
    font-size: 12px;
  }

  .cook-shot .big-step {
    font-size: 26px;
  }

  .cook-shot .timer-card {
    display: flex;
    margin-top: var(--space-4);
    padding: var(--space-4);
  }

  .cook-shot .timer-card strong {
    font-size: 28px;
  }

  .competitor-table {
    display: table;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-70);
    font-size: 14px;
  }

  .competitor-table thead {
    display: table-header-group;
  }

  .competitor-table tbody {
    display: table-row-group;
  }

  .competitor-table tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .competitor-table th,
  .competitor-table td {
    display: table-cell;
    grid-template-columns: none;
  }

  .competitor-table th::before,
  .competitor-table td::before {
    content: none;
  }

  .competitor-table thead th {
    background: var(--paper-soft);
    color: var(--ink);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

@media (min-width: 1200px) {
  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 46px;
  }

  .section {
    padding: 72px 0;
  }

  .section-cook {
    grid-template-columns: minmax(0, 0.66fr) minmax(560px, 1fr);
    align-items: center;
  }
}
