/* Stronger landing page. Colour chapters: each section is one flat field.
   Colours are taken from the app as Material You paints it on the phone the
   screenshots came from, plus one cool chapter for the import. */

@font-face { font-family: "GSF Round"; src: url("assets/fonts/gsf_r100_w800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "GSF"; src: url("assets/fonts/gsf_r50_w400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "GSF"; src: url("assets/fonts/gsf_r50_w500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "GSF"; src: url("assets/fonts/gsf_r50_w700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --rose: #d05560;
  --blush: #fff0ef;
  --paper: #fff8f7;
  --pink: #fcacab;
  --oxblood: #240407;
  --oxblood-up: #3a0d12;
  --mint: #c4f0d9;
  --pine: #06281b;
  --band: #ffe3e1;

  --display: "GSF Round", "Google Sans Flex", system-ui, sans-serif;
  --text: "GSF", "Google Sans Flex", system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-say: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);

  --m: clamp(16px, 3vw, 44px);
  --r: 28px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;

  --top-bg: #d05560;
  --top-ink: #240407;
  --top-btn: #240407;
  --top-btn-ink: #fff0ef;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--text); font-size: var(--step-body); line-height: 1.5; background: var(--oxblood); color: var(--oxblood); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--oxblood); color: var(--blush); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }

h2 { font-family: var(--display); font-weight: 800; font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-wrap: balance; }

.chapter { position: relative; padding: clamp(96px, 13vh, 160px) var(--m) clamp(72px, 11vh, 140px); min-height: 90svh; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; background: var(--oxblood); color: var(--blush); font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color 300ms ease, color 300ms ease; }
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.96); }
.btn-big { min-height: 60px; padding: 0 34px; font-size: var(--step-lead); }
.plain-link { font-weight: 500; text-underline-offset: 0.2em; text-decoration-thickness: 2px; transition: text-underline-offset var(--t-hover) ease; }
.plain-link:hover { text-underline-offset: 0.36em; }

/* ---------- fixed corners ---------- */
.top { position: fixed; z-index: 10; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px var(--m); color: var(--top-ink); background: var(--top-bg); transition: color 300ms ease, background-color 300ms ease; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: var(--step-lead); letter-spacing: -0.02em; text-decoration: none; }
.mark svg { transition: transform 500ms var(--ease-out); }
.mark:hover svg { transform: rotate(90deg); }
.top-links { display: flex; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; }
.top-links a { font-weight: 500; padding: 6px 0; text-decoration: underline 2px transparent; text-underline-offset: 0.5em; transition: text-decoration-color var(--t-hover) ease, text-underline-offset var(--t-hover) var(--ease-out); }
.top-links a:hover { text-decoration-color: currentColor; text-underline-offset: 0.3em; }
.btn-top { background: var(--top-btn); color: var(--top-btn-ink); }

