/* KipCa home page and getting-started guide (kipca.vn, from public/tutorial in the web image). */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Layout: the app's own palette (KipCa theme tokens). Phones carry the story; text sits beside them like a shift handover. */
:root {
  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --surface-alt: #F4EDE4;
  --line: #E8DED2;
  --ink: #2B1D14;
  --muted: #7A6A5C;
  --primary: #1F7A5C;
  --primary-soft: #DDF1E8;
  --accent: #C8762B;
  --accent-soft: #FBEBDA;
  --danger: #C2410C;
  --danger-soft: #FDE5D8;
  --frame: #2B1D14;
  --on-primary: #FFFFFF;
  --shadow: 0 30px 60px -30px rgba(43, 29, 20, 0.45);
  --f-body: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120E; --surface: #221B16; --surface-alt: #2C241E; --line: #352B24; --ink: #F5EEE7; --muted: #B3A396;
    --primary: #3FB58A; --primary-soft: #1E3A2F; --accent: #E39A55; --accent-soft: #3D2C1D; --danger: #F07B4A; --danger-soft: #40241A;
    --frame: #0c0907; --on-primary: #10241c; --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17120E; --surface: #221B16; --surface-alt: #2C241E; --line: #352B24; --ink: #F5EEE7; --muted: #B3A396;
  --primary: #3FB58A; --primary-soft: #1E3A2F; --accent: #E39A55; --accent-soft: #3D2C1D; --danger: #F07B4A; --danger-soft: #40241A;
  --frame: #0c0907; --on-primary: #10241c; --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
section { padding-block: 80px; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 900; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }
.eyebrow { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--primary); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.head { display: grid; gap: 14px; margin-bottom: 44px; }
.num { font-variant-numeric: tabular-nums; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 14px;
  background: var(--primary); color: var(--on-primary); font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 24px -12px var(--primary);
}
.btn span { display: inline-block; }
.btn:hover span { transform: translateX(4px); }
.btn:focus-visible, .tab:focus-visible, .shot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* phone frame */
.phone {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 390 / 844;
  border-radius: 40px; padding: 9px; background: var(--frame); box-shadow: var(--shadow);
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%; width: 76px; height: 20px; translate: -50% 0;
  background: var(--frame); border-radius: 12px; z-index: 2;
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: #FBF7F2; }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* hero */
.hero { padding-block: 48px 72px; display: grid; gap: 48px; grid-template-columns: 1.05fr 1fr; align-items: center; }
.hero-text { display: grid; gap: 22px; min-width: 0; }
.hero h1 .hl {
  color: var(--primary); background-image: linear-gradient(var(--accent-soft), var(--accent-soft));
  background-repeat: no-repeat; background-position: 0 88%; background-size: 100% 0.32em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.platforms { color: var(--muted); font-size: 0.92rem; }
/* language switch at the top right of both pages (/tutorial/ and /tutorial/en/) */
.lang { display: flex; justify-content: flex-end; gap: 4px; padding-top: 16px; font-size: 0.85rem; font-weight: 600; }
.lang a, .lang span { padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--primary); background: var(--primary-soft); }
.lang a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang [aria-current="page"] { background: var(--surface-alt); color: var(--ink); }
/* store buttons: our own (no store logos), dark like the usual store badges */
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-width: 168px; padding: 9px 18px 9px 14px;
  border-radius: 12px; background: var(--ink); color: var(--bg); text-decoration: none; line-height: 1.15;
  font-weight: 700; font-size: 1.12rem;
}
/* icons drawn once here as masks, so they take the button's text colour (img-src allows data: in both CSPs) */
.ico { width: 26px; height: 26px; flex: none; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ico-download { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2.5'/%3E%3Cpath d='M12 7v7m-3-3 3 3 3-3M10.5 18.5h3'/%3E%3C/svg%3E"); }
.ico-clock { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.store span { display: grid; }
.store small { font-size: 0.7rem; font-weight: 500; opacity: .8; letter-spacing: .02em; }
a.store:hover { background: var(--primary); color: var(--on-primary); }
a.store:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.store.soon { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); cursor: default; }
.store-note { color: var(--muted); font-size: 0.92rem; max-width: 56ch; }
.store-note b { color: var(--ink); }
.store-note a, .step p a { color: var(--primary); font-weight: 600; }
.closing .store { background: var(--ink); color: var(--bg); }
.closing .store.soon { background: transparent; color: var(--on-primary); box-shadow: inset 0 0 0 2px currentColor; opacity: .75; }
.closing .store-note { color: inherit; opacity: .85; }
.closing .store-note a { color: inherit; font-weight: 700; text-decoration: underline; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 8px; }
.stats div { display: grid; }
.stats strong { font-size: 1.6rem; font-weight: 800; }
.stats span { color: var(--muted); font-size: 0.85rem; }

.stage { position: relative; min-height: 560px; display: grid; place-items: center; min-width: 0; }
.stage .phone { position: absolute; width: 260px; }
.stage .p-back { transform: translate(-34%, 4%) rotate(-7deg); opacity: .96; }
.stage .p-front { transform: translate(26%, -2%) rotate(4deg); }
.toast {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px; max-width: 270px;
  padding: 11px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 16px 30px -18px rgba(43, 29, 20, .5); font-size: 0.86rem; line-height: 1.35;
}
.toast i { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .8rem; }
.toast.t1 { top: 6%; left: -2%; }
.toast.t2 { bottom: 9%; right: -3%; }
.toast b { font-weight: 700; }
.i-green { background: var(--primary-soft); color: var(--primary); }
.i-red { background: var(--danger-soft); color: var(--danger); }
.i-amber { background: var(--accent-soft); color: var(--accent); }

/* overview: what KipCa does, one line each */
.ov-sec { background: var(--surface-alt); }
.ov-sec .head { margin-bottom: 28px; }
.ov { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ov li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.ov-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.ov-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ov h3 { font-size: 1rem; margin-bottom: 2px; }
.ov p { color: var(--muted); font-size: .92rem; }

/* create a store: the app's step form, step by step */
.cs-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -20px 0 28px; }
.cs-where-k { font-weight: 700; font-size: .9rem; margin-right: 4px; }
.cs-pill { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.cs-pill b { color: var(--ink); }
.cs-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cs-step { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cs-bar { display: flex; gap: 4px; }
.cs-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.cs-bar i.on { background: var(--primary); }
.cs-n { font-size: .78rem; color: var(--muted); font-weight: 600; }
.cs-step > p { color: var(--muted); font-size: .92rem; }
.cs-step > p b { color: var(--ink); }
.cs-ui { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface-alt); display: grid; gap: 8px; font-size: .8rem; }
.cs-step > p + .cs-ui { margin-top: 6px; }
.ui-field { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; display: grid; font-weight: 600; }
.ui-field small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.ui-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; white-space: nowrap; }
.ui-chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ui-shift { display: flex; justify-content: space-between; gap: 8px; background: var(--surface); border-radius: 10px; padding: 6px 10px; }
.ui-shift span { color: var(--muted); }
.ui-stepper { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.ui-step { display: inline-flex; align-items: center; gap: 10px; }
.ui-step i { font-style: normal; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.ui-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-align: center; font-weight: 600; color: var(--muted); }
.ui-seg span { padding: 4px; border-radius: 7px; }
.ui-seg .on { background: var(--primary-soft); color: var(--primary); }
.ui-opt { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--muted); }
.ui-opt b { display: block; color: var(--ink); }
.ui-opt i { width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); }
.ui-opt.on { border-color: var(--primary); }
.ui-opt.on i { border: 4px solid var(--primary); }
.cs-after { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.cs-after > div { background: var(--surface-alt); border-radius: 16px; padding: 20px; display: grid; gap: 6px; align-content: start; }
.cs-after .when { font-size: .78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.cs-after p { color: var(--muted); font-size: .93rem; }
.cs-after p b { color: var(--ink); }
.cs-after > .cs-done { background: var(--primary-soft); display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.cs-tick { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 800; }
.cs-done h3 { margin-bottom: 4px; }

/* journey (scrollytelling) */
.tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--surface-alt); border-radius: 14px; margin-bottom: 36px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(43, 29, 20, .3); }
.journey { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.progress { position: absolute; left: 21px; top: 22px; width: 2px; height: 0; background: var(--primary); }
.step { position: relative; display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; padding-block: 22px 40px; min-height: 30vh; }
.step:last-child { min-height: 0; padding-bottom: 8px; }
.dot {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted); font-weight: 800;
}
.step.active .dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); transform: scale(1.08); }
.step-body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.step .time { font-size: 0.8rem; color: var(--accent); font-weight: 700; }
.step p { color: var(--muted); max-width: 52ch; }
.chip { justify-self: start; font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.step .inline-phone { display: none; }
.sticky { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 40px); display: grid; justify-items: center; gap: 14px; }
.sticky .phone { max-width: 300px; }
.sticky .phone img { opacity: 0; transform: scale(1.03); }
.sticky .phone img.on { opacity: 1; transform: none; }
.sticky .cap { font-size: 0.85rem; color: var(--muted); text-align: center; min-height: 2.6em; max-width: 30ch; }
.after-steps { margin-top: 28px; padding: 22px 24px; border-radius: 16px; background: var(--primary-soft); display: grid; gap: 6px; }
.after-steps strong { color: var(--primary); font-size: 1.05rem; }

/* preferred shifts highlight */
.pref-sec { position: relative; }
.pref-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.pref-left { display: grid; gap: 26px; min-width: 0; }
.badge-new { justify-self: start; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .82rem; }
.tt { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 20px 40px -32px rgba(43, 29, 20, .5); min-width: 0; }
.tt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tt-top b { font-size: 1rem; }
.tt-top span { color: var(--muted); font-size: .82rem; }
.tt-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); gap: 5px; font-size: .74rem; }
.tt-grid .d { text-align: center; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.tt-grid .r { font-weight: 700; display: grid; align-content: center; line-height: 1.2; }
.tt-grid .r small { font-weight: 500; color: var(--muted); font-size: .66rem; }
.c { height: 46px; border-radius: 9px; background: var(--surface-alt); display: grid; place-items: center; font-weight: 700; position: relative; }
.c.cls {
  background: repeating-linear-gradient(-45deg, var(--surface-alt) 0 6px, var(--line) 6px 8px);
  color: var(--muted); font-weight: 600; font-size: .66rem;
}
.c.pick { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.c.pick.got { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.c.pick.wait { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.tt-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.tt-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.tt-result { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: .86rem; font-weight: 600; }
.tt-result i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .75rem; flex: none; }
.pref-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pref-points li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.pref-points .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.pref-points h3 { font-size: 1.02rem; }
.pref-points p { color: var(--muted); font-size: .94rem; }
.pref-phones { position: relative; min-height: 600px; min-width: 0; }
.pref-phones .phone { position: absolute; width: 250px; }
.pref-phones .ph1 { left: 0; top: 0; transform: rotate(-4deg); }
.pref-phones .ph2 { right: 0; bottom: 0; transform: rotate(3deg); }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 56px; counter-reset: flow; }
.flow > div { background: var(--surface-alt); border-radius: 16px; padding: 20px; display: grid; gap: 6px; align-content: start; }
.flow .when { font-size: .78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.flow p { color: var(--muted); font-size: .93rem; }

/* on-this-page links under the hero */
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 40px; }
.toc a {
  padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.toc a:hover { border-color: var(--primary); color: var(--primary); }
.toc a:focus-visible, .faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* shift reports: a drawn report card (like the timetable), not a screenshot */
.rp-sec { background: var(--surface-alt); }
.rp-grid { display: grid; grid-template-columns: 1fr 0.95fr; gap: 56px; align-items: center; }
.rp-grid > * { min-width: 0; }
.rp-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; display: grid; gap: 12px;
  box-shadow: var(--shadow); max-width: 460px; width: 100%; justify-self: center;
}
.rp-top { display: grid; gap: 2px; }
.rp-top b { font-size: 1.1rem; }
.rp-top span { color: var(--muted); font-size: .82rem; }
.rp-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .9rem; padding-top: 4px; }
.rp-label .ok { font-size: .74rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 3px 9px; border-radius: 999px; }
.rp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph {
  aspect-ratio: 3 / 4; border-radius: 12px; position: relative; overflow: hidden; display: flex; align-items: flex-end;
  background: var(--surface-alt);
}
/* drawn stand-ins for the cleaning photos (img/clean-*.svg, no text inside, so both languages share them): the bar,
   the floor, the washroom with the empty toilet roll the note mentions. They are "photos", so they keep their own
   colours in dark mode too. */
.ph { background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(43, 29, 20, .08); }
.ph.p1 { background-image: url("img/clean-bar.svg"); }
.ph.p2 { background-image: url("img/clean-floor.svg"); }
.ph.p3 { background-image: url("img/clean-wc.svg"); }
.ph i {
  font-style: normal; font-size: .7rem; font-weight: 700; margin: 6px; padding: 2px 7px; border-radius: 6px;
  background: var(--surface); color: var(--ink);
}
.rp-note { font-size: .84rem; color: var(--muted); font-style: italic; }
.rp-cash { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 12px; font-size: .9rem; align-items: baseline; }
.rp-cash .h { color: var(--muted); font-size: .76rem; font-weight: 600; text-align: right; }
.rp-cash .k { font-weight: 600; }
.rp-cash .num { text-align: right; }
.rp-diff { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: .88rem; }
.rp-diff b { color: var(--accent); }
.rp-card .tt-result { margin-top: 2px; }
.rp-sec .flow > div { background: var(--surface); }

.plans-note { margin-top: 16px; color: var(--muted); font-size: .95rem; max-width: 70ch; }

/* questions owners ask */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; padding: 16px 28px 16px 0; position: relative; border-radius: 8px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-size: 1.3rem; color: var(--primary); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 16px; max-width: 70ch; }
.faq a { color: var(--primary); font-weight: 600; }

