/* Smile ResiPro — site styles
   Palette taken from the app: ink background, enamel mint for actions,
   and the layer colours of the app's own illustrations (shell blue, opaque rose,
   dentin amber, enamel ivory). */

:root {
  --ink: #071313;
  --ink-2: #0c1c1c;
  --panel: #102222;
  --line: rgba(170, 205, 199, 0.14);
  --line-strong: rgba(170, 205, 199, 0.26);
  --ivory: #f1ebe0;
  --mist: #a3b6b2;
  --mist-2: #7f9591;
  --enamel: #3dcdb7;
  --enamel-ink: #04201c;
  --dentin: #e7a24e;
  --shell: #8ab9ec;
  --opaque: #e9949a;
  --plate: #fbfaf7;

  --display: "League Spartan", "Jost", system-ui, sans-serif;
  --body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.012em; }
strong { font-weight: 500; }

:focus-visible { outline: 2px solid var(--enamel); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--enamel); color: var(--enamel-ink); padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.skip:focus { left: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--body); font-size: 17px; font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--enamel); color: var(--enamel-ink); }
.btn-primary:hover { background: #63dcc9; }
.btn-ghost { border-color: var(--line-strong); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--ivory); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 19, 19, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 86px; transition: height .35s ease; }
.site-header.is-scrolled .header-row { height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; color: var(--ivory); line-height: 1; padding-top: 3px; }
.brand-name span { color: var(--enamel); }
.site-footer .brand img { width: 44px; height: 44px; border-radius: 12px; }
.site-footer .brand-name { font-size: 25px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 16px; font-weight: 400; color: var(--mist); text-decoration: none; }
.nav a:hover { color: var(--ivory); }
.nav .btn { color: var(--enamel-ink); }
@media (max-width: 860px) { .nav a:not(.btn) { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -20% -40% 30%; height: 90%;
  background: radial-gradient(closest-side, rgba(61, 205, 183, 0.16), rgba(231, 162, 78, 0.05) 60%, transparent);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); max-width: 13ch; }
