/* Colors are the Mise app's own semantic tokens (Assets.xcassets color sets). */
:root {
  color-scheme: light dark;
  --bg: #f3f5f1;
  --card: #ffffff;
  --fg: #1b221c;
  --muted: #5b665d;
  --line: #d9dfd8;
  --accent: #4e6e53;
  --accent-fg: #ffffff;
  --accent-soft: #89a58c;
  --accent-soft-fg: #17241a;
  --danger: #b32620;
  --phone: #1b221c;
  --tile-dark: var(--fg); /* surface of the cook tile: the light foreground in light mode, the dark card in dark mode */
  --hdr: 53px; /* sticky header height, for scroll offsets */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161a17;
    --card: #1f2520;
    --fg: #e9eee8;
    --muted: #a3aea4;
    --line: #343d36;
    --accent: #89a58c;
    --accent-fg: #142017;
    --accent-soft: #46524b;
    --accent-soft-fg: #e9eee8;
    --danger: #f2b8b5;
    --phone: #0b0e0c;
    --tile-dark: var(--card);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  overflow-x: clip;
}
@media (max-width: 899px) { body.home { --hdr: 93px; } }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-fg); padding: 0.6rem 1.1rem; border-radius: 999px; z-index: 50; }
.skip:focus { top: 0.75rem; }
#main, .chapter, #waitlist, .features, .group, .tile { scroll-margin-top: var(--hdr); }

/* Global nav: slim sticky bar, translucent, hairline appears after scrolling. */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.bar {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand end" "jobs jobs";
  align-items: center; column-gap: 1rem;
  width: min(100% - 2rem, 80rem); margin-inline: auto;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 0.5rem; height: 52px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; display: block; }
.bar-end { grid-area: end; justify-self: end; display: flex; align-items: center; gap: 0.35rem; }
.jobs-nav { grid-area: jobs; display: flex; gap: 0.25rem; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; }
.jobs-nav::-webkit-scrollbar { display: none; }
.jobs-nav a { flex: none; scroll-snap-align: center; display: inline-flex; align-items: center; height: 32px; padding: 0 0.95rem; border-radius: 999px; color: var(--muted); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.jobs-nav a:hover { color: var(--fg); }
.jobs-nav a.is-current { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }

.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem; height: 32px; padding: 0 0.6rem; border-radius: 999px; color: var(--fg); font-size: 0.875rem; font-weight: 600; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.chev { flex: none; transition: transform 0.2s ease; }
.lang-menu[open] .chev { transform: rotate(180deg); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 12rem; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.3); }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.75rem; border-radius: 9px; color: var(--fg); font-size: 0.95rem; text-decoration: none; }
.lang-list a span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.lang-list a:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.lang-list a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 600; }

.pill-cta { display: inline-flex; align-items: center; height: 32px; padding: 0 0.95rem; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: 0.875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pill-cta:hover { filter: brightness(1.08); }

@media (max-width: 479px) { .brand span { display: none; } }
@media (min-width: 900px) {
  .bar { grid-template-columns: 1fr auto 1fr; grid-template-areas: "brand jobs end"; }
  .jobs-nav { padding-bottom: 0; overflow: visible; }
}

/* Type */
h1, h2, h3, h4 { text-wrap: balance; }
h1, h2 { margin: 0; }
.eyebrow { margin: 0 0 0.75rem; color: var(--accent); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; }
.lead { color: var(--muted); font-size: 1.2rem; max-width: 34rem; margin: 1.25rem 0 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.75rem;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-fg);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-soft { background: var(--accent-soft); color: var(--accent-soft-fg); }

/* The one phone component: App Store screens in a dark bezel. --w is set where it is used. */
.phone {
  width: var(--w, min(70vw, 340px)); margin: 0 auto; padding: calc(var(--w, min(70vw, 340px)) * 0.026);
  background: var(--phone); border-radius: 15% / 6.9%;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.25);
}
.phone picture { display: block; }
.phone img { display: block; width: 100%; height: auto; border-radius: 12.5% / 5.75%; }

