/* Base: reset, type, buttons, header, footer, intro. Shared by index.html and scan.html. */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: 104px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; accent-color: var(--accent); font-optical-sizing: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; caret-color: var(--accent); }
::selection { background: color-mix(in srgb, var(--g-pink) 55%, #fff); color: var(--text); }
html { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
p { margin: 0 0 var(--s3); }
h1, h2, h3 { margin: 0 0 var(--s3); color: var(--text); font-family: var(--font); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.25rem); line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); line-height: 1.08; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
/* headings carry their emphasis in the words: no styled accent word */
h1 em, h2 em, h3 em { font-style: normal; color: inherit; }
code, .raw { font-family: var(--mono); font-size: .8rem; color: var(--text-dim); }
.tnum, .num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--s5); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 24px; top: 8px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; background: var(--text); color: #fff; padding: var(--s2) var(--s4); border-radius: var(--pill); z-index: 120; text-decoration: none; }
.skip:focus { width: auto; height: auto; overflow: visible; clip: auto; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* small labels: sentence case, the text face */
.mono-label { font-size: .8rem; font-weight: 650; color: var(--text-dim); margin: 0 0 var(--s2); }

/* ---------- buttons: pills, teal to pink ---------- */
.btn, button {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  background: var(--grad-loop); background-size: 200% 100%; background-position: 0% 0;
  color: var(--cta-ink); border: 0; border-radius: var(--pill); padding: 12px 22px;
  font: 600 1rem/1.2 var(--font); letter-spacing: 0; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset; /* taste-skill-ignore: the pinned pill's inner highlight */
  transition: background-position 240ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 140ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .btn:hover, button:hover:not(:disabled) { background-position: 100% 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, var(--shadow-lift); transform: translateY(-1px); } } /* taste-skill-ignore: hover lift, not at rest */
/* press feedback on pointer-down: a small scale, fast */
.btn:active, button:active:not(:disabled) { transform: scale(.97); transition-duration: 120ms; }
.btn svg { width: 15px; height: 15px; transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover svg { transform: translateX(2px); } }
.btn.ghost, button.ghost {
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; /* taste-skill-ignore: Nabira's pinned gradient pill outline */
  border: 1.5px solid transparent; color: var(--text); padding: 10.5px 20.5px;
}
@media (hover: hover) and (pointer: fine) { .btn.ghost:hover, button.ghost:hover:not(:disabled) { background: linear-gradient(color-mix(in srgb, var(--surface-2) 70%, #fff), color-mix(in srgb, var(--surface-2) 70%, #fff)) padding-box, var(--grad) border-box; } } /* taste-skill-ignore: hover state of the pinned pill */
.btn.sm, button.sm { padding: 7px 16px; font-size: .875rem; white-space: nowrap; }
button:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.6); }
/* controls on touch screens: no tap delay, no long-press text selection or callout */
button, .btn, [role="button"], .tabbar a, header.top nav a, summary { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* inputs at 16px on touch screens, so iOS does not zoom the page on focus */
@media (pointer: coarse) { input, select, textarea { font-size: 1rem; } }
/* shimmer: a light sheen crosses the gradient pills every few seconds, faster on hover */
.btn:not(.ghost)::after, button:not(.ghost):not([role])::after {
  content: ""; position: absolute; inset: -1px; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .62) 48%, rgba(255, 255, 255, .2) 54%, transparent 66%); /* taste-skill-ignore: the shimmer Nabira asked for */
  transform: translateX(-130%); animation: sheen 3.8s var(--ease-io) 1.6s infinite;
}
@media (hover: hover) and (pointer: fine) { .btn:not(.ghost):hover::after, button:not(.ghost):not([role]):hover:not(:disabled)::after { animation-duration: 1.4s; animation-delay: 0s; } }
button:disabled::after { animation: none; opacity: 0; }
@keyframes sheen { 0% { transform: translateX(-130%); } 34%, 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .btn::after, button::after { animation: none !important; opacity: 0; } }

/* ---------- header: a floating pill. Links left, mark centre, action right ---------- */
/* a thin glass pill, sticky (Nabira's pinned choice): the page scrolls under it */
header.top { position: sticky; top: 10px; z-index: 30; padding: 0 var(--s5); margin-top: 10px; pointer-events: none; }
header.top .bar {
  pointer-events: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 1100px; height: 46px; margin: 0 auto; padding: 5px 5px 5px 8px;
  /* the bar itself carries the teal to pink (Nabira, 22 Oct), slightly see-through over the glass blur; its words are white */
  background: linear-gradient(105deg, rgba(2, 147, 134, .92) 0%, rgba(53, 179, 166, .92) 35%, rgba(201, 154, 174, .92) 62%, rgba(242, 143, 160, .92) 100%); /* taste-skill-ignore: Nabira's pinned teal to pink pill nav */
  -webkit-backdrop-filter: saturate(1.7) blur(18px); backdrop-filter: saturate(1.7) blur(18px); /* taste-skill-ignore: the one sticky bar, Nabira's pinned glass pill nav */
  border-radius: var(--pill); border: 1px solid rgba(255, 255, 255, .45); /* taste-skill-ignore: the light catching the pill's edge */
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .1); /* taste-skill-ignore: the sticky bar floats */
}
header.top nav { display: flex; gap: 2px; }
header.top nav a { color: #fff; text-decoration: none; font-size: .95rem; font-weight: 600; padding: 4px 12px; border-radius: var(--pill); transition: background 200ms ease, color 200ms ease; }
@media (hover: hover) and (pointer: fine) { header.top nav a:hover { color: #fff; background: rgba(255, 255, 255, .18); } }
header.top nav a.is-here, header.top nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .24); }
header.top .brand-word { color: #fff; }
/* the bar's own button turns white with teal words, so it stands on the gradient */
header.top .actions .btn { background: #fff; color: var(--accent); box-shadow: none; }
header.top .actions .btn::after { display: none; }
.brand { position: relative; display: inline-flex; align-items: center; gap: var(--s3); color: var(--text); text-decoration: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1; letter-spacing: .2em; padding-left: .2em; white-space: nowrap; color: var(--accent); }
.brand-logo { display: block; width: 40px; height: 40px; flex: none; }
/* the word ASTWA at the top of the page, the logo once the page scrolls (js/site.js sets .is-scrolled) */
header.top .brand { justify-content: center; width: 150px; height: 34px; }
header.top .brand-logo { width: 32px; height: 32px; }
header.top .brand-word, header.top .brand-logo { position: absolute; transition: opacity .3s ease, transform .45s var(--ease-out); }
header.top .brand-logo { opacity: 0; transform: scale(.55) rotate(-14deg); }
header.top.is-scrolled .brand-word { opacity: 0; transform: translateY(-10px) scale(.9); }
header.top.is-scrolled .brand-logo { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { header.top .brand-word, header.top .brand-logo { transition: none; } }
header.top .actions { justify-self: end; display: flex; gap: var(--s3); align-items: center; }

/* recorded-examples notice: a small amber pill beside the header action; the title says how to leave mock mode */
.mockbar { display: inline-block; padding: 6px 12px; background: #fff1cf; border-radius: var(--pill); color: var(--text); font-size: .875rem; line-height: 1.4; white-space: nowrap; }
.mockbar[hidden] { display: none; }

/* page panes: plain blocks on wide screens, horizontal panels on phones */
.pane { display: contents; }
.tabbar { display: none; }

/* ---------- footer: one thin row ---------- */
footer.site { margin-top: 0; background: #f2dde0; color: var(--text); font-size: .9rem; }
footer.site .foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand links" "legal legal"; align-items: center; gap: 10px var(--s5); padding: 16px var(--s5) 18px; }
footer.site .foot-brand { grid-area: brand; display: flex; align-items: center; gap: var(--s4); min-width: 0; }
footer.site .brand-word { font-size: .95rem; color: #02665e; }
footer.site .brand-logo { width: 26px; height: 26px; }
footer.site .foot-line { margin: 0; max-width: 60ch; font-size: .875rem; color: var(--text-dim); text-wrap: pretty; }
footer.site .foot-links { grid-area: links; display: flex; flex-wrap: wrap; justify-content: end; gap: 2px; }
footer.site .foot-links a { color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: var(--pill); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { footer.site .foot-links a:hover { background: var(--surface); } }
footer.site .foot-legal { grid-area: legal; margin: 0; padding-top: 10px; border-top: 1px solid rgba(15, 35, 51, .08); font-size: .8125rem; color: var(--text-dim); text-align: center; }

/* ---------- intro: the logo draws itself, then glides into the header ---------- */
.intro { display: none; }
html.intro-on .intro { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--bg); transition: background-color 520ms ease; }
html.intro-on body { overflow: hidden; }
html.intro-on header.top .brand-word { opacity: 0; }
.intro-mark { width: 132px; height: 132px; overflow: visible; transform-origin: 0 0; will-change: transform; }
.i-line { fill: none; stroke: var(--brand-teal); stroke-width: 11; stroke-linejoin: miter; stroke-miterlimit: 10; stroke-dasharray: 1 1; stroke-dashoffset: 1;
  animation: i-draw 820ms var(--ease-out) forwards, i-white 380ms ease 900ms forwards; }
.i-line.i-r { animation-delay: 240ms, 900ms; }
.i-tile { transform-box: fill-box; transform-origin: center; transform: scale(.4); opacity: 0; animation: i-tile 620ms var(--ease-out) 820ms forwards; }
.i-fill { opacity: 0; transform-box: fill-box; transform-origin: 50% 30%; transform: scale(.9); animation: i-fill 420ms var(--ease-out) 1120ms forwards; }
.intro.settled .i-line { stroke-dasharray: none; }
.intro.leaving { background-color: transparent; }
.intro.leaving .intro-mark { transition: transform 680ms var(--ease-io), opacity 260ms ease 560ms; }
@keyframes i-draw { to { stroke-dashoffset: 0; } }
@keyframes i-white { to { stroke: #fff; } }
@keyframes i-tile { to { transform: none; opacity: 1; } }
@keyframes i-fill { to { transform: none; opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- entrances: the parts of each section rise once as it enters (js/ui.js marks .is-in; only with scripting) ---------- */
html.has-js .rise-in { opacity: 0; transform: translateY(18px); transition: opacity 760ms var(--ease-out), transform 760ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
html.has-js .rise-in.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.has-js .rise-in { opacity: 1; transform: none; transition: none; } }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  header.top .bar { grid-template-columns: auto 1fr; padding: 5px 5px 5px 14px; height: 46px; }
  header.top nav { display: none; }
  header.top .brand { justify-self: start; justify-content: flex-start; width: auto; }
  /* on a phone the mark and the word sit side by side, nothing swaps */
  header.top .brand-word, header.top .brand-logo { position: static; opacity: 1; transform: none; }
  header.top .brand-logo { width: 30px; height: 30px; }
  header.top .brand-word { font-size: 1rem; }
  html.intro-on header.top .brand-logo { opacity: 0; }
  footer.site .foot { grid-template-columns: 1fr; grid-template-areas: "brand" "links" "legal"; gap: var(--s4); padding: 22px var(--s5) 84px; }
  footer.site .foot-links { justify-content: start; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 var(--s4); }
  header.top { padding: 0 var(--s4); margin-top: 10px; }
}
/* phones (index.html only): the sections sit side by side and swipe; a pill tab bar names them */
@media (max-width: 760px) {
  body:has(> main .pane) { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; overscroll-behavior: none; }
  /* 8 Nov 2026 (Nabira): the pill floats over the panels and the grounds run edge to edge; no pale strip above the
     header or under the last section. The page ground is the sections' own green, and so is the status bar (index.html) */
  body:has(> main .pane) { background: #d6e9e4; }
  body:has(> main .pane) header.top { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); left: 0; right: 0; margin: 0; }
  body:has(> main .pane) .pane { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
  #p-home { background: #d6e9e4; }   /* the hero starts and the mission section ends on this green */
  #p-scan { background: linear-gradient(180deg, #d6e9e4 0 50%, #f2dde0 50% 100%); }   /* the launch block starts green, ends pink */
  body:has(> main .pane) footer.site { display: none; }
  main:has(> .pane) { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  main:has(> .pane)::-webkit-scrollbar { display: none; }
  .pane { display: block; flex: 0 0 100%; width: 100%; min-width: 0; overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-align: start; scroll-snap-stop: always; padding-bottom: 150px; }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 50; gap: 2px; padding: 5px; border-radius: var(--pill);
    background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); } /* taste-skill-ignore: the fixed phone tab bar floats */
  .tabbar a { flex: 1; text-align: center; padding: 10px 4px; border-radius: var(--pill); font-size: .84rem; font-weight: 700; color: var(--text-dim); text-decoration: none; transition: background 220ms ease, color 220ms ease; }
  .tabbar a[aria-current="true"] { background: var(--grad); color: #fff; }
  .faq-fab { bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; right: 14px !important; padding: 10px 16px 10px 13px !important; }
  /* one word on a phone; the full text stays for screen readers and in the title */
  .mockbar { padding: 5px 10px; font-size: 0; }
  .mockbar::after { content: attr(data-short); font-size: .8rem; }
  header.top .actions { gap: 6px; }
  header.top .brand-logo { order: -1; }
}

@media (prefers-reduced-transparency: reduce) {
  header.top .bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media print {
  header.top, .mockbar, nav, .hero, .skip, footer.site, .landing, .intro, .tabbar { display: none; }
  body { background: #fff; color: #000; }
}
