@font-face {
  font-family: Inter;
  src: url("inter-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("inter-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #faf7ee;
  --paper: #fffdf7;
  --forest: #102a20;
  --ink: #142219;
  --basil: #247453;
  --basil-deep: #185a40;
  --sage: #e4ece6;
  --frame: #101813;
  --radius: 1.25rem;
  --control-radius: 0.375rem;
  --edge: clamp(1rem, 2.8vw, 2.5rem);
  --copy: 1.0625rem;
  --small: 0.9375rem;
  --heading: clamp(2rem, 3.7vw, 3.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--ink);
  background: var(--cream);
  font: 400 100%/1.55 Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
a { color: inherit; text-underline-offset: 0.22em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--basil); outline-offset: 4px; }
[id] { scroll-margin-top: 1rem; }

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.048em;
  line-height: 1.04;
}

h2 { font-size: var(--heading); text-wrap: balance; }
p { font-size: var(--copy); max-width: 61ch; }
.wrap { width: min(100% - 2 * var(--edge), 84rem); margin-inline: auto; }

.sr-only, .skip-link:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  position: absolute;
  z-index: 5;
  inset: 0.75rem auto auto 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--paper);
}

.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
}

.site-header { min-height: 5rem; }
.site-header nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 1.35rem; }
.site-header nav a, .site-footer a { text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current], .site-footer a:hover { text-decoration: underline; }
.site-header nav a, .site-footer nav a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand { flex: 0 0 auto; width: clamp(8.6rem, 14vw, 11.5rem); }

.home-header, .hero {
  background: var(--forest);
  color: var(--paper);
}

.home-header :focus-visible, .hero :focus-visible, .photo-next :focus-visible {
  outline-color: var(--sage);
}

.hero { overflow: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  column-gap: clamp(1rem, 4vw, 4rem);
  padding-block: clamp(2.25rem, 4.2vw, 4.5rem);
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.intro h1 { font-size: clamp(2.5rem, 5.7vw, 5.5rem); }
.intro p { max-width: 36ch; }
.primary-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--control-radius);
  background: var(--sage);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.primary-action:hover { background: var(--paper); text-decoration: none; }

.hero-devices {
  --device-size: min(44%, 17.25rem);
  position: relative;
  min-height: clamp(25rem, 43vw, 36.5rem);
  display: grid;
  align-items: center;
}

.hero-table {
  position: absolute;
  inset: 8% 0 auto;
  width: 100%;
  height: 84%;
  object-fit: cover;
  object-position: 10% center;
  opacity: 0.72;
  border-radius: var(--radius);
}

.hero-stack .phone { padding: 0.36rem; }
.hero-stack .hero-front { width: var(--device-size); position: relative; z-index: 1; justify-self: end; margin-right: 10%; }
.hero-stack .hero-back { width: min(41%, 15.4rem); position: absolute; top: 10%; left: 16%; }
.hero-stack figcaption { margin-top: 0.65rem; }

.phone {
  display: block;
  width: 100%;
  border-radius: 13% / 6.1%;
  padding: 2.5%;
  background: var(--frame);
}

.phone img { width: 100%; border-radius: 11.5% / 5.2%; }

figcaption {
  font-size: var(--small);
  font-weight: 700;
  text-align: center;
}

.walkthrough { padding-block: clamp(3.25rem, 8vw, 7.75rem); }
.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3.75rem);
}

.section-intro p { max-width: 34ch; }
.walkthrough-stages {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1.26fr);
  align-items: end;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.walkthrough-stage {
  --stage-height: clamp(10rem, 20vw, 17rem);
  --tile: var(--sage);
  display: grid;
  grid-template-rows: auto auto minmax(4.95em, auto);
  gap: 0.7rem;
}

.walkthrough-stage:nth-child(2) {
  --stage-height: clamp(11rem, 23vw, 20rem);
  --tile: var(--basil-deep);
}

.walkthrough-stage:nth-child(3) {
  --stage-height: clamp(12rem, 26vw, 23rem);
  --tile: var(--forest);
}

.walkthrough-image {
  height: var(--stage-height);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: clip;
  padding-top: clamp(0.8rem, 2vw, 1.75rem);
  border-radius: var(--radius);
  background: var(--tile);
}

.walkthrough-image img {
  width: min(76%, 17rem);
  border-radius: 0.9rem 0.9rem 0 0;
}

.walkthrough-stage h3 { font-size: clamp(1.25rem, 2.15vw, 1.65rem); margin-top: 0.35rem; }
.walkthrough-stage p { max-width: 33ch; }

.cook { background: var(--sage); }
.cook-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}

.cook-copy h2, .photo-copy h2 { margin-bottom: 1rem; }
.cook-copy p, .photo-copy p { max-width: 36ch; }
.preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  padding: 0;
  margin: 1.35rem 0 0;
  border: 0;
}