.hero-lead { margin-top: 26px; font-size: clamp(18px, 1.6vw, 21px); color: var(--mist); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-note { margin-top: 18px; font-size: 15px; color: var(--mist-2); }

.phone {
  position: relative; width: min(330px, 78vw); margin-left: auto; margin-right: auto;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg, #233436, #0d1919 55%, #1a2a2b);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.phone img { border-radius: 36px; width: 100%; aspect-ratio: 560 / 1140; object-fit: cover; object-position: top; background: #0b1717; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .hero .phone { animation: rise 1s .2s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .phone { width: min(290px, 72vw); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: clamp(32px, 4vw, 50px); }
.section-head p { margin-top: 18px; color: var(--mist); font-size: 19px; }
.fineprint { font-size: 14px; color: var(--mist-2); line-height: 1.55; }

/* ---------- Layer by layer (signature) ---------- */
.layers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.plate {
  position: relative; border-radius: var(--radius-l); background: var(--plate);
  aspect-ratio: 760 / 943; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.plate img.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .plate img { transition: none; } }
.plate-tag {
  position: absolute; left: 18px; top: 18px; z-index: 2;
  background: rgba(7, 19, 19, 0.86); color: var(--ivory);
  font-size: 14px; font-weight: 400; padding: 6px 12px; border-radius: 999px;
}

.layer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.layer-btn {
  --c: var(--ivory);
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; align-items: start;
  width: 100%; text-align: left; padding: 18px 18px 18px 14px;
  background: transparent; color: var(--ivory); border: 0; border-radius: var(--radius-m);
  font: inherit; cursor: pointer; position: relative;
  transition: background-color .2s ease;
}
.layer-btn:hover { background: rgba(255, 255, 255, 0.03); }
.layer-btn[aria-selected="true"] { background: var(--panel); }
.layer-num {
  grid-row: span 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 19px; padding-top: 3px;
  border: 1.5px solid var(--c); color: var(--c);
}
.layer-btn[aria-selected="true"] .layer-num { background: var(--c); color: var(--ink); }
.layer-name { font-family: var(--display); font-weight: 600; font-size: 22px; padding-top: 8px; }
.layer-desc { color: var(--mist); font-size: 16.5px; line-height: 1.55; max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.layer-btn[aria-selected="true"] .layer-desc { max-height: 9em; }
@media (prefers-reduced-motion: reduce) { .layer-desc { transition: none; } }
.layer-btn[data-layer="1"] { --c: var(--shell); }
.layer-btn[data-layer="2"] { --c: var(--opaque); }
.layer-btn[data-layer="3"] { --c: var(--dentin); }
.layer-btn[data-layer="4"] { --c: var(--ivory); }
.layers .fineprint { margin-top: 22px; padding-left: 14px; }

@media (max-width: 860px) {
  .layers { grid-template-columns: 1fr; }
  .plate { max-width: 460px; width: 100%; margin: 0 auto; }
}

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 72px);
  align-items: center; padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step-copy { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; }
.step-num {
  font-family: var(--display); font-weight: 700; font-size: clamp(54px, 6vw, 80px); line-height: .85;
  color: transparent; -webkit-text-stroke: 1.5px var(--dentin); padding-top: 4px;
}
.step h3 { font-size: clamp(24px, 2.4vw, 30px); padding-top: 6px; }
.step p { grid-column: 2; margin: 12px 0 0; color: var(--mist); max-width: 30em; }
.step-shots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 22px); max-width: 520px; justify-self: end; width: 100%; }
.shot { margin: 0; }
.shot img { border-radius: 22px; border: 1px solid var(--line-strong); width: 100%; aspect-ratio: 560 / 1000; object-fit: cover; object-position: top; background: var(--panel); }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--mist-2); }
@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; }
  .step p { grid-column: 1 / -1; }
  .step-shots { justify-self: start; }
}

/* ---------- Coverage ---------- */
.cover-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); }
.cover-item { padding: 30px 0 34px; border-top: 1px solid var(--line); }
.cover-item h3 { font-size: 24px; }
.cover-item p { margin: 12px 0 0; color: var(--mist); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 15px; font-size: 16px; color: var(--ivory); }
@media (max-width: 760px) { .cover-grid { grid-template-columns: 1fr; } }