/* ---------- hero ---------- */
.hero { background: var(--rose); min-height: 100svh; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; grid-template-rows: auto 1fr; padding-top: 13svh; padding-bottom: 0; overflow: hidden; }
.hero-title { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 1; font-family: var(--display); font-weight: 800; font-size: clamp(88px, 14vw, 240px); line-height: 0.82; letter-spacing: -0.045em; margin-left: -0.04em; }
.hero-title span { display: block; }
.hero-title .pale { color: var(--blush); }
.hero-title .dark { color: var(--oxblood); }
.hero-foot { grid-column: 1 / span 4; grid-row: 2; align-self: end; margin-top: clamp(44px, 5.5vw, 96px); padding-bottom: clamp(28px, 5vh, 56px); display: grid; gap: 22px; }
.hero-foot p { max-width: 34ch; font-weight: 500; }
.hero-foot .note { font-size: var(--step-small); font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.hero-shot { grid-column: 9 / span 4; grid-row: 1 / span 2; align-self: end; justify-self: end; width: min(100%, 400px); margin-top: 4svh; border-radius: var(--r) var(--r) 0 0; overflow: hidden; max-height: 78svh; }
.hero-shot img { width: 100%; }

/* ---------- type a set ---------- */
.try { background: var(--blush); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; align-items: start; }
.try-main { grid-column: 1 / span 8; display: grid; gap: 0; }
.try-label { font-size: var(--step-lead); font-weight: 500; max-width: 30ch; line-height: 1.3; }
.try-field { margin-top: 20px; }
.try-input { display: block; width: 100%; border: 0; background: none; padding: 0; outline: none; font-family: var(--display); font-weight: 800; font-size: clamp(48px, 8vw, 132px); line-height: 1.1; letter-spacing: -0.04em; color: var(--rose); caret-color: var(--oxblood); }
.try-input:focus-visible { outline: none; }
.try-field { border-bottom: 6px solid transparent; transition: border-color var(--t-hover) ease; }
.try-field:focus-within { border-bottom-color: var(--oxblood); }
.answer { margin-top: 44px; max-width: 560px; display: grid; gap: 6px; }
.answer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 18px 24px; background: var(--band); border-radius: 12px; }
.answer-row:first-child { border-radius: var(--r) var(--r) 12px 12px; }
.answer-row:last-child { border-radius: 12px 12px var(--r) var(--r); }
.answer-row strong { font-weight: 700; font-size: var(--step-lead); font-variant-numeric: tabular-nums; text-align: right; }
.answer-row.flash strong { animation: pop 420ms var(--ease-out); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.examples { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.examples button { min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--pink); font-weight: 700; cursor: pointer; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.examples button:hover { background: var(--oxblood); color: var(--blush); }
.examples button:active { transform: scale(0.95); }
.try-clip { grid-column: 10 / span 3; justify-self: end; width: 100%; max-width: 330px; }
.try-clip video { width: 100%; border-radius: var(--r); background: var(--paper); }
.try-clip figcaption { margin-top: 12px; font-size: var(--step-small); }

/* ---------- mosaic ---------- */
.features { background: var(--oxblood); color: var(--blush); }
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 96px; gap: 8px; }
.tile { border-radius: var(--r); padding: 26px 28px; overflow: hidden; background: var(--oxblood-up); }
.t-head { grid-column: 1 / span 6; grid-row: 1 / span 3; background: none; padding-left: 0; padding-top: 0; }
.t-shot { padding: 0; background: var(--paper); }
.t-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-soft); }
.t-shot:hover img { transform: scale(1.03); }
.t-shot-a { grid-column: 7 / span 6; grid-row: 1 / span 5; }
.t-shot-a img { object-position: 50% 14%; }
.t-figure { grid-column: 1 / span 3; grid-row: 4 / span 3; background: var(--pink); color: var(--oxblood); display: flex; flex-direction: column; justify-content: space-between; }
.t-figure .figure { font-family: var(--display); font-weight: 800; font-size: var(--step-head); line-height: 0.9; letter-spacing: -0.04em; }
.t-list { grid-column: 4 / span 3; grid-row: 4 / span 3; }
.t-list li { font-size: var(--step-lead); font-weight: 500; line-height: 1.45; }
.t-say p { font-family: var(--display); font-weight: 800; font-size: var(--step-say); line-height: 1.08; letter-spacing: -0.02em; max-width: 18ch; }
.t-say-a { grid-column: 7 / span 6; grid-row: 6 / span 3; background: var(--rose); color: var(--oxblood); }
.t-shot-b { grid-column: 1 / span 6; grid-row: 7 / span 5; }
.t-shot-b img { object-position: 50% 3%; }
.t-say-b { grid-column: 7 / span 3; grid-row: 9 / span 3; background: var(--blush); color: var(--oxblood); }
.t-say-c { grid-column: 10 / span 3; grid-row: 9 / span 3; }

