/* Sonder marketing site. Palette = Operator's Squarespace palette. No third-party assets. */
@font-face {
  font-family: "Anton";
  src: url("media/fonts/anton-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("media/fonts/intertight-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --paper: #f4f4f3;
  --blush: #f6eaf3;
  --char: #383838;
  --ink: #000000;
  --gutter: 16px;
  --head: 64px;
  --radius: 24px;
  --col: max(var(--gutter), calc((100% - 1240px) / 2));
  --display: "Anton", "Bahnschrift Condensed", "Arial Narrow", Impact, sans-serif;
  --text: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (min-width: 900px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--head); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible, .foot :focus-visible { outline-color: var(--white); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 8px; }

.display {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: .005em;
  font-size: clamp(44px, 8vw, 124px);
  text-wrap: balance;
}
.display.sm { font-size: clamp(34px, 5vw, 72px); }
#inbox .display { font-size: clamp(44px, min(8vw, 13svh), 124px); }
.eyebrow {
  font-weight: 650; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px; color: var(--char);
}
.dark .eyebrow { color: var(--paper); opacity: .8; }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--white); border: 2px solid var(--ink);
  font: 650 14px/1 var(--text); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.pill:hover { background: var(--char); border-color: var(--char); }
.pill.big { padding: 16px 28px; font-size: 16px; }
.pill.ghost { background: transparent; color: var(--ink); }
.pill.ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.round {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; color: inherit; border: 2px solid currentColor;
  font: 600 20px/1 var(--text); cursor: pointer;
}
.round:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--head);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  background: rgb(244 244 243 / .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgb(0 0 0 / .08);
  transition: background-color .25s, color .25s, border-color .25s, transform .25s;
}
/* Short screens: the header slides away once you scroll (class set by app.js). It stays focusable
   and slides back, solid, while anything inside it has keyboard focus. */
.top.away { transform: translateY(-100%); }
.top.away:focus-within { transform: none; }
.logo { font-family: var(--display); font-size: 30px; line-height: 1; text-decoration: none; letter-spacing: .01em; }
.top nav { margin-left: auto; }
.top .pill { margin-left: auto; white-space: nowrap; }
.top nav + .pill { margin-left: 0; }
.chapters { display: none; list-style: none; margin: 0; padding: 0; gap: 22px; }
.chapters a {
  text-decoration: none; font-weight: 550; font-size: 14px; color: var(--char);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.chapters a:hover { color: var(--ink); }
.chapters a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 719px) {
  :root { --head: 104px; }
  .top { flex-wrap: wrap; align-content: center; row-gap: 0; }
  .top nav + .pill { margin-left: auto; }
  .top nav { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); overflow-x: auto; scrollbar-width: none; }
  .chapters { display: flex; gap: clamp(14px, 5vw - 1px, 20px); padding: 6px var(--gutter); white-space: nowrap; }
  .chapters a { display: inline-block; padding: 8px 0; }
  .top { column-gap: 12px; }
  .top .pill { padding-inline: 16px; }
}
@media (min-width: 720px) { .chapters { display: flex; gap: 18px; } .top { gap: 20px; } }
@media (min-width: 900px) { .chapters { gap: 22px; } .top { gap: 24px; } }

/* 01 Inbox: headline + the app playing in a phone */
.hero { background: var(--blush); }
.stage {
  display: grid; gap: 40px; align-items: center; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--head) + 32px) var(--col) 56px;
}
.hero-copy { max-width: 760px; }
.hero-copy .lede { font-size: 19px; font-weight: 500; margin: 18px 0 20px; }
.beats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.beats li { font-weight: 650; font-size: 18px; padding-left: 14px; border-left: 3px solid currentColor; }
@media (min-width: 900px) { .stage { grid-template-columns: minmax(0, 1.25fr) auto; gap: 64px; } }
@media (max-height: 500px) { html { scroll-padding-top: 0; } }

/* Phone frame around a recorded app clip (hero + Sales) */
.device { margin: 0; justify-self: center; display: grid; justify-items: center; gap: 14px; }
.device video {
  width: min(74vw, 300px); height: auto; aspect-ratio: 720 / 1558; object-fit: cover;
  border: 8px solid var(--ink); border-radius: 36px; background: var(--ink);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .45);
}
@media (min-width: 900px) { .device video { width: auto; height: min(68svh, 640px); } }
.device img {
  width: min(74vw, 300px); height: auto; aspect-ratio: 720 / 1558; object-fit: cover;
  border: 8px solid var(--ink); border-radius: 36px; background: var(--ink);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .45);
}
@media (min-width: 900px) { #join { grid-template-columns: minmax(0, 1fr) auto; } .device img { width: auto; height: min(68svh, 640px); } }

/* Marquee */
.marquee { position: relative; background: var(--ink); color: var(--white); overflow: hidden; padding: 18px 0; }
.marquee-track {
  display: flex; width: max-content; gap: 0;
  font-family: var(--display); text-transform: uppercase; font-size: clamp(24px, 3.4vw, 40px); line-height: 1;
  animation: marquee 36s linear infinite;
}
.marquee-track span { white-space: nowrap; padding-right: 48px; }
.marquee-track span::after { content: "✦"; margin-left: 48px; font-size: .6em; vertical-align: .25em; }
@keyframes marquee { to { transform: translateX(-50%); } }

.motion-paused .marquee-track { animation-play-state: paused; }

/* Chapters */
.chapter { padding: clamp(72px, 11vw, 150px) var(--col); }
.paper { background: var(--paper); }
.blush { background: var(--blush); }
.white { background: var(--white); }
.dark { background: var(--ink); color: var(--white); }
.chapter > .display, .chapter .display + p { max-width: 16ch; }
.chapter .display + p { max-width: 46ch; margin-top: 22px; font-size: 18px; }
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }

/* Accordion (native details) */
.accordion { margin-top: 32px; border-top: 2px solid var(--ink); }
.accordion details { border-bottom: 2px solid var(--ink); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 16px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--display); text-transform: uppercase; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.05;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; content: "+" / ""; font-family: var(--text); font-weight: 400; font-size: 28px; }
.accordion details[open] summary::after { content: "–"; content: "–" / ""; }
.accordion details p { padding: 0 0 18px 0; max-width: 52ch; color: var(--char); }


/* 03 Sales */
.sales-top { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .sales-top { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; } }
.sales-head { max-width: 760px; }
.big-num {
  display: block; font-family: var(--display); line-height: .8; margin: 0 0 12px;
  font-size: clamp(150px, 27vw, 360px); letter-spacing: -.01em;
}
.big-num span { font-size: .42em; vertical-align: .95em; margin-left: .04em; }
.sales-head .display + p { margin-top: 18px; }
@media (min-width: 900px) {
  #sales .big-num { font-size: clamp(150px, 19vw, 300px); }
  #sales .sales-head { max-width: none; }
  /* "80%" and the headline side by side, bottoms aligned (heading text stays one h2) */
  #sales .sales-head h2 { display: flex; align-items: flex-end; gap: clamp(24px, 4vw, 64px); }
  #sales .sales-head h2 .big-num { margin: 0; flex: none; }
  #sales .sales-head .display + p { max-width: 46ch; }
}

/* 04 Control */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 40px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps li { border-top: 2px solid var(--ink); padding-top: 20px; }
.steps .n { display: block; font-family: var(--display); font-size: 64px; line-height: 1; margin-bottom: 12px; }
.steps h3 { font-family: var(--display); text-transform: uppercase; font-size: 32px; line-height: 1; margin-bottom: 12px; }
.steps p { color: var(--char); max-width: 36ch; }

/* 05 Inside */
.phones {
  display: flex; gap: 28px; margin-top: 56px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 12px; scrollbar-width: thin;
}
.phones figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; width: min(78vw, 280px); }
@media (min-width: 768px) {
  .phones { justify-content: center; overflow: visible; }
  .phones figure { flex: 0 1 280px; width: auto; min-width: 0; }
}
.phones img {
  width: 100%; height: auto; border-radius: 38px; border: 8px solid var(--char);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6);
}
.phones figcaption { margin-top: 16px; font-weight: 550; color: var(--paper); }
/* Sales: four screens in one row; scrolls sideways (with a peek) until there is room for all four */
#sales .phones { margin-top: 48px; }
@media (min-width: 768px) and (max-width: 1099px) {
  #sales .phones { justify-content: flex-start; overflow-x: auto; }
  #sales .phones figure { flex: 0 0 auto; width: 260px; }
}
@media (min-width: 1100px) { #sales .phones figure { flex: 0 1 250px; } }
@media (max-width: 1099px) {
  #sales .phones {
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    padding-bottom: 80px; margin-bottom: -68px; outline-offset: -3px;
  }
}

/* 06 Join */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.copy-status { min-height: 1.5em; font-size: 14px; color: var(--char); }

/* Footer */
.foot { background: var(--ink); color: var(--paper); padding: 56px var(--col); font-size: 14px; }
.foot .logo { font-size: 48px; color: var(--white); margin-bottom: 18px; }
.foot p { margin: 0 0 6px; }

/* Contact dialog (native) */
.contact {
  width: min(520px, calc(100% - 32px)); border: 0; border-radius: var(--radius);
  padding: 20px 28px 28px; background: var(--blush); color: var(--ink);
}
.contact::backdrop { background: rgb(0 0 0 / .55); }
.contact:focus-visible { outline-color: var(--white); }
.contact .close-row { display: flex; justify-content: flex-end; margin: 0; }
.contact .display { margin-bottom: 14px; }
.contact .cta-row { margin-top: 12px; }
.contact .pill.big { font-size: clamp(13px, 3.9vw, 15px); padding-inline: 18px; word-break: normal; overflow-wrap: anywhere; text-align: center; }

/* Reduced motion and no-JS share one static layout */
@media (prefers-reduced-motion: reduce), (scripting: none) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; padding: 0 var(--gutter); row-gap: 12px; column-gap: 24px; font-size: min(clamp(24px, 3.4vw, 40px), 6vw); }
  .marquee-track span { padding-right: 0; }
  .marquee-track span::after { margin-left: 24px; }
  .marquee-track span:nth-child(n + 5) { display: none; }
  .pill, .top { transition: none; }
  .top.away { transform: translateY(-100%); }
}
@media (scripting: none) { [data-copy] { display: none; } }