/* ---------- Videos ---------- */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-m); overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video h3 { margin-top: 18px; font-size: 22px; }
.video p { margin: 6px 0 0; color: var(--mist); font-size: 16.5px; }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }
.plan { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius-m); padding: 28px 28px 30px; display: flex; flex-direction: column; }
.plan-featured { border-color: var(--enamel); background: rgba(61, 205, 183, 0.06); }
.plan h3 { font-size: 22px; }
.plan-price { margin-top: 16px; font-family: var(--display); font-weight: 600; font-size: 46px; line-height: 1; }
.plan-price small { font-family: var(--body); font-weight: 300; font-size: 17px; color: var(--mist); margin-left: 6px; }
.plan p { margin: 12px 0 0; color: var(--mist); font-size: 16.5px; }
.plan-flag { position: absolute; top: 26px; right: 24px; background: var(--enamel); color: var(--enamel-ink); font-size: 13.5px; font-weight: 500; padding: 4px 11px; border-radius: 999px; }
.pricing-after { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.pricing-after .fineprint { max-width: 34em; margin: 0; }
@media (max-width: 640px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- Creator ---------- */
.creator { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.creator-photo { border-radius: var(--radius-l); overflow: hidden; background: #000; max-width: 380px; }
.creator h2 { font-size: clamp(30px, 3.6vw, 46px); }
.creator p { margin-top: 20px; color: var(--mist); font-size: 19px; max-width: 32em; }
.text-link { color: var(--enamel); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { color: #7fe4d4; }
@media (max-width: 760px) { .creator { grid-template-columns: 1fr; } .creator-photo { max-width: 300px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.5px solid var(--mist); border-bottom: 1.5px solid var(--mist); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: -4px 0 24px; color: var(--mist); max-width: 40em; }

/* ---------- Closing CTA ---------- */
.closing { text-align: center; }
.closing img { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 26px; }
.closing h2 { font-size: clamp(34px, 4.6vw, 58px); }
.closing p { margin: 18px auto 30px; color: var(--mist); max-width: 30em; font-size: 19px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--mist); font-size: 15.5px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; color: var(--mist); }
.footer-links a:hover { color: var(--ivory); }
.footer-meta { margin-top: 30px; display: grid; gap: 6px; color: var(--mist-2); font-size: 14px; max-width: 60em; }
.footer-meta p { margin: 0; }

/* ---------- Legal and support pages ---------- */
.doc { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 110px); }
.doc-body { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); }
.doc .doc-date { margin-top: 14px; color: var(--mist-2); font-size: 16px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; font-family: var(--body); font-weight: 500; letter-spacing: 0; }
.doc p, .doc li { color: #d3dcd9; font-size: 17.5px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--enamel); }
.doc a.btn-primary { color: var(--enamel-ink); text-decoration: none; }
.callout { border-left: 3px solid var(--dentin); background: var(--panel); padding: 16px 20px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 22px 0; }
.callout p { margin: 0; }
.support-actions { margin: 28px 0 10px; }

/* =====================================================================
   Motion layer. Everything below is switched on by the .motion class,
   which site.js adds only when the visitor has not asked for reduced motion.
   ===================================================================== */

@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Scroll progress line */
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--dentin), var(--enamel)); }

/* Hero: particles, breathing glow, word reveal */
.hero-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.motion .hero::before { animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .7; transform: scale(1); } to { opacity: 1; transform: scale(1.12) translateX(-3%); } }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero h1 .w > span { display: inline-block; }
.motion .hero h1 .w > span { animation: wordUp .9s cubic-bezier(.2,.75,.15,1) both; }
@keyframes wordUp { from { transform: translateY(105%); opacity: 0; } to { transform: none; opacity: 1; } }
.motion .hero-copy > h1 { animation: none; }

/* Hero visual: floating phone + build-up card */
.hero-visual { position: relative; width: min(420px, 100%); margin-left: auto; margin-right: auto; padding: 10px 0 40px; }
.hero-visual .phone { margin-right: 0; width: min(300px, 70vw); }
.motion .hero-visual .phone { animation: rise 1s .25s cubic-bezier(.2,.7,.2,1) both, float 7s 1.3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.build-card {
  position: absolute; left: 0; bottom: 0; width: 46%; min-width: 160px;
  background: rgba(16, 34, 34, 0.92); border: 1px solid var(--line-strong); border-radius: 22px; padding: 10px 10px 12px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.motion .build-card { animation: cardIn 1s .7s cubic-bezier(.2,.7,.2,1) both, float 7s 2s ease-in-out infinite reverse; }
@keyframes cardIn { from { opacity: 0; transform: translate(-24px, 24px) scale(.94); } to { opacity: 1; transform: none; } }
.build-plate { position: relative; aspect-ratio: 760 / 943; border-radius: 14px; overflow: hidden; background: var(--plate); }
.build-plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.build-plate img.is-under { opacity: 1; z-index: 1; }
.build-plate img.is-active { opacity: 1; z-index: 2; }
.motion .build-plate img.is-active { animation: wipeUp 1.1s cubic-bezier(.65,0,.35,1) both; }
@keyframes wipeUp { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.build-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 10px 4px 8px; }
.build-label { font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.1; padding-top: 2px; }
.motion .build-label.swap { animation: labelIn .5s ease both; }
@keyframes labelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.build-count { font-size: 13px; color: var(--mist); }
.build-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 4px; }
.build-bar i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; position: relative; }
.build-bar i::after { content: ""; position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: var(--c, var(--enamel)); }
.build-bar i:nth-child(1) { --c: var(--shell); } .build-bar i:nth-child(2) { --c: var(--opaque); } .build-bar i:nth-child(3) { --c: var(--dentin); } .build-bar i:nth-child(4) { --c: var(--ivory); }
.build-bar i.done::after { transform: scaleX(1); }
.build-bar i.now::after { transform: scaleX(1); transition: transform var(--dur, 2.6s) linear; }
.build-bar i.reset::after { transition: none; transform: scaleX(0); }
@media (max-width: 860px) { .hero-visual { padding-bottom: 28px; } .build-card { width: 44%; } }

/* Brand strip */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); padding: 22px 0; }
.marquee-track { display: flex; align-items: center; gap: 44px; width: max-content; }
.marquee-track span { font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5vw, 64px); line-height: 1; padding-top: .1em; color: var(--ivory); letter-spacing: -0.01em; }
.marquee-track span.o { color: transparent; -webkit-text-stroke: 1.5px var(--dentin); }
.marquee-track img { width: 40px; height: 40px; border-radius: 10px; opacity: .9; }
.motion .marquee-track { animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll reveals */
.motion [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.motion [data-reveal="left"] { transform: translateX(-40px); }
.motion [data-reveal="right"] { transform: translateX(40px); }
.motion [data-reveal="scale"] { transform: scale(.92); }
.motion [data-reveal="up"] { transform: translateY(60px) rotate(-2deg); }
.motion [data-reveal].d2 { transition-delay: .15s; }
.motion .shot.d2[data-reveal="up"] { transform: translateY(90px) rotate(2deg); }
.motion [data-reveal].in { opacity: 1; transform: none; }

/* Chips pop in one after another */
.motion .cover-item .chips li { opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .5s ease, transform .5s cubic-bezier(.3,1.4,.5,1); }
.motion .cover-item.in .chips li { opacity: 1; transform: none; }
.motion .cover-item.in .chips li:nth-child(2) { transition-delay: .07s; } .motion .cover-item.in .chips li:nth-child(3) { transition-delay: .14s; }
.motion .cover-item.in .chips li:nth-child(4) { transition-delay: .21s; } .motion .cover-item.in .chips li:nth-child(5) { transition-delay: .28s; }
.motion .cover-item.in .chips li:nth-child(6) { transition-delay: .35s; }

/* Step numbers fill with dentin amber as they arrive */
.step-num { background: linear-gradient(90deg, var(--dentin) 50%, transparent 50%); background-size: 200% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; }
.motion .step-num { transition: background-position 1.2s .35s cubic-bezier(.65,0,.35,1); }
.step-copy.in .step-num, html:not(.motion) .step-num { background-position: 0 0; }

/* Layer stepper: wipe-up transition and autoplay progress */
.plate img.is-under { opacity: 1; z-index: 1; }
.plate img.is-active { z-index: 2; }
.motion .plate img { transition: none; }
.motion .plate img.is-active { animation: wipeUp 1s cubic-bezier(.65,0,.35,1) both; }
.layer-progress { position: absolute; left: 76px; right: 18px; bottom: 8px; height: 2px; border-radius: 2px; background: transparent; overflow: hidden; }
.layer-progress::after { content: ""; position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: var(--c); }
.autoplay .layer-btn[aria-selected="true"] .layer-progress { background: rgba(255, 255, 255, 0.08); }
.autoplay .layer-btn[aria-selected="true"] .layer-progress::after { animation: fillBar var(--step, 3.4s) linear forwards; }
@keyframes fillBar { to { transform: scaleX(1); } }

/* Buttons */
.btn { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: skewX(-20deg); }
.motion .btn-primary:hover::after { animation: shine .8s ease; }
.motion .btn-shine::after { animation: shine 1.1s 2.2s ease, shine 1.1s 7s ease; }
@keyframes shine { to { left: 130%; } }
.motion .btn:active { transform: scale(.97); }

/* Annual plan: rotating light around the border */
.plan-featured { border: 1.5px solid transparent; background: linear-gradient(#0f2524, #0f2524) padding-box, conic-gradient(from var(--spin), rgba(61, 205, 183, .25), var(--enamel), rgba(231, 162, 78, .9), rgba(61, 205, 183, .25) 40%, rgba(61, 205, 183, .25)) border-box; }
.motion .plan-featured { animation: spin 6s linear infinite; }
@keyframes spin { to { --spin: 360deg; } }
.motion .plan { transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .9s cubic-bezier(.2,.7,.2,1); }
.motion .plan.in:hover { transform: translateY(-6px); }

/* Videos and screenshots lift on hover */
.motion .video-frame { transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s ease; }
.motion .video-frame:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.shot img { will-change: transform; }

/* Closing: icon with ripples */
.closing-icon { position: relative; display: block; width: 84px; height: 84px; margin: 0 auto 30px; }
.closing-icon img { margin: 0; position: relative; z-index: 1; }
.closing-icon::before, .closing-icon::after { content: ""; position: absolute; inset: 0; border-radius: 22px; border: 1.5px solid var(--enamel); opacity: 0; }
.motion .closing-icon::before { animation: ripple 3.2s ease-out infinite; }
.motion .closing-icon::after { animation: ripple 3.2s 1.6s ease-out infinite; }
@keyframes ripple { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }

/* FAQ answers slide open */
.motion .faq details[open] p { animation: faqIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-dust { display: none; }
}

/* Self-hosted videos */
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--panel); }
.video-more { margin-top: 30px; }

/* ---------- Header logo: larger, animated ---------- */
.brand-lg { gap: 15px; }
.brand-mark { position: relative; display: block; width: 54px; height: 54px; flex: none; transition: width .35s ease, height .35s ease; }
.brand-mark img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 15px; box-shadow: 0 0 0 1px rgba(170, 205, 199, 0.22), 0 8px 24px rgba(0, 0, 0, 0.45); transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.brand-mark::before { content: ""; position: absolute; inset: -10px; border-radius: 24px; background: radial-gradient(circle, rgba(61, 205, 183, 0.5), rgba(231, 162, 78, 0.12) 55%, transparent 72%); opacity: .35; z-index: 0; pointer-events: none; }
.brand-mark::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 15px; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%); background-size: 260% 100%; background-position: 160% 0; mix-blend-mode: screen; }
.brand-lg .brand-name { font-size: 31px; padding-top: 4px; transition: font-size .35s ease; }
.brand-lg .bw1 { color: var(--ivory); }
.brand-lg .bw2 { background: linear-gradient(90deg, var(--enamel) 0%, var(--enamel) 42%, #d8fff7 50%, var(--enamel) 58%, var(--enamel) 100%); background-size: 320% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-header.is-scrolled .brand-mark { width: 44px; height: 44px; }
.site-header.is-scrolled .brand-lg .brand-name { font-size: 26px; }
.brand-lg:hover .brand-mark img { transform: rotate(-8deg) scale(1.07); }

.motion .brand-mark img { animation: markIn 1s cubic-bezier(.3,1.45,.5,1) backwards; }
.motion .brand-mark::before { animation: halo 3.8s 1.1s ease-in-out infinite; }
.motion .brand-mark::after { animation: glint 5.5s 1.3s ease-in-out infinite; }
.motion .brand-lg .bw1, .motion .brand-lg .bw2 { display: inline-block; }
.motion .brand-lg .bw1 { animation: wordIn .7s .25s cubic-bezier(.2,.75,.15,1) backwards; }
.motion .brand-lg .bw2 { animation: wordIn .7s .42s cubic-bezier(.2,.75,.15,1) backwards, shimmerText 6s 1.8s linear infinite; }
@keyframes markIn { from { opacity: 0; transform: scale(.35) rotate(-24deg); } to { opacity: 1; transform: none; } }
@keyframes halo { 0%, 100% { opacity: .2; transform: scale(.88); } 50% { opacity: .75; transform: scale(1.12); } }
@keyframes glint { 0% { background-position: 160% 0; } 28%, 100% { background-position: -70% 0; } }
@keyframes wordIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes shimmerText { 0% { background-position: 100% 0; } 35%, 100% { background-position: 0% 0; } }

@media (max-width: 600px) {
  .header-row { height: 74px; }
  .brand-lg { gap: 11px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-mark img { border-radius: 12px; }
  .brand-lg .brand-name { font-size: 25px; }
  .site-header.is-scrolled .brand-mark { width: 38px; height: 38px; }
  .site-header.is-scrolled .brand-lg .brand-name { font-size: 22px; }
}

/* ---------- App Store badge ---------- */
.store-badge { position: relative; display: inline-block; line-height: 0; border-radius: 12px; overflow: hidden; vertical-align: middle; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
.store-badge img { display: block; height: auto; }
.store-badge::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: skewX(-20deg); pointer-events: none; }
.store-badge:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(61, 205, 183, 0.22); }
.motion .store-badge:hover::after { animation: shine .8s ease; }
.store-badge-hero { box-shadow: 0 0 0 0 rgba(61, 205, 183, 0.45); }
.motion .store-badge-hero { animation: badgeGlow 3.2s 2.4s ease-out infinite; }
.motion .store-badge-hero::after { animation: shine 1.1s 1.6s ease, shine 1.1s 8s ease; }
@keyframes badgeGlow { 0% { box-shadow: 0 0 0 0 rgba(61, 205, 183, 0.45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(61, 205, 183, 0); } }
.hero-actions { align-items: center; }
.footer-badge { margin-top: 26px; }
.closing .store-badge { margin-top: 4px; }
.closing .store-badge img { width: auto; height: 64px; margin: 0; border-radius: 0; }
.site-footer .store-badge img { width: auto; height: 44px; }
@media (max-width: 600px) { .store-badge-hero img { height: 54px; width: auto; } }

/* =====================================================================
   Composite library
   ===================================================================== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lib-hero { padding: clamp(40px, 6vw, 80px) 0 10px; position: relative; }
.lib-hero h1 { font-size: clamp(42px, 6vw, 76px); }
.lib-lead { margin-top: 18px; color: var(--mist); font-size: clamp(18px, 1.6vw, 21px); max-width: 40em; }
.lib-search { position: relative; margin-top: 34px; max-width: 760px; }
.lib-search input {
  width: 100%; height: 68px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--panel);
  color: var(--ivory); font: 400 20px/1 var(--body); padding: 0 120px 0 62px; outline: none;
  transition: border-color .2s ease, box-shadow .3s ease;
}
.lib-search input::placeholder { color: var(--mist-2); }
.lib-search input:focus { border-color: var(--enamel); box-shadow: 0 0 0 6px rgba(61, 205, 183, 0.12); }
.lib-search input::-webkit-search-cancel-button { display: none; }
.lib-search-ic { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); fill: none; stroke: var(--mist); stroke-width: 2; stroke-linecap: round; }
.lib-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--mist); font: 400 15px var(--body); cursor: pointer; }
.lib-clear:hover { color: var(--ivory); border-color: var(--ivory); }
.lib-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); }
.seg-b { border: 0; background: transparent; color: var(--mist); font: 400 15.5px var(--body); padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.seg-b:hover { color: var(--ivory); }
.seg-b.is-on { background: var(--enamel); color: var(--enamel-ink); font-weight: 500; }
.sel select { height: 46px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ivory); font: 400 15.5px var(--body); padding: 0 40px 0 18px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 22px) 20px, calc(100% - 16px) 20px; background-size: 6px 6px; background-repeat: no-repeat; }
.mylist { height: 46px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ivory); font: 400 15.5px var(--body); padding: 0 16px 0 18px; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.mylist b { min-width: 26px; height: 26px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-weight: 500; font-size: 14px; }
.mylist.has b { background: var(--dentin); color: var(--ink); }
.mylist[aria-pressed="true"] { border-color: var(--dentin); background: rgba(231, 162, 78, 0.1); }
.lib-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.lib-count { margin: 0; color: var(--mist); font-size: 16px; }
.lib-count b { color: var(--ivory); font-weight: 500; }
.lib-copy { border: 0; background: transparent; color: var(--dentin); font: 500 15.5px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.lib-results { padding: 26px 0 clamp(56px, 7vw, 90px); }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.sys { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-m); background: linear-gradient(180deg, rgba(16, 34, 34, 0.9), rgba(12, 28, 28, 0.9)); padding: 22px 22px 20px; transition: border-color .25s ease, transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; scroll-margin-top: 110px; }
.sys[hidden] { display: none !important; }
.sys:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.sys:target { border-color: var(--enamel); }
.sys-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sys-m { margin: 0; font-size: 14px; color: var(--mist); letter-spacing: 0.01em; }
.sys-name { font-size: 24px; margin-top: 4px; }
.star { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--mist); transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.star svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.star:hover { color: var(--dentin); border-color: var(--dentin); }
.star[aria-pressed="true"] { color: var(--dentin); border-color: var(--dentin); background: rgba(231, 162, 78, 0.12); }
.star[aria-pressed="true"] svg { fill: var(--dentin); }
.star.pop { animation: starPop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes starPop { 0% { transform: scale(.7) rotate(-20deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: none; } }
.sys-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.tg { font-size: 13.5px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--mist); }
.tg-layered { border-color: rgba(231, 162, 78, 0.6); color: var(--dentin); }
.tg-universal { border-color: rgba(61, 205, 183, 0.55); color: var(--enamel); }
.tg-single-shade { border-color: rgba(138, 185, 236, 0.6); color: var(--shell); }
.tg-bulk-fill { border-color: rgba(233, 148, 154, 0.6); color: var(--opaque); }
.sys-layers { margin: 16px 0 0; display: grid; gap: 12px; }
.ly { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.ly dt { font-size: 14px; color: var(--mist-2); line-height: 1.35; padding-top: 4px; }
.ly dt::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.ly-o dt::before { background: var(--opaque); } .ly-d dt::before { background: var(--dentin); } .ly-e dt::before { background: var(--ivory); }
.ly dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sh { font-size: 14px; padding: 3px 9px; border-radius: 7px; background: rgba(255, 255, 255, 0.06); color: var(--ivory); transition: background-color .2s ease, color .2s ease; }
.sh.hit { background: var(--enamel); color: var(--enamel-ink); }
.ly .txt { font-size: 14.5px; color: var(--mist); line-height: 1.45; }
.sys-note { margin: 14px 0 0; font-size: 13.5px; color: var(--mist-2); line-height: 1.45; }
.sys-cta { margin-top: auto; padding-top: 16px; font-size: 15.5px; color: var(--enamel); text-decoration: none; font-weight: 500; }
.sys-cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.lib-empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }
.lib-empty h2 { font-size: 28px; }
.lib-empty p { margin: 12px auto 0; color: var(--mist); max-width: 34em; }
.lib-disclaimer { margin-top: 40px; padding: 22px 24px; border-left: 3px solid var(--dentin); background: var(--panel); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.lib-disclaimer p { margin: 0 0 8px; font-size: 14.5px; color: var(--mist); }
.lib-disclaimer p:last-child { margin: 0; }
.lib-closing { border-top: 1px solid var(--line); }
.motion .sys.in-anim { animation: cardRise .55s var(--d, 0ms) cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes cardRise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .lib-search input { height: 60px; font-size: 18px; padding-left: 54px; }
  .lib-search-ic { left: 20px; }
  .seg { width: 100%; overflow-x: auto; }
  .seg-b { white-space: nowrap; padding: 9px 13px; }
  .sel, .sel select { width: 100%; }
  .sys-grid { grid-template-columns: 1fr; }
  .ly { grid-template-columns: 1fr; gap: 6px; }
}

/* Home: library teaser */
.lib-teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.lib-teaser h2 { font-size: clamp(30px, 3.8vw, 48px); }
.lib-teaser p { margin-top: 16px; color: var(--mist); font-size: 19px; }
.lib-teaser .lib-search { margin-top: 0; }
.lib-teaser .lib-search input { padding-right: 150px; }
.lib-teaser .lib-go { position: absolute; right: 8px; top: 8px; bottom: 8px; min-height: 0; padding: 0 22px; }
.lib-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lib-examples a { font-size: 15px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ivory); text-decoration: none; transition: border-color .2s ease, color .2s ease; }
.lib-examples a:hover { border-color: var(--enamel); color: var(--enamel); }
@media (max-width: 860px) { .lib-teaser { grid-template-columns: 1fr; } }
@media (max-width: 1120px) { .nav a[href="#faq"], .nav a[href="#layers"], .nav a[href="/#layers"] { display: none; } }

/* Library: locked "more in the app" panel */
.lib-more { position: relative; margin-top: 18px; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); }
.lib-more[hidden] { display: none; }
.lib-ghosts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 22px; filter: blur(6px); opacity: .55; }
.lib-ghosts span { display: block; height: 300px; border-radius: var(--radius-m); background:
  linear-gradient(rgba(255,255,255,.10), rgba(255,255,255,.10)) 22px 26px / 40% 12px no-repeat,
  linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.16)) 22px 48px / 62% 20px no-repeat,
  linear-gradient(rgba(231,162,78,.35), rgba(231,162,78,.35)) 22px 92px / 22% 18px no-repeat,
  linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)) 22px 140px / 80% 14px no-repeat,
  linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)) 22px 176px / 70% 14px no-repeat,
  linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)) 22px 212px / 76% 14px no-repeat,
  linear-gradient(180deg, rgba(16,34,34,.95), rgba(12,28,28,.95)); border: 1px solid var(--line); }
