/* Tamrin · the landing page · base and shared pieces.
   Everything reads css/tokens.css (generated). The classes are the reference pages' shared
   styles (design/css/site.css) rewritten on the tokens; sections.css lays the sixteen sections out. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-ui); font-size: 17px; line-height: normal; font-weight: 600;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 3px; border-radius: 6px; }

/* ---- the header: 64 tall, sticky, the logo's eyes blink ---- */
.site-header {
  position: sticky; top: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; gap: 10px; padding: 0 var(--side);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.site-header .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-header .logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.site-header .logo b { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.site-header .nav { display: none; }
.site-header .spacer { flex-grow: 1; }
.site-header .btn { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 13px; box-shadow: none; }
.blink { transform-box: fill-box; transform-origin: center; animation: blink var(--t-blink) ease-in-out infinite; }
@keyframes blink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.12); } }
@media (prefers-reduced-motion: reduce) { .blink { animation-duration: 6s; } }

/* ---- shared pieces ---- */
.btn, .btn2 {
  height: 56px; padding: 0 24px; border-radius: var(--r-lg); font-size: 16px; font-weight: 800; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
}
.btn { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-primary-button); }
.btn2 { padding: 0 22px; border: 1.5px solid var(--primary); color: var(--primary); }
.lab { font-size: 13px; line-height: 18px; font-weight: 800; color: var(--accent-text); letter-spacing: .08em; text-transform: uppercase; }
.h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.p { font-size: 17px; line-height: 26px; font-weight: 600; color: var(--ink-secondary); margin: 0; text-wrap: pretty; }
.card { border-radius: var(--r-card-large); background: var(--surface); border: 1px solid var(--hairline); }
/* Frames (the owner, 2026-10-11): every loop carries its own phone, bezel and all, so the page draws no
   frame. `.phone` is only the slot: the video's shape, rounded like the video's corners, a soft shadow. */
