/* Yeta's dark hardware as a page: the body grey, one light source (the LCD's amber), the shutter key as the only
   button. --ground is the device mock-up's own background, so the phone sits on the page with no visible edge.
   Written phone first; wider screens add columns at the end. */
@font-face {
  font-family: "DotGothic16";
  src: url(/assets/DotGothic16-Latin.otf) format("opentype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #151515;
  --raised: #1d1d1d;
  --ink: #f4f1ea;
  --body: #d6d2c8;
  --muted: #a39f96;
  --rule: #2d2d2d;
  --amber: #ffb305;
  --amber-dim: #8f5400;
  --error: #ff9a8a;
  --gutter: 20px;
}

* { box-sizing: border-box; }

html { background: var(--ground); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.75 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
html[lang="en"] body { line-height: 1.55; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--amber); }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h2:focus-visible { outline: none; }

/* ---- Type ---- */

h1 {
  margin-bottom: 16px;
  font-size: clamp(36px, 10.2vw, 66px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: .005em;
  white-space: pre-line;
}
html[lang="en"] h1 { line-height: 1.06; letter-spacing: -.02em; }

h2 {
  margin-bottom: 18px;
  font-size: clamp(29px, 7.6vw, 46px);
  font-weight: 700;
  line-height: 1.24;
}
html[lang="en"] h2 { line-height: 1.12; letter-spacing: -.015em; }
h2 { white-space: pre-line; text-wrap: balance; }
p, figcaption, li { text-wrap: pretty; }

h3 { font-size: 20px; font-weight: 650; line-height: 1.35; }

.lede { max-width: 32em; margin-bottom: 24px; font-size: 18px; color: var(--body); }
.section-lede { max-width: 34em; margin-bottom: 28px; font-size: 18px; color: var(--body); }
.prose p { max-width: 34em; margin-bottom: 16px; color: var(--body); }
.fine { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* A section's name, in the LCD's own voice: hardware words in capitals. */
.label {
  margin-bottom: 10px;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .08em;
  color: var(--amber);
  text-shadow: 0 0 3px rgba(255, 181, 5, .6);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 13px;
  border-radius: 15px;
  background: #000;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .05em;
  color: var(--amber);
  text-shadow: 0 0 3px rgba(255, 181, 5, .83);
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px var(--amber); }

/* ---- The one button: the app's primary button (Theme.button), flat gold with black type ---- */

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 12px 28px;
  border: 0;
  border-radius: 10px;
  background: #ffc233;
  box-shadow: 0 0 12px rgba(255, 194, 51, .35);
  color: #000;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .08s ease-out, transform .08s ease-out;
}
.key:hover { background: #ffcd55; }
.key:active { background: #ffe08f; transform: scale(.985); }

/* ---- Top ---- */

.top {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 0;
}
/* The logo is italic: its top corner touches its box while the Y's foot starts 4 px in. Moved 2 px so its stroke, not
   its corner, lines up with the text below. */
.brand { display: block; padding: 6px 0; margin-left: 2px; }
.glow { display: block; filter: drop-shadow(0 0 3px rgba(255, 181, 5, .83)) drop-shadow(0 0 7px rgba(255, 181, 5, .45)); }
.logo {
  display: block;
  width: 70px;
  height: 30px;
  background: var(--amber);
  -webkit-mask: url(/yeta-logo.svg) center / contain no-repeat;
  mask: url(/yeta-logo.svg) center / contain no-repeat;
}
.logo-small { width: 56px; height: 24px; }

.lang {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: rgba(21, 21, 21, .7);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.lang[hidden] { display: none; }

/* ---- Hero ---- */

.hero { padding-top: calc(max(14px, env(safe-area-inset-top)) + 66px); }
.hero .chip { margin-bottom: 12px; }
.kicker { margin-bottom: 8px; font-size: 15px; color: var(--muted); }
.hero .key { margin-bottom: 18px; }
.hero-device { margin: 30px 0 0; }

/* ---- Story and method ---- */

.story { padding-top: 76px; padding-bottom: 8px; }

.method { padding: 48px 0 8px; }
.method-grid { display: grid; gap: 30px; }

/* The develop's settings as the app's LCD would print them. */
.readout { margin-top: 24px; padding: 14px 18px; border-radius: 22px; background: #000; }
.readout-title { margin-bottom: 8px; font-size: 13px; line-height: 1.3; color: var(--amber-dim); }
.readout dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; margin: 0; }
.readout dt { font-size: 13px; line-height: 1.3; color: var(--amber-dim); filter: brightness(1.35); }
.readout dd {
  margin: 1px 0 0;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 17px;
  line-height: 1.2;
  color: var(--amber);
  text-shadow: 0 0 3px rgba(255, 181, 5, .83);
}

.crop img { width: 100%; border-radius: 14px; }
.crop figcaption { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---- Looks ---- */

.looks { padding-top: 76px; }

.look-photo { position: relative; aspect-ratio: 4 / 3; margin: 0 calc(var(--gutter) * -1); overflow: hidden; background: #000; }
.look-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .18s linear; }
.look-photo img.fading { opacity: .35; }

.look-now { display: flex; flex-direction: column; min-height: 104px; padding: 14px 0 6px; }
.look-now b {
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--amber);
  text-shadow: 0 0 3px rgba(255, 181, 5, .83);
}
.look-now span { color: var(--body); }

.plates-wrap { display: grid; gap: 18px; }
.plates-wrap h3 { margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.plates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.plates-film { grid-template-columns: repeat(5, 1fr); }

.plate {
  aspect-ratio: 60 / 34;
  min-height: 34px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #000;
  box-shadow: 0 0 0 1px #3a3a3a;
  cursor: pointer;
  transition: box-shadow .12s ease-out;
}
/* The button is smaller than a fingertip across, so its touch area is grown past its edges. */
.plate { position: relative; }
.plate::after { content: ""; position: absolute; inset: -6px -3px; }
.plate img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.plate[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--amber); }

/* ---- A photo to breathe ---- */

.bleed { position: relative; margin-top: 76px; }
.bleed img { width: 100%; }
.bleed figcaption { padding: 8px var(--gutter) 0; font-size: 13px; color: var(--muted); }

/* ---- Controls ---- */

.controls { padding-top: 76px; }

.feature { margin-bottom: 38px; }
.feature h3 { margin: 14px 0 4px; }
.feature p { color: var(--body); }
.feature > img { width: 100%; border-radius: 14px; }

.feature-lcd > img { border-radius: 0; }

.feature-keys { display: grid; grid-template-columns: 76px 1fr; gap: 20px; align-items: center; }
.feature-keys > img { width: 76px; border-radius: 0; }
.feature-keys h3:first-child { margin-top: 0; }

.feature-pair { display: grid; gap: 0; }

.screens { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 14px; margin: 4px calc(var(--gutter) * -1) 36px; padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.screens::-webkit-scrollbar { display: none; }
.screens figure { scroll-snap-align: start; }
.screens img { width: 100%; border-radius: 22px; box-shadow: 0 0 0 1px var(--rule); }
.screens figcaption { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--body); }
.screens b, .specs b, .duo-strip b { display: block; margin-bottom: 2px; font-size: 18px; font-weight: 650; color: var(--ink); }

.specs { display: grid; gap: 22px; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--rule); list-style: none; }
.specs span { color: var(--body); }

/* ---- iPhone Duo ---- */

.duo { padding-top: 76px; }

.duo-strip { display: flex; gap: 14px; padding: 0 var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.duo-strip::-webkit-scrollbar { display: none; }
.duo-strip figure { flex: none; width: 64%; max-width: 330px; scroll-snap-align: start; }
.duo-strip figure.wide { width: 84%; max-width: 480px; }
.duo-strip img { width: 100%; border-radius: 16px; box-shadow: 0 0 0 1px var(--rule); }
.duo-strip figure:last-child img { border-radius: 0; box-shadow: none; }
.duo-strip figcaption { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--body); }
.duo-fine { margin-top: 14px; }

/* ---- From the maker ---- */

.note { padding-top: 76px; }
.note blockquote { margin: 0; }
.note blockquote p { max-width: 24em; font-size: clamp(22px, 5.8vw, 30px); font-weight: 600; line-height: 1.55; }
html[lang="en"] .note blockquote p { line-height: 1.32; }
.note blockquote footer { margin-top: 14px; color: var(--muted); }

/* ---- FAQ ---- */

.faq { padding-top: 76px; }
details { border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-family: "DotGothic16", ui-monospace, monospace; font-size: 22px; line-height: 1; color: var(--amber); }
details[open] summary::after { content: "−"; }
details p { padding-bottom: 18px; color: var(--body); }

/* ---- Sign-up ---- */

/* The page's sign-up: the words, three steps as cards, then the email and the button. */
.join { max-width: 1120px; margin: 0 auto; padding: calc(max(14px, env(safe-area-inset-top)) + 70px) var(--gutter) 44px; }
.join-head .chip { margin-bottom: 16px; }
/* The title breaks only between its two halves, at the comma. */
.join-head h1 { margin-bottom: 18px; white-space: normal; }
.join-head h1 span { display: inline-block; }
html[lang="en"] .join-head h1 span { display: inline; }
.join-body { max-width: 38em; margin-bottom: 64px; }
.join-body p { margin-bottom: 14px; font-size: 18px; color: var(--body); }

.cards-title { margin-bottom: 16px; font-size: 22px; line-height: 1.4; }
.cards { display: grid; gap: 16px; margin-bottom: 72px; }
/* Flat panels, as the app's Settings draws them. */
.card { padding: 28px 24px 30px; border-radius: 18px; background: #1f1f1f; }
/* The LCD's dot type for the step numbers, with its glow kept faint on the flat panel. */
.card-number {
  margin-bottom: 14px;
  font-family: "DotGothic16", ui-monospace, monospace;
  font-size: 40px;
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 3px rgba(255, 181, 5, .55);
}
.card h3 { margin-bottom: 10px; font-size: 21px; }
.card p:not(.card-number) { font-size: 15px; line-height: 1.75; color: var(--body); }
.card p + p:not(.card-number) { margin-top: 14px; }
.card h3 + p { margin-top: 0; }
.card a { overflow-wrap: anywhere; }

form > label:first-child { display: block; margin-bottom: 4px; font-size: 18px; font-weight: 600; }
#email-help { margin-bottom: 10px; }

input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #4b4b4b;
  border-radius: 13px;
  background: #0d0d0d;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  line-height: 1.3;
}
input[type="email"]::placeholder { color: #77736b; }
input[type="email"]:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px rgba(255, 179, 5, .22); }
input[aria-invalid="true"] { border-color: var(--error); }

.check { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin: 18px 0 34px; padding: 4px 0; font-size: 15px; font-weight: 400; line-height: 1.75; color: var(--body); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; border-radius: 6px; accent-color: var(--amber); cursor: pointer; }
/* Asked to tick it: a red ring and a short shake, no message beside it. */
.check.wanted input { outline: 2px solid var(--error); outline-offset: 2px; animation: shake .36s ease-in-out; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Room for a two-line message, so nothing below moves when one appears. */
.status { min-height: 3.2em; margin-top: 12px; text-align: center; font-size: 15px; line-height: 1.6; color: var(--muted); }
.status.error { color: var(--error); }
.status.done { color: var(--amber); }


.test-note { max-width: 48em; }

/* Without script the link still works; a form that can't send is hidden. */
html:not(.js) #form input, html:not(.js) #form label, html:not(.js) #email-help { display: none; }

/* ---- The button that stays in reach, between the hero and the sign-up ---- */

.sticky {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.sticky[hidden] { display: none; }
/* Small on purpose: it shares the screen with what's being read. */
.sticky .key { width: auto; min-height: 46px; padding: 8px 26px; font-size: 16px; pointer-events: auto; box-shadow: 0 0 12px rgba(255, 194, 51, .35), 0 8px 22px rgba(0, 0, 0, .6); }

/* ---- Foot ---- */

.foot { padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; gap: 10px; }
.foot .glow { margin-left: 2px; }
.foot a { color: var(--body); }

/* ---- Wider screens ---- */

@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .plates { max-width: 520px; }
  .hero .key { width: auto; min-width: 240px; }
  .readout dl { grid-template-columns: repeat(4, 1fr); }
  .screens { grid-auto-columns: 300px; }
  .sticky { display: none; }
}

@media (min-width: 980px) {
  :root { --gutter: 28px; }
  .hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: 44px; align-items: center; min-height: 92vh; padding-top: 90px; padding-bottom: 20px; }
  .hero-device { margin: 0; }
  h1 { font-size: clamp(38px, 3.5vw, 50px); }
  .story, .looks, .controls, .duo, .note, .faq { padding-top: 120px; }
  .method { padding-top: 40px; }
  .method-grid { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

  /* The plates beside the picture, so choosing one and seeing it happen fit on one screen. */
  .looks { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); grid-template-rows: auto auto auto auto 1fr; column-gap: 40px; }
  .looks > .label, .looks > h2, .looks > .section-lede { grid-column: 1 / -1; }
  .look-stage { display: contents; }
  .look-photo { grid-column: 1; grid-row: 4 / span 2; margin: 0; border-radius: 16px; }
  .look-now { grid-column: 2; grid-row: 4; min-height: 150px; padding: 0 0 18px; }
  .plates-wrap { grid-column: 2; grid-row: 5; align-self: start; gap: 24px; }
  .plates, .plates-film { grid-template-columns: repeat(3, 1fr); gap: 12px; }

  .bleed { max-width: 1120px; margin: 120px auto 0; padding: 0 var(--gutter); }
  .bleed img { border-radius: 16px; }
  .bleed figcaption { padding-left: 0; }

  .feature-pair { grid-template-columns: 1fr 1fr; gap: 28px; }
  .feature-lcd { max-width: 720px; }
  .screens { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin-left: 0; margin-right: 0; padding: 0; align-items: start; }

  .specs { grid-template-columns: 1fr 1fr; gap: 36px; }

  .duo-strip { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
  .duo-strip figure { width: 250px; }
  .duo-strip figure.wide { width: 400px; }

  .join { padding-top: 110px; padding-bottom: 72px; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 96px; }
  .join-body { margin-bottom: 88px; }
  .get { max-width: 620px; }
  .foot-grid { grid-template-columns: auto auto auto 1fr; align-items: center; gap: 28px; }
  .foot-grid .fine { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