/* Hero */
.hero { text-align: center; padding: clamp(4.5rem, 12vh, 9rem) 1.25rem 0; overflow: hidden; }
.hero h1 { font-size: clamp(2rem, 6.4vw, 5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; max-width: 22ch; margin-inline: auto; }
.hl { color: var(--accent); }
.hero .lead { text-wrap: balance; font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.35; max-width: 36rem; margin: 1.25rem auto 2rem; }
.hero-cta { margin: 0; }
.note { margin: 1rem 0 0; color: var(--muted); font-size: 0.875rem; }
/* Five phones in a fan, the center one cropped by the hero's bottom edge (a hard crop, the first tile starts there). */
.hero-shots {
  --pw: min(72vw, 340px);
  position: relative; display: flex; justify-content: center;
  height: calc(var(--pw) * 1.55); margin-top: clamp(3rem, 7vw, 5rem);
}
.hero-shots .phone-main { --w: var(--pw); position: relative; z-index: 2; margin: 0; align-self: flex-start; }
.hero-shots .phone-side { --w: calc(var(--pw) * var(--sw)); display: none; position: absolute; top: calc(var(--pw) * var(--oy)); left: 50%; margin: 0; }
.hero-shots .phone-l1, .hero-shots .phone-r1 { --sw: 0.84; --ox: 0.88; --oy: 0.14; z-index: 1; }
.hero-shots .phone-l2, .hero-shots .phone-r2 { --sw: 0.68; --ox: 1.58; --oy: 0.31; z-index: 0; }
.hero-shots .phone-left { transform: translateX(calc(-50% - var(--pw) * var(--ox))); }
.hero-shots .phone-right { transform: translateX(calc(-50% + var(--pw) * var(--ox))); }
@media (min-width: 734px) {
  .hero-shots { --pw: min(30vw, 340px); }
  .hero-shots .phone-side { display: block; }
  .hero-shots .phone-outer { display: none; }
}
@media (min-width: 1024px) {
  .hero-shots { --pw: min(25vw, 340px); }
  .hero-shots .phone-outer { display: block; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-shots .phone-left { animation: drift-left 0.9s ease-out 0.15s both; }
  .hero-shots .phone-right { animation: drift-right 0.9s ease-out 0.15s both; }
  .hero-shots .phone-outer { animation-delay: 0.25s; }
}
@keyframes drift-left {
  from { opacity: 0; transform: translateX(calc(-50% - var(--pw) * var(--ox) * 0.6)); }
  to { opacity: 1; transform: translateX(calc(-50% - var(--pw) * var(--ox))); }
}
@keyframes drift-right {
  from { opacity: 0; transform: translateX(calc(-50% + var(--pw) * var(--ox) * 0.6)); }
  to { opacity: 1; transform: translateX(calc(-50% + var(--pw) * var(--ox))); }
}

/* Chapter tiles */
.tiles { display: grid; gap: 0; max-width: 1680px; margin-inline: auto; }
.chapter, .row { display: grid; gap: 0; }
.tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden;
  padding: clamp(4.5rem, 10vw, 8.75rem) 1.25rem clamp(3.5rem, 7vw, 6rem);
}
.tile-card { background: var(--card); }
.tile-bg { background: var(--bg); border-block: 1px solid var(--line); }
.tile-dark {
  --fg: #e9eee8; --muted: #a3aea4; --accent: #89a58c; --accent-fg: #142017; --line: #343d36; --card: #1f2520; --phone: #0b0e0c;
  background: var(--tile-dark); color: var(--fg); border-block: 0;
}
.tile-text { max-width: 680px; }
.tile h2, .waitlist h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.sub { margin: 0.9rem 0 0; color: var(--muted); font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.35; }
.stage { width: 100%; display: flex; justify-content: center; align-items: flex-start; margin-top: 3rem; }
.tile-full .phone { --w: min(70vw, 340px); }
.tile-up { padding-bottom: 0; }
.tile-up .phone { --w: min(64vw, 300px); }
.tile-up .stage { height: calc(min(64vw, 300px) * 1.34); overflow: hidden; }

@media (min-width: 734px) {
  .tiles { gap: 12px; padding-inline: 12px; }
  .chapter, .row { gap: 12px; }
  .tile { border-radius: 28px; }
  .tile-bg { border-inline: 1px solid var(--line); }
  .tile-dark { border: 0; }
}
@media (min-width: 1024px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .tile-up h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
  .tile-up .sub { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); }
}