/* gallery */
.gallery-sec { background: var(--surface-alt); overflow: hidden; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 240px; gap: 28px; overflow-x: auto;
  padding: 10px 4px 34px; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.shot { scroll-snap-align: start; display: grid; gap: 14px; align-content: start; margin: 0; }
.shot .phone { max-width: 240px; border-radius: 34px; padding: 8px; }
.shot .phone .screen { border-radius: 27px; }
.shot .phone::before { width: 64px; height: 17px; top: 14px; }
.shot figcaption { display: grid; gap: 2px; }
.shot figcaption b { font-size: 1rem; }
.shot figcaption span { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.gallery-hint { color: var(--muted); font-size: 0.85rem; }

/* rhythm */
.loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.loop-col { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 14px; align-content: start; }
.loop-col .when { font-weight: 800; font-size: 1.3rem; }
.loop-col .bar { height: 6px; border-radius: 4px; background: var(--surface-alt); overflow: hidden; }
.loop-col .bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.loop-col ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; color: var(--muted); }
.loop-col li::marker { color: var(--primary); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: grid; gap: 10px; align-content: start; }
.plan.free { border: 2px solid var(--primary); }
.plan .name { font-weight: 700; }
.plan .price { font-size: 1.65rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.plan p { color: var(--muted); font-size: 0.92rem; }
.offer { margin-top: 18px; padding: 20px 24px; border-radius: 16px; border: 2px dashed var(--accent); background: var(--accent-soft); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.offer strong { color: var(--accent); font-size: 1.05rem; }

.closing {
  margin-block: 0 72px; border-radius: 28px; background: var(--primary); color: var(--on-primary);
  padding: 56px clamp(22px, 5vw, 64px); display: grid; gap: 18px; position: relative; overflow: hidden;
}
.closing .eyebrow, .closing .lede { color: inherit; opacity: .85; }
.closing .btn { background: var(--on-primary); color: var(--primary); box-shadow: none; justify-self: start; }
.closing::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid currentColor; opacity: .08;
}
/* footer: who runs the site and the policies (e-commerce rules) */
.site-foot {
  color: var(--muted); font-size: 0.85rem; line-height: 1.7; padding-block: 28px 40px; border-top: 1px solid var(--line);
  display: grid; gap: 20px 48px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
}
.site-foot strong { display: block; color: var(--ink); font-size: 0.9rem; margin-bottom: 6px; letter-spacing: .02em; }
.site-foot p { margin: 0; }
.site-foot a { color: inherit; }
.foot-links { display: flex; flex-direction: column; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--primary); text-decoration: underline; }
.foot-badge:empty { display: none; }
.foot-copy { grid-column: 1 / -1; }
@media (max-width: 720px) { .site-foot { grid-template-columns: 1fr; } }

/* motion: everything is visible at rest; JS only adds the "pre" state to things below the fold */
.reveal.pre { opacity: 0; transform: translateY(26px); }
.loop-col.reveal.pre .bar i { width: 0 !important; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
  .loop-col .bar i { transition: width 1.2s cubic-bezier(.2,.7,.2,1) .3s; }
  .hero-text > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero-text > :nth-child(2) { animation-delay: .08s; } .hero-text > :nth-child(3) { animation-delay: .16s; }
  .hero-text > :nth-child(4) { animation-delay: .24s; } .hero-text > :nth-child(5) { animation-delay: .32s; }
  .hero h1 .hl { animation: draw 1s cubic-bezier(.2,.7,.2,1) .6s both; }
  .stage .p-back { animation: inBack 1.1s cubic-bezier(.2,.8,.2,1) .15s both, floatB 7s ease-in-out 1.3s infinite; }
  .stage .p-front { animation: inFront 1.1s cubic-bezier(.2,.8,.2,1) .3s both, floatF 6s ease-in-out 1.4s infinite; }
  .toast { animation: pop .6s cubic-bezier(.3,1.4,.5,1) both; }
  .toast.t1 { animation-delay: 1s; } .toast.t2 { animation-delay: 1.5s; }
  .toast.swap { animation: swapOut .35s ease both; }
  .sticky .phone img { transition: opacity .5s ease, transform .6s ease; }
  .dot { transition: background-color .3s, border-color .3s, color .3s, transform .3s; }
  .progress { transition: height .5s ease; }
  .shot .phone { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
  .shot:hover .phone, .shot:focus-visible .phone { transform: translateY(-10px) rotate(-1.5deg); }
  /* the timetable plays when it scrolls into view; without .play it simply shows the end state */
  .tt.play .c.pick { animation: pickIn .45s cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(.5s + var(--i) * .22s); }
  .tt.play .c.pick.got { animation: pickIn .45s cubic-bezier(.3,1.4,.5,1) both, gotIt .5s ease both; animation-delay: calc(.5s + var(--i) * .22s), calc(2.6s + var(--i) * .15s); }
  .tt.play .c.pick.wait { animation: pickIn .45s cubic-bezier(.3,1.4,.5,1) both, waitIt .5s ease both; animation-delay: calc(.5s + var(--i) * .22s), calc(2.6s + var(--i) * .15s); }
  .tt.play .c.cls { animation: rise .5s ease both; }
  .tt.play .tt-result { animation: pop .6s cubic-bezier(.3,1.4,.5,1) 4s both; }
  .pref-phones .ph1 { animation: floatB2 7s ease-in-out infinite; }
  .pref-phones .ph2 { animation: floatF2 6s ease-in-out infinite; }
  .btn span { transition: transform .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes draw { from { background-size: 0% 0.32em; } }
@keyframes inBack { from { opacity: 0; transform: translate(-20%, 18%) rotate(-14deg); } }
@keyframes inFront { from { opacity: 0; transform: translate(40%, 16%) rotate(12deg); } }
@keyframes floatB { 0%, 100% { transform: translate(-34%, 4%) rotate(-7deg); } 50% { transform: translate(-34%, 1%) rotate(-6deg); } }
@keyframes floatF { 0%, 100% { transform: translate(26%, -2%) rotate(4deg); } 50% { transform: translate(26%, -5.5%) rotate(3deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.9); } }
@keyframes swapOut { to { opacity: 0; transform: translateY(-8px) scale(.96); } }
@keyframes pickIn { from { opacity: 0; transform: scale(.4); } }
@keyframes gotIt { from { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); } }
@keyframes waitIt { from { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); } }
@keyframes floatB2 { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-10px); } }
@keyframes floatF2 { 0%, 100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-12px); } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .stage { min-height: 520px; }
  .ov, .cs-steps { grid-template-columns: 1fr 1fr; }
  .cs-after { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .loop { grid-template-columns: 1fr; }
  .pref-grid, .rp-grid { grid-template-columns: 1fr; }
  .pref-phones { min-height: 520px; max-width: 520px; width: 100%; justify-self: center; }
  .flow { grid-template-columns: 1fr; }
  .journey { grid-template-columns: 1fr; }
  .sticky { display: none; }
  .step { min-height: 0; }
  .step .inline-phone { display: block; margin-top: 10px; }
  .step .inline-phone .phone { max-width: 220px; border-radius: 32px; padding: 7px; }
  .step .inline-phone .screen { border-radius: 26px; }
}
@media (max-width: 600px) {
  section { padding-block: 56px; }
  .stage { min-height: 430px; }
  .stage .phone { width: 196px; }
  .toast { font-size: .78rem; max-width: 220px; padding: 9px 11px; }
  .toast.t1 { left: 0; top: 2%; }
  .toast.t2 { right: 0; bottom: 4%; }
  .cs-steps, .plans { grid-template-columns: 1fr; }
  .ov { gap: 10px; }
  .ov li { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .ov-ic { width: 38px; height: 38px; }
  .ov p { font-size: .86rem; }
  .cs-where { margin-top: -28px; }
  .pref-phones { min-height: 400px; }
  .pref-phones .phone { width: 180px; }
  .tt { padding: 12px; }
  .tt-grid { grid-template-columns: 60px repeat(7, minmax(0, 1fr)); gap: 3px; font-size: .68rem; }
  .c { height: 38px; border-radius: 7px; }
  .c.cls { font-size: 0; }
  .toc { padding-bottom: 28px; }
  .toc a { padding: 6px 12px; font-size: .84rem; }
  .rp-card { padding: 16px; }
  .rp-cash { font-size: .84rem; gap: 6px 8px; }
}