.phone { position: relative; flex-shrink: 0; container-type: inline-size; border-radius: 9.4cqw; box-shadow: 0 24px 50px rgba(22, 27, 51, .18); }
.screen { position: relative; overflow: hidden; border-radius: 9.4cqw; background: var(--paper); aspect-ratio: 720 / 1534; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .loop-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen video.loop-video { opacity: 0; transition: opacity .25s ease; }
.screen video.loop-video.on { opacity: 1; }
.vid {
  position: absolute; left: 10px; top: 10px; height: 26px; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden;
  padding: 0 10px; border-radius: var(--r-pill); background: rgba(22, 27, 51, .78); color: var(--on-primary);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 6px; letter-spacing: .04em; z-index: 2;
}
.vid::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip { height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; white-space: nowrap; transition: background-color var(--t-quick) ease, border-color var(--t-quick) ease, color var(--t-quick) ease, transform var(--t-instant) ease; }
.chip:hover { background: var(--neutral-fill-soft); border-color: var(--ink-tertiary); }
.chip:active { transform: scale(.96); }
.chip.on:hover { background: var(--ink); border-color: var(--ink); }
.chip.on { border-color: var(--ink); background: var(--ink); color: var(--on-primary); }
.kb { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 8px; border-radius: var(--r-input); background: var(--key-ground); }
.k { height: 36px; border-radius: 8px; background: var(--key-key); box-shadow: 0 1px 0 var(--key-key-shadow); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; font-style: normal; }
.kc { background: var(--key-action-key); color: var(--on-primary); }
.km { font-family: var(--f-maths); }
.maths { font-family: var(--f-maths); font-style: italic; }
.hw { font-family: var(--f-hand); font-weight: 600; color: #1C2B48; }
.aside { font-family: var(--f-hand); font-weight: 600; font-size: 22px; line-height: 24px; color: var(--accent-text); display: flex; align-items: flex-start; gap: 6px; }
.aside svg { flex-shrink: 0; }
.gp { background-color: var(--surface); background-image: linear-gradient(var(--graph-paper-line) 1px, transparent 1px), linear-gradient(90deg, var(--graph-paper-line) 1px, transparent 1px); background-size: var(--grid) var(--grid); }
.night { background: var(--night); color: var(--on-primary); }
.night .lab { color: var(--primary-light); }
.night .p { color: var(--on-primary-secondary); }
.night .aside { color: var(--accent-soft); }
.note { padding: 16px 18px 14px; border-radius: 6px 20px 20px 20px; border: 1px solid var(--hairline); background: var(--surface); box-shadow: 0 12px 26px rgba(22, 27, 51, .12); display: flex; flex-direction: column; gap: 6px; }
.note .who { font-family: var(--f-ui); font-size: 12px; font-weight: 800; color: var(--accent-text); letter-spacing: .06em; text-transform: uppercase; }
.ink { stroke: #1C2B48; stroke-width: var(--stroke-ink); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.inko { stroke: var(--accent); stroke-width: var(--stroke-thread); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.inkg { stroke: var(--correct); stroke-width: var(--stroke-tick); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.inkc { stroke: var(--not-yet); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.torn { height: 14px; background: linear-gradient(135deg, transparent 7px, var(--surface) 7px) 0 0 / 14px 14px, linear-gradient(225deg, transparent 7px, var(--surface) 7px) 7px 0 / 14px 14px; background-repeat: repeat-x; }
.torn.to-night { background: linear-gradient(135deg, transparent 7px, var(--night) 7px) 0 0 / 14px 14px, linear-gradient(225deg, transparent 7px, var(--night) 7px) 7px 0 / 14px 14px; background-repeat: repeat-x; }
.tick { width: 22px; height: 22px; border-radius: 50%; background: var(--correct-tint); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cross { width: 22px; height: 22px; border-radius: 50%; background: var(--neutral-fill); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.faq { padding: 18px 20px; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 17px; font-weight: 800; }
.mcell { width: 14px; height: 14px; border-radius: 5px; display: block; }
.c0 { border: 1.5px solid var(--mastery-not-started-border); }
.c1 { background: var(--mastery-learning); } .c2 { background: var(--mastery-shaky); } .c3 { background: var(--mastery-solid); } .c4 { background: var(--mastery-mastered); }
.store { height: 52px; padding: 0 16px; border-radius: var(--r-md); background: var(--ink); color: var(--on-primary); display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.soon { height: 52px; padding: 0 16px; border-radius: var(--r-md); border: 1.5px dashed #B9B2A3; color: var(--ink-secondary); display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.night .store { background: var(--surface); color: var(--ink); }
.night .soon { color: var(--on-primary-secondary); border-color: #3A4270; }

/* the drawings draw themselves (DRAWINGS.md) */
.dd path { stroke-dasharray: 900; stroke-dashoffset: 900; animation: ddraw var(--t-draw) cubic-bezier(.3, .6, .3, 1) forwards; }
.dd path[fill]:not([fill="none"]) { opacity: 0; animation: ddfill .6s ease-out forwards; stroke-dasharray: none; }
@keyframes ddraw { to { stroke-dashoffset: 0; } }
@keyframes ddfill { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dd path { animation: none; stroke-dashoffset: 0; opacity: 1; } }

/* the margin maths: handwriting in the scribble colour, decorative */
.scribble { position: absolute; font-family: var(--f-hand); font-weight: 600; font-size: 22px; color: var(--scribble); opacity: .9; white-space: nowrap; pointer-events: none; user-select: none; }
.scribble.warm { color: var(--accent-soft); }

/* every section: the phone's padding; the content wrapper is the desktop's 1120 column */
.section { position: relative; padding: 56px var(--side); }
.wrap { position: relative; width: 100%; max-width: var(--w-content); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* no grey flash on a tap on iPhone: the owl, the tutors, the paper and the door react in their own way (2026-10-13) */
[data-owl], .owl-stage, .hero-owl, .tutor-card, .hall, section.gp, section.dotted, .chips .chip { -webkit-tap-highlight-color: transparent; }