.preview-choice { position: relative; }
.preview-choice label {
  display: block;
  padding: 0.68rem clamp(0.55rem, 1.2vw, 0.95rem);
  border-radius: var(--control-radius);
  cursor: pointer;
  background: var(--paper);
  font-weight: 700;
  font-size: var(--small);
}

.preview-choice label:hover { background: var(--cream); }
.preview-choice input:checked + label { background: var(--forest); color: var(--paper); }
.preview-choice input:focus-visible + label { outline: 3px solid var(--basil); outline-offset: 3px; }

.cook-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 32rem;
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.45rem 1rem 1.15rem;
}

.shot {
  width: 100%;
  display: none;
  place-items: center;
  gap: 0.75rem;
}

.shot .phone { width: min(100%, 13.75rem); padding: 0.33rem; }

.shot[data-screen="method"] { display: grid; }
.cook:has(#preview-cooking:checked) .shot[data-screen="method"],
.cook:has(#preview-saved:checked) .shot[data-screen="method"] { display: none; }
.cook:has(#preview-cooking:checked) .shot[data-screen="cooking"],
.cook:has(#preview-saved:checked) .shot[data-screen="saved"] { display: grid; }

.photo-next { background: var(--forest); color: var(--paper); }

.photo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 5rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}

.photo-copy p + p { margin-top: 0.75rem; }
.photo-figure { overflow: clip; border-radius: var(--radius); }
.photo-figure img { width: 100%; }

.site-footer { min-height: 8rem; }
.site-footer p, .site-footer nav { font-size: var(--small); }
.footer-brand { font-weight: 700; }
.site-footer p a { text-decoration: underline; }

.utility-wrap { width: min(100% - 2 * var(--edge), 53rem); margin-inline: auto; }

.utility-hero {
  background: var(--forest);
  color: var(--paper);
  padding-block: clamp(3.25rem, 7vw, 6rem);
}

.utility-hero h1 { font-size: clamp(2.75rem, 6vw, 5rem); margin-bottom: 0.85rem; text-wrap: balance; }
.utility-content { padding-block: clamp(2.5rem, 6vw, 5rem); display: grid; gap: clamp(2rem, 4vw, 3rem); }
.utility-content h2 { font-size: clamp(1.375rem, 2.8vw, 2rem); margin-bottom: 0.6rem; text-wrap: pretty; }
.utility-content p + p { margin-top: 0.85rem; }
.utility-content a { color: var(--basil-deep); }

@media (max-width: 49rem) {
  .hero-grid, .section-intro, .cook-grid, .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { row-gap: 1.5rem; }
  .intro h1 { font-size: clamp(2.25rem, 11.75vw, 4.5rem); }
  .hero-devices { width: min(100%, 32rem); min-height: 0; margin-inline: auto; }
  .hero-stack .hero-front { width: min(48%, 14.75rem); }
  .hero-stack .hero-back { width: min(43%, 13.25rem); top: 12%; left: 10%; }
  .walkthrough-stages { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .walkthrough-stage { grid-template-rows: auto; }
  .walkthrough-stage, .walkthrough-stage:nth-child(2), .walkthrough-stage:nth-child(3) {
    --stage-height: clamp(12rem, 67vw, 25rem);
  }
  .walkthrough-image img { width: min(70%, 16rem); }
  .walkthrough-stage h3 { margin-top: 0; }
  .cook-stage { min-height: 0; }
  .photo-figure { max-width: 43rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-action, .preview-choice label {
    transition: transform 160ms var(--ease-out);
  }

  .primary-action:active, .preview-choice label:active { transform: translateY(2px); }
  .intro > * { animation: enter 650ms var(--ease-out) both; }
  .intro > p { animation-delay: 75ms; }
  .intro > a { animation-delay: 150ms; }
  .hero-back { animation: fans-out 780ms var(--ease-out) both; }
  .hero-front { animation: enter 840ms var(--ease-out) both; }
  .hero-stack figcaption { animation: appear 620ms var(--ease-out) both; }
  .shot > * { animation: appear 270ms var(--ease-out) both; }
  .arrive { animation: enter 600ms var(--ease-out) both; }
  .arrive:nth-child(2) { animation-delay: 75ms; }
  .arrive:nth-child(3) { animation-delay: 150ms; }
  .photo-figure.arrive img { animation: settle-in 1150ms var(--ease-out) both; }
}

@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fans-out { from { opacity: 0; transform: translateX(12%) rotate(3deg); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle-in { from { transform: scale(1.055); } to { transform: none; } }

@media (max-width: 35rem) {
  .site-header { min-height: 4.25rem; }
  .site-header nav, .site-footer nav { gap: 0 0.95rem; font-size: var(--small); }
  .site-header nav a[href$="#demo"], .site-header nav .home-section-link { display: none; }
  .site-footer { justify-content: flex-start; flex-wrap: wrap; gap: 0.35rem 1.25rem; padding-block: 1rem; }
  .site-footer p { flex-basis: 100%; }
}