/* Gallery in the Save tile: snap row of phones with captions, round buttons and dots below. */
.stage-gallery { display: flex; justify-content: center; }
.gallery { --w: min(70vw, 340px); width: min(calc(100% + 2.5rem), 820px); flex: none; position: relative; }
.slides {
  position: relative; display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
  padding: 20px calc(50% - var(--w) / 2) 80px; margin-block: -20px -56px; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
.slide { flex: none; width: var(--w); margin: 0; scroll-snap-align: center; }
.slide figcaption { margin: 1.5rem auto 0; max-width: 22ch; color: var(--muted); font-size: 0.9375rem; font-weight: 500; line-height: 1.35; text-align: center; text-wrap: balance; }
.gallery-ctl { display: none; position: relative; z-index: 1; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.gallery.has-js .gallery-ctl { display: flex; }
.gbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--fg); cursor: pointer; }
.gbtn:hover:not(:disabled) { background: color-mix(in srgb, var(--fg) 8%, var(--card)); }
.gbtn:disabled { opacity: 0.4; cursor: default; }
.dots { display: flex; align-items: center; gap: 12px; }
.dot { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.dot::after { content: ""; position: absolute; inset: -8px; }
.dot[aria-current="true"] { background: var(--fg); }
@media (min-width: 734px) {
  .gallery { -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
}

/* Hover on tiles (mouse only): the phone lifts a little. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tile .phone { transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 450ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .tile:hover .phone { transform: translateY(-8px); box-shadow: 0 40px 70px -24px rgb(0 0 0 / 0.3); }
  .tile-up:hover .phone { transform: translateY(-12px); }
}

/* Reveal on scroll (reveal.js adds will-reveal below the fold, is-in when seen). */
.reveal.will-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.will-reveal.is-in { opacity: 1; transform: none; }
.row-2 > .tile:nth-child(2).will-reveal { transition-delay: 80ms; }

/* Feature index: four columns of one-line items that open. */
.wrap { width: min(100% - 2.5rem, 80rem); margin-inline: auto; }
.features { padding-block: clamp(6rem, 12vw, 10rem) clamp(4rem, 8vw, 7rem); }
.feat-head { text-align: center; max-width: 42rem; margin: 0 auto clamp(2.5rem, 6vw, 4.5rem); }
.feat-head h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.feat-head p { margin: 0.9rem 0 0; color: var(--muted); font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 500; }
.feat-cols { display: grid; grid-template-columns: 1fr; gap: 3rem 2.5rem; align-items: start; }
.group-h { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; font-size: 1.125rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.gicon { display: inline-flex; color: var(--accent); }
.gicon .ico { width: 20px; height: 20px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { border-top: 1px solid var(--line); }
.group:not(.group-home) .items li:last-child { border-bottom: 1px solid var(--line); }
.items summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; font-size: 0.97rem; font-weight: 500; line-height: 1.3; }
.items summary::-webkit-details-marker { display: none; }
.items summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 3px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease; }
.items details[open] > summary::after { transform: rotate(225deg); }
.items details p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.group-home { margin-top: clamp(3rem, 6vw, 4.5rem); }
.group-home .items { display: grid; grid-template-columns: 1fr; column-gap: 2.5rem; align-items: start; }
@media (min-width: 734px) {
  .feat-cols { grid-template-columns: repeat(2, 1fr); }
  .group-home .items { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .feat-cols { grid-template-columns: repeat(4, 1fr); }
  .group-home .items { grid-template-columns: repeat(4, 1fr); }
}

/* Waitlist tile and forms */
.tiles-end { margin-top: 0; }
.waitlist { padding-block: clamp(5rem, 10vw, 8rem); }
.signup { display: grid; gap: 1.1rem; margin-top: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
input[type="email"], input[type="text"] {
  width: 100%; min-height: 48px; padding: 0 1.25rem; font: inherit; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
}
input[type="email"]:focus-visible, input[type="text"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder { color: var(--muted); opacity: 1; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; }
.check input { flex: none; width: 1.35rem; height: 1.35rem; margin: 0.1rem 0 0; accent-color: var(--accent); }
.check label { cursor: pointer; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: grid; gap: 0.9rem; justify-items: start; }
.consent { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.msg { margin: 0; min-height: 1.5em; font-size: 0.9rem; font-weight: 600; }
.msg.is-ok { color: var(--accent); }
.msg.is-error { color: var(--danger); }

.waitlist .signup { width: 100%; max-width: 40rem; margin: 2.5rem auto 0; text-align: left; }
.waitlist .actions { display: contents; }
.waitlist .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.waitlist .btn { width: 100%; min-height: 48px; }
.waitlist .check { justify-content: center; }
.waitlist .consent, .waitlist .msg { text-align: center; }
@media (min-width: 734px) {
  .waitlist .signup {
    grid-template-columns: 1fr auto; column-gap: 0.75rem; row-gap: 1.1rem;
    grid-template-areas: "field btn" "check check" "consent consent" "msg msg";
  }
  .waitlist .field { grid-area: field; }
  .waitlist .btn { grid-area: btn; width: auto; }
  .waitlist .check { grid-area: check; }
  .waitlist .consent { grid-area: consent; }
  .waitlist .msg { grid-area: msg; }
}

/* Privacy and message pages */
.prose { width: min(100% - 2.5rem, 40rem); margin-inline: auto; padding-block: 3rem; }
.prose h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; }
.prose .lead { margin-top: 1rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8125rem; }
.foot-in { width: min(100% - 2.5rem, 80rem); margin-inline: auto; padding-block: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; }
.foot p { margin: 0; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--fg); text-decoration: underline; }
.foot-line a { margin-left: 1rem; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.foot-langs a[aria-current="page"] { color: var(--fg); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal.will-reveal { opacity: 1; transform: none; transition: none; }
}

/* Printing: nothing waits for a scroll. */
@media print { .will-reveal { opacity: 1 !important; transform: none !important; } .top { position: static; } }