.lib-more-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 24px;
  background: radial-gradient(60% 80% at 50% 50%, rgba(7,19,19,.92), rgba(7,19,19,.72) 70%, rgba(7,19,19,.55)); }
.lib-more-n { margin: 0 0 6px; color: var(--dentin); font-size: 17px; }
.lib-more-n b { font-family: var(--display); font-weight: 600; font-size: 40px; vertical-align: -6px; margin-right: 4px; }
.lib-more-panel h2 { font-size: clamp(26px, 3vw, 38px); }
.lib-more-panel p { color: var(--mist); max-width: 32em; margin: 12px auto 22px; }
.lib-more-panel .lib-more-hint { margin: 18px 0 0; font-size: 14.5px; color: var(--mist-2); }
.motion .lib-more:not([hidden]) .lib-more-panel > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) backwards; }
.motion .lib-more:not([hidden]) .lib-more-panel > *:nth-child(2) { animation-delay: .06s; }
.motion .lib-more:not([hidden]) .lib-more-panel > *:nth-child(3) { animation-delay: .12s; }
.motion .lib-more:not([hidden]) .lib-more-panel > *:nth-child(4) { animation-delay: .18s; }
@media (max-width: 900px) { .lib-ghosts { grid-template-columns: 1fr 1fr; } .lib-ghosts span:nth-child(3) { display: none; } }
@media (max-width: 600px) { .lib-ghosts { grid-template-columns: 1fr; } .lib-ghosts span:nth-child(2) { display: none; } .lib-ghosts span { height: 380px; } }
.lib-ghosts span { height: 380px; }
.lib-more-panel .store-badge img { width: auto; height: 60px; }
@media (max-width: 600px) { .lib-ghosts span { height: 440px; } }