/* ---------- import ---------- */
.import { background: var(--mint); color: var(--pine); }
.stages { display: flex; gap: 6px; margin-top: 64px; }
.stage { flex: var(--grow) 1 0; min-width: max(14%, 9.5em); }
.seg { height: 22vh; min-height: 150px; border-radius: var(--r); padding: 20px 22px; font-family: var(--display); font-weight: 800; font-size: var(--step-lead); line-height: 1.05; letter-spacing: -0.02em; transform-origin: 0 50%; }
.s1 .seg { background: var(--pine); color: var(--mint); }
.s2 .seg { background: var(--rose); color: var(--oxblood); }
.s3 .seg { background: var(--oxblood); color: var(--blush); }
.stage p { margin-top: 16px; max-width: 24ch; font-weight: 500; }
.import-note { margin-top: 56px; max-width: 58ch; font-size: var(--step-lead); line-height: 1.4; }

/* ---------- everything ---------- */
.everything { background: var(--paper); }
.ev-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ev-head h2 span { display: block; }
.ev-head .soft { color: var(--rose); }
.ev-body { display: grid; grid-template-columns: 190px 1fr; gap: 28px; margin-top: 56px; align-items: start; }
.tabs { display: grid; gap: 6px; position: sticky; top: 96px; }
.tabs button { display: grid; gap: 2px; text-align: left; min-height: 68px; padding: 10px 18px; border: 0; border-radius: 16px; background: var(--band); font-weight: 700; cursor: pointer; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.tabs button small { font-size: var(--step-small); font-weight: 400; }
.tabs button:hover { background: var(--pink); }
.tabs button:active { transform: scale(0.97); }
.tabs button[aria-selected="true"] { background: var(--oxblood); color: var(--blush); }
.panel dl { display: grid; gap: 4px; }
.panel dl > div { display: grid; grid-template-columns: minmax(150px, 22%) 1fr; gap: 20px; align-items: baseline; min-height: 76px; padding: 20px 24px; border-radius: 16px; background: var(--blush); }
.panel dl > div:nth-child(even) { background: var(--band); }
.panel dt { font-weight: 700; font-size: var(--step-lead); line-height: 1.2; }
.panel dd { max-width: 62ch; }
.panel.has-shot { display: grid; grid-template-columns: 1fr clamp(200px, 21vw, 300px); gap: 28px; align-items: start; }
.panel.has-shot .panel-title { grid-column: 1 / -1; }
.panel figure { border-radius: var(--r); overflow: hidden; background: var(--blush); position: sticky; top: 96px; }
.panel figure img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: 50% 0; }
.panel-title { font-family: var(--display); font-weight: 800; font-size: var(--step-lead); margin: 40px 0 12px; }
.panel:first-child .panel-title { margin-top: 0; }
.js .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.js .panel[hidden] { display: none; }
.js .panel.swap dl > div { animation: row 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes row { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- questions ---------- */
.questions { background: var(--pink); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; align-items: start; }
.questions h2 { grid-column: 1 / span 5; position: sticky; top: 110px; }
.faq { grid-column: 6 / span 7; display: grid; gap: 8px; }
.faq details { border-radius: var(--r); background: #f79a9b; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 16px 26px; font-weight: 700; font-size: var(--step-lead); line-height: 1.2; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary { position: relative; padding-right: 64px; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 26px; top: 50%; width: 18px; height: 3px; margin-top: -1.5px; border-radius: 2px; background: currentColor; transition: transform 240ms var(--ease-out); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] { background: var(--oxblood); color: var(--blush); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details:not([open]):hover { background: #f38c8e; }
.faq details p { padding: 0 26px 26px; max-width: 56ch; }
.faq details[open] p { animation: row 360ms var(--ease-out); }

/* ---------- download ---------- */
.get { background: var(--rose); min-height: 0; padding: 0; }
.get-link { display: flex; flex-direction: column; justify-content: space-between; min-height: 64svh; padding: clamp(96px, 13vh, 150px) var(--m) 12px; text-decoration: none; overflow: hidden; transition: background-color 300ms ease, color 300ms ease; }
.get-sub { font-size: var(--step-lead); font-weight: 500; }
.get-word { display: block; font-family: var(--display); font-weight: 800; font-size: 19.6vw; line-height: 0.86; letter-spacing: -0.05em; margin-left: -0.05em; white-space: nowrap; transition: transform 500ms var(--ease-out); transform-origin: 0 100%; }
.get-link:hover { background: var(--oxblood); color: var(--blush); }
.get-link:hover .get-word { transform: translateX(1.2vw); }
.get-link:focus-visible { outline-offset: -8px; }

/* ---------- footer ---------- */
.foot { background: var(--oxblood); color: var(--blush); min-height: 0; padding-top: clamp(64px, 9vh, 110px); padding-bottom: 28px; }
.foot-name { font-family: var(--display); font-weight: 800; font-size: 21.6vw; line-height: 0.9; letter-spacing: -0.05em; margin-left: -0.05em; color: var(--rose); white-space: nowrap; }
.foot-row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 16px; margin-top: 64px; }
.foot-places { grid-column: 1 / span 5; }
.foot-places a { font-family: var(--display); font-weight: 800; font-size: var(--step-say); letter-spacing: -0.02em; line-height: 1.35; color: var(--pink); text-decoration: none; display: inline-block; transition: transform var(--t-hover) var(--ease-out), color var(--t-hover) ease; }
.foot-places a:hover { transform: translateX(10px); color: var(--blush); }
.foot-cols { grid-column: 7 / span 6; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 24px; }
.foot-cols li { line-height: 1.9; }
.foot-cols a, .foot-last a { text-decoration: underline 2px transparent; text-underline-offset: 0.5em; transition: text-decoration-color var(--t-hover) ease, text-underline-offset var(--t-hover) var(--ease-out); }
.foot-cols a:hover, .foot-last a:hover { text-decoration-color: currentColor; text-underline-offset: 0.3em; }
.foot-cols p { font-size: var(--step-small); line-height: 1.55; }
.foot-last { display: flex; justify-content: space-between; gap: 20px; margin-top: 88px; font-size: var(--step-small); }

/* ---------- entrances (only when script runs) ---------- */
.js [data-rise] { opacity: 0; transform: translateY(26px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-rise].in { opacity: 1; transform: none; }
.js [data-grow] { transform: scaleX(0.04); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 140ms); }
.js [data-grow].in { transform: none; }
.js [data-open] { clip-path: inset(0 0 100% 0 round 28px); transition: clip-path 1000ms var(--ease-soft); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-open].in { clip-path: inset(0 0 0 0 round 28px); }
.js .hero-title span { transform: translateY(0.5em); opacity: 0; animation: rise 900ms var(--ease-out) forwards; }
.js .hero-title .dark { animation-delay: 110ms; }
.js .hero-shot { transform: translateY(18%); animation: rise 1100ms var(--ease-out) 260ms forwards; }
@keyframes rise { to { transform: none; opacity: 1; } }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .top-links { display: none; }
  .hero-foot { grid-column: 1 / span 7; }
  .hero-shot { grid-column: 8 / span 5; }
  .try-main { grid-column: 1 / span 8; }
  .try-clip { grid-column: 9 / span 4; }
    .t-shot-b { grid-row: 7 / span 6; }
  .t-say-b { grid-column: 7 / span 6; grid-row: 9 / span 2; }
  .t-say-c { grid-column: 7 / span 6; grid-row: 11 / span 2; }
  .t-say p { max-width: 24ch; }
  .t-list li { font-size: var(--step-body); white-space: nowrap; }
  .panel.has-shot { display: block; }
  .panel figure { position: static; margin-top: 10px; max-width: 340px; }
  .foot-places { grid-column: 1 / -1; }
  .foot-cols { grid-column: 1 / -1; margin-top: 48px; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .chapter { padding-top: 88px; padding-bottom: 72px; min-height: 0; }
  .btn-top { min-height: 44px; padding: 0 18px; }
  .hero { display: flex; flex-direction: column; min-height: 100svh; padding-top: 15svh; padding-bottom: 0; }
  .hero-title { font-size: 20.5vw; }
  .get-word { font-size: 20vw; }
  .hero-foot { margin-top: 40px; padding-bottom: 0; gap: 18px; }
  .hero-foot p { max-width: 30ch; }
  .hero-shot { align-self: center; width: 78%; max-height: 46svh; margin-top: 36px; }

  .try { display: block; }
  .try-input { font-size: 13vw; }
  .answer { margin-top: 28px; }
  .answer-row { padding: 16px 18px; flex-direction: column; gap: 2px; }
  .answer-row strong { text-align: left; }
  .try-clip { margin: 56px auto 0; max-width: 300px; }

  .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 6px; }
  .mosaic .tile { grid-column: 1 / -1; grid-row: auto; }
  .t-head { padding: 0 0 22px; }
  .t-shot { aspect-ratio: 4 / 5; }
  .mosaic .t-figure { grid-column: 1; aspect-ratio: 1; padding: 20px; }
  .mosaic .t-list { grid-column: 2; aspect-ratio: 1; padding: 20px; }
  .t-list li { font-size: 1.125rem; }
  .t-figure p:last-child { font-size: var(--step-small); }
  .t-say { min-height: 150px; }

  .stages { flex-direction: column; margin-top: 40px; }
  .js .seg[data-grow] { transform: none; transition: none; }
  .stage { flex: none; display: grid; min-width: 0; }
  .seg { height: auto; min-height: 0; padding: 18px 20px 0; border-radius: var(--r) var(--r) 0 0; font-size: 22px; }
  .s1 .seg { padding-top: 22px; min-height: 120px; }
  .s2 .seg { min-height: 84px; }
  .s3 .seg { min-height: 56px; }
  .stage p { margin: 0; max-width: none; padding: 8px 20px 20px; border-radius: 0 0 var(--r) var(--r); }
  .s1 p { background: var(--pine); color: var(--mint); }
  .s2 p { background: var(--rose); color: var(--oxblood); }
  .s3 p { background: var(--oxblood); color: var(--blush); }
  .import-note { margin-top: 36px; }

  .ev-head { flex-direction: column; align-items: stretch; }
  .ev-body { display: block; margin-top: 32px; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; position: static; }
  .tabs button { min-height: 52px; padding: 8px 6px; text-align: center; font-size: 1rem; }
  .panel.has-shot { display: block; }
  .panel figure { max-width: none; }
  .panel figure img { aspect-ratio: 4 / 5; }
  .tabs button small { display: none; }
  .panels { margin-top: 10px; }
  .panel dl > div { grid-template-columns: 1fr; gap: 4px; padding: 16px 18px; }

  .questions { display: block; }
  .questions h2 { position: static; margin-bottom: 28px; }
  .faq { gap: 6px; }
  .faq summary { min-height: 64px; padding: 14px 20px; font-size: 1.125rem; }
  .faq details p { padding: 0 20px 22px; font-size: 1rem; }

  .get-link { min-height: 52svh; padding-top: 88px; }
  .foot-row { margin-top: 40px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols p { grid-column: 1 / -1; }
  .foot-last { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise], .js [data-grow], .js [data-open], .js .hero-title span, .js .hero-shot { transform: none; clip-path: none; opacity: 1; animation: none; transition: opacity 300ms ease; }
  .btn:hover, .get-link:hover .get-word, .t-shot:hover img, .foot-places a:hover { transform: none; }
  .answer-row.flash strong, .js .panel.swap dl > div, .faq details[open] p { animation: none; }
}
