/* ARIA AUTOMATION public website - shared styles.
   Look C "Clinic white": white page, slate text, one calm blue, thin lines, square-ish corners.
   System fonts only (no outside requests). Light/dark follows the visitor's device setting. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --fg: #1e2a36;
  --muted: #4a5866;
  --rule: #e1e6ec;
  --blue: #1d5fa8;
  --blue-strong: #164b86;
  --on-blue: #ffffff;
  --stop: #a23b2a;
  --radius: 4px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* starts quickly, settles softly */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* starts softly, speeds up, eases out */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171d;
    --bg-alt: #182029;
    --fg: #e4e9ee;
    --muted: #a5b2bf;
    --rule: #2a3440;
    --blue: #7fb0e6;
    --blue-strong: #a3c8f0;
    --on-blue: #0d1a28;
    --stop: #f09a88;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
/* "How it works" glides down to its section (not with "reduce motion") */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.05rem/1.65 var(--font);
  overflow-wrap: break-word; /* a word wider than the screen (large phone text) wraps instead of pushing the page sideways */
  /* footer stays at the bottom on short pages (404) */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; display: block; }

a { color: var(--blue); text-underline-offset: 3px; }
/* no grey flash on tap; buttons and links give their own press feedback */
a, button { -webkit-tap-highlight-color: transparent; }
/* no double-tap-zoom wait on taps (pinch zoom still works) */
a, button, input, select, textarea, label { touch-action: manipulation; }
a:not(.btn):active { color: var(--blue-strong); }
/* hover colours only on devices with a mouse, so they don't stay "stuck" after a tap */
@media (hover: hover) and (pointer: fine) {
  a { transition: color 150ms ease; }
  a:hover { color: var(--blue-strong); }
}

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

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); }
h3 { font-size: 1.08rem; }
p, ul, ol { margin: 0; }
p, li { text-wrap: pretty; }

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--bg); padding: 0.5rem 0.8rem; z-index: 10;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.muted { color: var(--muted); }
.small { font-size: 0.93rem; }
.after { margin-top: 1rem; }
.narrow { max-width: 46rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.3rem 1.2rem; padding-block: 0.9rem;
}
.brand { color: var(--blue); text-decoration: none; font-weight: 600; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; }
.site-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; }
.site-nav a { color: var(--fg); text-decoration: none; font-size: 0.97rem; padding-block: 0.3rem; display: inline-block; }
@media (hover: hover) and (pointer: fine) {
  .brand:hover { color: var(--blue-strong); }
  .site-nav a:hover { color: var(--blue); }
}
.site-nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }

/* ---------- Sections ---------- */
.section { padding-block: 3rem; border-top: 1px solid var(--rule); }
.section.alt { background: var(--bg-alt); }
.section-head { display: grid; gap: 0.5rem; margin-bottom: 1.6rem; max-width: 42rem; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.6rem 1.15rem; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--blue); background: transparent; color: var(--blue);
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
  -webkit-user-select: none; user-select: none; /* a long press doesn't select the button's label */
}
.btn-solid { background: var(--blue); color: var(--on-blue); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--bg-alt); color: var(--blue-strong); border-color: var(--blue-strong); }
  .btn-solid:hover { background: var(--blue-strong); color: var(--on-blue); }
}
/* press feedback: a small, quick squeeze (left out with "reduce motion") */
@media (prefers-reduced-motion: no-preference) {
  .btn:active { transform: scale(0.97); }
}

