/* dinokey.app
   Layout: a full-bleed live landscape with the copy in its open sky, then quiet reading bands on sage paper.
   The one bold thing is the hero (the app's own world, drawn live); everything after it is calm type and
   real screenshots. Colours and type come from the app: sage paper, fern green for actions, rounded headings,
   keycap tags like the ones the creatures wear. System fonts only. */
:root {
  --ink: #1E2420;            /* text */
  --ink-2: #4C5750;          /* secondary text */
  --fern: #2F6A4C;           /* actions, links */
  --fern-deep: #24563D;
  --paper: #F3F6EF;          /* the page */
  --leaf: #E3EBDA;           /* a tinted band */
  --line: rgba(30, 36, 32, .12);
  --display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --keycap: "Futura", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  --shot: 0 1px 2px rgba(30, 36, 32, .08), 0 22px 50px -26px rgba(30, 36, 32, .45);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }   /* nothing may nudge the page sideways on a phone */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.6 var(--text); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fern); text-underline-offset: 3px; }
a:hover { color: var(--fern-deep); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--fern) 45%, transparent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); text-wrap: balance; margin: 0; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.015em; margin-bottom: 18px; }
h3 { font-size: 22px; line-height: 1.25; margin-bottom: 12px; }
p { margin: 0 0 16px; max-width: 62ch; color: var(--ink-2); text-wrap: pretty; }
b { color: var(--ink); font-weight: 600; }
kbd {
  display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 8px;
  font: 600 13px/1 var(--text); color: var(--ink); background: linear-gradient(#FFF, #F2F3EE);
  border: 1px solid rgba(30, 36, 32, .16); border-bottom-color: rgba(30, 36, 32, .3); border-radius: 7px;
  box-shadow: 0 1px 0 rgba(30, 36, 32, .06); vertical-align: .1em;
}
.wrap { width: min(1160px, 100%); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* ---------- hero: the app's world, live, with the copy in its sky ---------- */
.hero { position: relative; min-height: clamp(620px, 94svh, 980px); overflow: hidden; background: #DCE5DD; isolation: isolate; }
.hero-scene { position: absolute; inset: 0; z-index: -1; }
.hero-still, .hero-live { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero-still { object-fit: cover; object-position: 50% 100%; }
.hero-live { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.hero-live.ready { opacity: 1; }
/* a soft brightening behind the copy, so it reads on every sky */
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 60% at 18% 22%, rgba(250, 252, 246, .62), rgba(250, 252, 246, 0) 70%);
}
.hero-copy { padding-top: max(calc(env(safe-area-inset-top) + 24px), clamp(28px, 6vh, 72px)); padding-bottom: clamp(260px, 40vh, 440px); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 52px; width: auto; }
.brand span { font: 700 22px/1 var(--display); letter-spacing: -.01em; }
.hero h1 { margin-top: clamp(22px, 4vh, 40px); max-width: 13ch; font-size: clamp(42px, 6.4vw, 78px); line-height: 1.02; letter-spacing: -.025em; }
.lede { margin-top: 18px; max-width: 36rem; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: #39443D; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 22px; border-radius: 13px;
  font: 600 16px/1 var(--text); text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(30, 36, 32, .14); box-shadow: 0 1px 2px rgba(30, 36, 32, .08);
  transition: background-color .15s ease;
}
.btn:hover { background: #FFF; color: var(--ink); }
.btn.primary { color: #FFF; background: var(--fern); border-color: var(--fern-deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 3px rgba(30, 36, 32, .22); }
.btn.primary:hover { background: var(--fern-deep); color: #FFF; }
/* the world switch, like the app's own segmented controls */
.switch { display: inline-flex; gap: 2px; margin-top: 22px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(30, 36, 32, .1); }
.switch button {
  appearance: none; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 9px;
  font: 500 14.5px/1 var(--text); color: var(--ink-2); background: transparent;
}
.switch button:hover { color: var(--ink); }
.switch button[aria-pressed="true"] { color: var(--ink); font-weight: 600; background: #FFF; box-shadow: 0 1px 2px rgba(30, 36, 32, .16); }

/* ---------- reading bands ---------- */
.band { padding-block: clamp(64px, 9vw, 120px); }
.band + .band { border-top: 1px solid var(--line); }
#calm, #setup { background: var(--leaf); border-top-color: transparent; }
#calm + .band, #setup + .band { border-top-color: transparent; }
.intro { font-size: 19px; margin-bottom: 36px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.split.reverse > .shot { order: -1; }
figure { margin: 0; }
.shot img, .worlds img, .keymap img { border-radius: 16px; box-shadow: var(--shot); }
.combo { white-space: nowrap; }

/* special keys */
.keys-list { display: grid; gap: 10px; margin: 26px 0 0; }
.keys-list div { display: grid; grid-template-columns: 7.2rem 1fr; align-items: baseline; gap: 12px; }
.keys-list dt { white-space: nowrap; }
.keys-list dd { margin: 0; color: var(--ink-2); }

/* the keyboard map: four rows of keycaps (like the tags the creatures wear), each row labelled with its place */
.keymap { display: grid; gap: 22px; }
.kb { --k: clamp(24px, 3.1vw, 38px); display: grid; gap: calc(var(--k) * .16); justify-content: start; }
.kb .row { display: grid; grid-template-columns: 6.4rem repeat(10, var(--k)); gap: calc(var(--k) * .16); align-items: center; }
.kb .r2 { padding-left: calc(var(--k) * .35); }
.kb .r3 { padding-left: calc(var(--k) * .7); }
.kb .lbl { font: 500 14px/1.2 var(--text); color: var(--ink-2); }
.kb .r2 .lbl { margin-left: calc(var(--k) * -.35); }
.kb .r3 .lbl { margin-left: calc(var(--k) * -.7); }
.kb b {
  display: grid; place-items: center; height: calc(var(--k) * .92); border-radius: calc(var(--k) * .2);
  font: 500 calc(var(--k) * .46)/1 var(--keycap); color: var(--ink); background: #FBF8F1;
  box-shadow: 0 2px 0 var(--row), 0 4px 10px rgba(60, 48, 36, .1);
}
.kb .r0 { --row: #6E8DA6; } .kb .r1 { --row: #8E8C56; } .kb .r2 { --row: #C09A55; } .kb .r3 { --row: #B87C5E; }

/* three worlds */
.worlds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.worlds figcaption { margin-top: 14px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.worlds figcaption b { display: block; font: 700 20px/1.3 var(--display); margin-bottom: 2px; }

/* calm list */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); max-width: 60ch; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--fern); opacity: .75; }

/* set it up: the steps really are a sequence, so they're numbered */
.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.device { background: #FBFCF8; border-radius: 20px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 0 0 1px var(--line); display: grid; gap: 8px; align-content: start; }
.device h3 + ol, .device h3 + ul { margin-top: 2px; }
.device h3:not(:first-child) { margin-top: 22px; }
.device ol { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.device ol li { counter-increment: step; position: relative; padding-left: 44px; color: var(--ink-2); }
.device ol li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center;
  font: 600 15px/1 var(--keycap); color: var(--ink); background: #FFF; border-radius: 8px;
  box-shadow: 0 2px 0 #B9C7AE, 0 0 0 1px rgba(30, 36, 32, .1);
}
.device .phone { width: min(230px, 60%); margin: 22px auto 0; border-radius: 26px; box-shadow: var(--shot), 0 0 0 6px #1E2420; }

/* footer */
.foot { background: #DCE6D3; padding-block: 34px calc(34px + env(safe-area-inset-bottom)); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.foot p { margin: 0; font-size: 15px; }
.foot nav { display: flex; gap: 22px; font-size: 15px; }
.brand.small img { height: 34px; }
.brand.small span { font-size: 18px; }

/* ---------- narrower screens ---------- */
@media (max-width: 900px) {
  .split, .setup { grid-template-columns: minmax(0, 1fr); }
  .split.reverse > .shot { order: 0; }
  .worlds { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .brand img { height: 42px; }
  .actions .btn { flex: 1 1 100%; }
  .switch { display: flex; width: 100%; }
  .switch button { flex: 1; padding-inline: 6px; }
  .hero-copy { padding-bottom: clamp(220px, 34vh, 320px); }
  /* ten keys and a label fit the width with room to spare: the label column is 3.6rem, the keys share the rest */
  .kb { --k: min(30px, calc((100vw - 40px - 3.6rem - 24px) / 10.7)); }
  .kb .row { grid-template-columns: 3.6rem repeat(10, var(--k)); }
  .kb .lbl { font-size: 12px; line-height: 1.15; }
  .keys-list div { grid-template-columns: 6rem 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-live, .btn { transition: none; }
}