/* ---------- Hero ---------- */
.hero { padding-block: 3.5rem 3rem; }
.hero .wrap { display: grid; gap: 1.2rem; }
.hero h1 { max-width: 36rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.note {
  border-left: 3px solid var(--blue); padding: 0.2rem 0 0.2rem 0.9rem;
  color: var(--muted); font-size: 0.95rem; max-width: 40rem;
}
.note strong { color: var(--fg); }

/* ---------- Lists with lines ---------- */
.lined { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.lined li { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
.soon { color: var(--muted); font-size: 0.9rem; }

.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.two-col h2 { margin-bottom: 1rem; }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 1.6rem; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step { counter-increment: step; border-left: 3px solid var(--blue); padding-left: 1rem; display: grid; gap: 0.35rem; align-content: start; }
.step::before { content: "Step " counter(step); color: var(--blue); font-weight: 600; font-size: 0.9rem; }

/* ---------- Video spot ---------- */
.video-spot {
  aspect-ratio: 16 / 9; width: 100%;
  border: 1px dashed var(--muted); border-radius: var(--radius); background: var(--bg-alt);
  display: grid; place-items: center; text-align: center; padding: 1.2rem;
}
.video-spot .inner { display: grid; gap: 0.5rem; justify-items: center; max-width: 30rem; }
/* the demo reel is portrait (9:16), sized for a phone screen and centred on wide screens */
.video-reel {
  width: 100%; max-width: 22rem; aspect-ratio: 9 / 16; margin-inline: auto;
  max-width: min(22rem, 47svh); /* on short phones the whole video and its controls fit on screen */
  border-radius: var(--radius); background: var(--bg-alt); object-fit: cover;
  border: 1px solid var(--rule);
}
.video-caption { text-align: center; margin-top: 0.75rem; }

/* "Try the clinic page demo" under How it works */
.demo-try { margin-top: 1.6rem; display: grid; gap: 0.6rem; justify-items: start; max-width: 40rem; }

/* ---------- Pilot band ---------- */
.band { background: var(--bg-alt); border-top: 1px solid var(--rule); padding-block: 3rem; }
.band .wrap { display: grid; gap: 1rem; justify-items: start; }
@media (min-width: 800px) { .band .wrap { grid-template-columns: 1fr auto; align-items: center; } }
.band .wrap > div:not(.actions) { display: grid; gap: 0.4rem; }

/* ---------- Page title (inner pages) ---------- */
.page-head { padding-block: 3rem 2.2rem; }
.page-head .wrap { display: grid; gap: 0.9rem; }

/* ---------- Prices ---------- */
.plans { display: grid; gap: 1rem; }
@media (min-width: 820px) { .plans { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; } }
.plan {
  border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.6rem; background: var(--bg);
}
/* the last line of each plan (button or setup fee) sits at the bottom, level across the three boxes */
.plan > :last-child { margin-top: auto; padding-top: 0.6rem; }
.plan h2 { font-size: 1.2rem; }
.price { font-size: 2.4rem; font-size: min(2.4rem, 13vw); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price small { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.ticks { list-style: none; padding: 0; display: grid; gap: 0.55rem; margin-top: 0.4rem; font-size: 0.97rem; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--blue); font-weight: 700; }

/* ---------- Boxes (privacy page) ---------- */
.boxes { display: grid; gap: 1rem; }
@media (min-width: 820px) { .boxes { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
.box { border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem 1.4rem; background: var(--bg); display: grid; gap: 0.6rem; align-content: start; }
.box h3 { font-size: 1.12rem; }
.box.no h2, .box.no h3 { color: var(--stop); }
.box h2 { font-size: 1.35rem; }
@media (min-width: 820px) { .boxes.three { grid-template-columns: repeat(3, 1fr); } }

/* How it works, in boxes (home page) */
.steps.boxed { gap: 1rem; }
@media (min-width: 760px) { .steps.boxed { gap: 1.2rem; } }
.steps.boxed .step {
  border: 1px solid var(--rule); border-top: 3px solid var(--blue); border-radius: 0;
  background: var(--bg); padding: 1.4rem 1.3rem;
}
.steps.boxed .step::before {
  content: counter(step);
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--blue); color: var(--on-blue); font-weight: 700; font-size: 1rem; margin-bottom: 0.3rem;
}
.crosses { list-style: none; padding: 0; display: grid; gap: 0.55rem; margin-top: 0.4rem; font-size: 0.97rem; }
.crosses li { position: relative; padding-left: 1.6rem; }
.crosses li::before { content: "\2715"; position: absolute; left: 0; top: 0; color: var(--stop); font-weight: 700; }
.todo-list { padding-left: 1.4rem; display: grid; gap: 0.7rem; max-width: 46rem; }
.todo-list li::marker { color: var(--blue); font-weight: 700; }

/* ---------- Pilot form ---------- */
.pilot-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .pilot-grid { grid-template-columns: 1.15fr 0.85fr; gap: 2.4rem; align-items: start; } }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.97rem; }
.field .hint { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--fg); background: var(--bg);
  border: 1px solid var(--muted); border-radius: var(--radius);
  padding: 0.65rem 0.75rem; min-height: 46px; width: 100%;
}
.field textarea { min-height: 6rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: var(--stop); }
.error { color: var(--stop); font-size: 0.9rem; font-weight: 600; }
.error:empty { display: none; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
/* phone + email: the phone label can wrap to two lines, so line the boxes up at the bottom */
.field-row.bottom { align-items: end; }
.plain-list { list-style: none; padding: 0; display: grid; gap: 0.4rem; font-size: 0.97rem; }
.warn { border-left: 3px solid var(--stop); padding-left: 0.9rem; font-size: 0.93rem; color: var(--muted); }
.warn strong { color: var(--fg); }
.send-note { font-size: 0.9rem; color: var(--muted); }
.form-done { border: 1px solid var(--blue); border-radius: 6px; padding: 1rem 1.1rem; }
.form-done:empty { display: none; }
/* error lines and the "sent" message ease in instead of popping in
   (with "reduce motion": fade only, no movement) */
.error { transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out); }
.form-done { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
@starting-style {
  .error, .form-done { opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    .error { transform: translateY(-4px); }
    .form-done { transform: translateY(4px); }
  }
}
.side { display: grid; gap: 1.6rem; }
.side .box ol { padding-left: 1.3rem; display: grid; gap: 0.55rem; font-size: 0.97rem; }
.side .box li::marker { color: var(--blue); font-weight: 700; }
.field .counter:empty { display: none; }

/* Large phone text: boxes may shrink below their longest word, and long addresses may break,
   so nothing pushes the page sideways */
.plans > *, .boxes > *, .steps > *, .pilot-grid > * { min-width: 0; }
.site-footer a, .plain-list a, .form-done { overflow-wrap: anywhere; }

/* The free pilot stands out: solid blue panel */
.plan.first { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.plan.first .price small,
.plan.first .muted,
.plan.first .soon { color: var(--on-blue); opacity: 0.88; }
.plan.first .ticks li::before { color: var(--on-blue); }
.plan.first .btn { background: var(--on-blue); color: var(--blue); border-color: var(--on-blue); }
@media (hover: hover) and (pointer: fine) {
  .plan.first .btn:hover { background: var(--bg-alt); color: var(--blue-strong); }
}
.plan.first :focus-visible { outline-color: var(--on-blue); }
/* dark mode: the free-pilot box keeps the brand blue with white text instead of turning pale */
@media (prefers-color-scheme: dark) {
  .plan.first { --blue: #1d5fa8; --blue-strong: #164b86; --on-blue: #ffffff; --bg-alt: #f5f7f9; }
}
.fineprint-box { border-left: 3px solid var(--rule); padding-left: 0.9rem; color: var(--muted); font-size: 0.95rem; display: grid; gap: 0.5rem; max-width: 46rem; }

/* ---------- Logo intro (first page of a visit, see intro.js) ----------
   The tooth and name fade in and settle (0-0.2 s), then come forward towards the visitor and
   disappear (0.45-0.8 s) while the cover fades away with them (0.5-0.8 s): done in 0.8 s.
   Nothing spins, so it never looks like a loading screen. */
.intro-screen { display: none; }
html.intro .intro-screen {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; overflow: hidden;
  background: var(--bg);
  animation: intro-out 300ms var(--ease-in-out) 500ms forwards;
}
.intro-inner {
  display: grid; gap: 0.9rem; justify-items: center; color: var(--blue); font-weight: 600; font-size: 1.05rem;
  animation: intro-in 200ms var(--ease-out) both, intro-forward 350ms var(--ease-in-out) 450ms forwards;
}
.intro-ring {
  width: 104px; height: 104px; border-radius: 50%;
  border: 1.5px solid var(--rule);
  display: grid; place-items: center;
}
.intro-tooth { width: 54px; height: 54px; }
@keyframes intro-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes intro-forward { to { opacity: 0; transform: scale(1.8); } }
@keyframes intro-fade { from { opacity: 0; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .intro-inner { animation: intro-fade 200ms var(--ease-out) both; } /* fade only, no growing or coming forward */
  html.intro .intro-screen { animation-delay: 300ms; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: 2.2rem 2.6rem; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 1.4rem; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h2 { font-size: 0.95rem; color: var(--fg); margin-bottom: 0.3rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.25rem; }
.site-footer .fineprint { grid-column: 1 / -1; font-size: 0.88rem; border-top: 1px solid var(--rule); padding-top: 1rem; }

/* ---------- Touch screens: links at least 44 px tall, so a thumb hits the right one ---------- */
@media (pointer: coarse) {
  .site-header .wrap { padding-block: 0.4rem; row-gap: 0; }
  .brand { padding-block: 0.5rem; }
  .site-nav ul { row-gap: 0; }
  .site-nav a { padding-block: 0.6rem; }
  .site-footer ul { gap: 0; margin-block: -0.6rem; }
  .site-footer ul a, .plain-list a { display: inline-block; padding-block: 0.6rem; }
  .plain-list { gap: 0; }
  .plain-list li { min-height: 44px; display: flex; align-items: center; }
}
