/* ============================================================================
   ORALIS — Website Design System
   Tokens mirror the iOS app (AppTheme.swift / AppFonts.swift):
   Bordeaux #8d1837 · Teal #265158 · Light gray #f8f8f8 · Amber #B5862D
   Display: Albert Sans · Body: Inter  (both official brand fonts)
   ========================================================================= */

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100%; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---- Tokens --------------------------------------------------------------- */
:root {
  --bordeaux:        #8d1837;
  --bordeaux-deep:   #6f122c;
  --bordeaux-dark:   #560d22;
  --teal:            #265158;
  --black:           #0a0a0a;
  --ink:             #1a1a1a;
  --white:           #ffffff;
  --cream:           #faf8f6;
  --light-gray:      #f8f8f8;
  --hairline:        #e8e4e1;
  --muted:           #8a8a8e;
  --muted-soft:      #b6b6ba;
  --amber:           #b5862d;

  --font-display: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1200px;
  --maxw-prose: 760px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 10px;            /* brand rule: shadow/radius capped */
  --shadow-soft: 0 10px 40px -20px rgba(10, 10, 10, 0.25);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Base ----------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; color: var(--black); }
.accent { color: var(--bordeaux); }
strong { font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bordeaux);
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #444; max-width: 56ch; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  padding: 0.95rem 1.7rem; border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--bordeaux); color: var(--white); }
.btn-primary:hover { background: var(--bordeaux-deep); transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(141,24,55,0.7); }
.btn-ghost { color: var(--black); border: 1px solid var(--hairline); background: rgba(255,255,255,0.6); }
.btn-ghost:hover { border-color: var(--bordeaux); color: var(--bordeaux); transform: translateY(-2px); }
.btn-light { background: var(--white); color: var(--bordeaux); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(0,0,0,0.4); }
.btn .ico { width: 1.05em; height: 1.05em; }

/* ---- Navigation ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav__logo { height: 26px; width: auto; }
.nav__right { display: flex; align-items: center; gap: 1.5rem; }
.lang { display: flex; align-items: center; gap: 0.1rem; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; }
.lang a { color: var(--muted); padding: 0.25rem 0.45rem; border-radius: 6px; transition: color 0.2s; }
.lang a:hover { color: var(--ink); }
.lang a.is-active { color: var(--bordeaux); }
.lang__sep { color: var(--muted-soft); }
.nav__cta { font-size: 0.9rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.nav__cta:hover { color: var(--bordeaux); }

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, #ffffff 100%);
  padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem);
  text-align: center;
}
.hero__symbol {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%);
  width: min(720px, 120%); opacity: 0.05; pointer-events: none; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 600;
  max-width: 16ch; margin: 1.4rem auto 0; line-height: 1.04;
}
.hero h1 em { font-style: italic; font-weight: 600; color: var(--bordeaux); }
.hero .lede { margin: 1.6rem auto 0; text-align: center; }
.hero__actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }
.hero__note { margin-top: 1.1rem; font-size: 0.84rem; color: var(--muted); letter-spacing: 0.02em; }

/* App Store badge (coming soon) */
.appbadge {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: var(--black); color: var(--white);
  padding: 0.7rem 1.3rem; border-radius: 12px; line-height: 1.05;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.appbadge:hover { transform: translateY(-2px); }
.appbadge svg { width: 26px; height: 26px; flex: none; }
.appbadge small { display: block; font-size: 0.62rem; letter-spacing: 0.06em; opacity: 0.85; text-transform: uppercase; }
.appbadge span { font-size: 1.18rem; font-weight: 600; font-family: var(--font-display); letter-spacing: -0.01em; }

/* ---- Generic section ------------------------------------------------------ */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section--gray { background: var(--light-gray); }
.section__head { max-width: 60ch; }
.section__head.center { margin-inline: auto; text-align: center; }
.section h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-top: 0.8rem; }
.section__head p { margin-top: 1.1rem; color: #555; }

/* About split */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about__mark { display: flex; justify-content: center; }
.about__mark img { width: min(240px, 70%); opacity: 0.9; }
.about p + p { margin-top: 1rem; }

/* ---- Feature cards -------------------------------------------------------- */
.grid-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 3rem; }
.card {
  background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 2rem 1.7rem; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: #ddd6d2; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(141,24,55,0.08); color: var(--bordeaux); margin-bottom: 1.2rem;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.18rem; font-weight: 600; }
.card p { margin-top: 0.6rem; font-size: 0.95rem; color: #555; line-height: 1.55; }

/* ---- Stats ---------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; margin-top: 3rem; }
.stat__num { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 600; color: var(--black); letter-spacing: -0.03em; }
.stat__num .accent { color: var(--bordeaux); }
.stat__label { margin-top: 0.3rem; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---- Regions band --------------------------------------------------------- */
.regions { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; margin-top: 2rem; }
.chip {
  border: 1px solid var(--hairline); border-radius: 999px; padding: 0.55rem 1.2rem;
  font-size: 0.92rem; font-weight: 500; color: var(--ink); background: var(--white);
}
.chip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bordeaux); margin-right: 0.5rem; vertical-align: middle; }

/* ---- How it works (steps) ------------------------------------------------- */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.75rem 2rem; margin-top: 3.5rem; position: relative;
}
.step { position: relative; text-align: center; }
.step__num {
  position: relative; z-index: 1;
  display: grid; place-items: center; margin: 0 auto 1.35rem;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--bordeaux); color: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
  box-shadow: 0 10px 24px -12px rgba(141, 24, 55, 0.65);
}
.step h3 { font-size: 1.18rem; font-weight: 600; }
.step p { margin: 0.6rem auto 0; font-size: 0.96rem; color: #555; line-height: 1.6; max-width: 32ch; }
/* Sequential connector between the badges — desktop only, where the three
   steps sit in one row. Sits behind the badges and fades left→right. */
@media (min-width: 760px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; z-index: 0;
    top: 27px; left: calc(50% + 38px); width: calc(100% - 76px + 2rem); height: 2px;
    background: linear-gradient(90deg, var(--bordeaux), var(--hairline));
    opacity: 0.4;
  }
}

/* ---- CTA band ------------------------------------------------------------- */
.cta {
  background: radial-gradient(120% 140% at 50% -10%, var(--bordeaux) 0%, var(--bordeaux-deep) 55%, var(--bordeaux-dark) 100%);
  color: var(--white); text-align: center; padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.cta h2 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta p { color: rgba(255,255,255,0.82); margin: 1rem auto 0; max-width: 52ch; }
.cta__actions { margin-top: 2.2rem; display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ---- Footer --------------------------------------------------------------- */
.footer {
  position: relative; overflow: hidden;
  background: var(--bordeaux); color: rgba(255,255,255,0.85);
  padding: clamp(3rem, 7vw, 5rem) 0 2.5rem;
}
.footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1.6px);
  background-size: 26px 26px; opacity: 0.5;
}
.footer .container { position: relative; z-index: 1; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer__brand img { height: 30px; margin-bottom: 1.1rem; }
.footer__brand p { font-size: 0.92rem; color: rgba(255,255,255,0.7); max-width: 34ch; }
.footer h4 { color: var(--white); font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1rem; }
.footer__links li { margin-bottom: 0.6rem; }
.footer__links a { font-size: 0.94rem; color: rgba(255,255,255,0.78); transition: color 0.2s; }
.footer__links a:hover { color: var(--white); }
.footer__bottom {
  position: relative; z-index: 1;
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,0.16);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: 0.82rem; color: rgba(255,255,255,0.65);
}
.footer__bottom .lang a { color: rgba(255,255,255,0.7); }
.footer__bottom .lang a:hover, .footer__bottom .lang a.is-active { color: var(--white); }
.footer__bottom .lang__sep { color: rgba(255,255,255,0.4); }

/* ---- Accessibility: keyboard focus --------------------------------------- */
:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; border-radius: 4px; }
.appbadge:focus-visible, .btn:focus-visible { outline-offset: 4px; }

/* ---- Scroll reveal (progressive; only when JS is present) ----------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: opacity, transform; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .grid-features .card:nth-child(2), .js .steps .step:nth-child(2) { transition-delay: 0.08s; }
.js .grid-features .card:nth-child(3), .js .steps .step:nth-child(3) { transition-delay: 0.16s; }
.js .grid-features .card:nth-child(4) { transition-delay: 0.24s; }
.js .stats .stat:nth-child(2) { transition-delay: 0.08s; }
.js .stats .stat:nth-child(3) { transition-delay: 0.16s; }

/* ============================================================================
   LEGAL / DOCUMENT PAGES
   ========================================================================= */
.doc-hero {
  background: linear-gradient(180deg, var(--cream), var(--white));
  border-bottom: 1px solid var(--hairline);
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
}
.doc-hero .eyebrow { margin-bottom: 0.8rem; }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.doc-hero .updated { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.4rem; }
.breadcrumb a:hover { color: var(--bordeaux); }

.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 8vw, 6rem); }
.legal__inner { max-width: var(--maxw-prose); margin-inline: auto; }
.legal__toc {
  background: var(--light-gray); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 1.4rem 1.6rem; margin-bottom: 2.5rem;
}
.legal__toc h2 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); font-weight: 700; margin-bottom: 0.8rem; }
.legal__toc ol { list-style: none; counter-reset: toc; columns: 2; column-gap: 2rem; }
.legal__toc li { counter-increment: toc; margin-bottom: 0.45rem; font-size: 0.9rem; break-inside: avoid; }
.legal__toc a { color: #444; }
.legal__toc a::before { content: counter(toc) ". "; color: var(--bordeaux); font-weight: 600; }
.legal__toc a:hover { color: var(--bordeaux); }

.prose { color: #333; }
.prose h2 {
  font-size: 1.4rem; margin-top: 2.6rem; margin-bottom: 0.8rem; scroll-margin-top: 90px;
  padding-top: 0.4rem;
}
.prose h2 .num { color: var(--bordeaux); margin-right: 0.5rem; }
.prose h3 { font-size: 1.08rem; margin-top: 1.6rem; margin-bottom: 0.5rem; color: var(--ink); }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: -1rem; top: 0.66em; width: 5px; height: 5px; border-radius: 50%; background: var(--bordeaux); }
.prose a { color: var(--bordeaux); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.92rem; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.8rem; border: 1px solid var(--hairline); vertical-align: top; }
.prose th { background: var(--light-gray); font-weight: 600; color: var(--ink); }
.prose .note {
  background: var(--light-gray); border-left: 3px solid var(--bordeaux);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.3rem; margin: 1.4rem 0; font-size: 0.93rem;
}
.placeholder {
  background: rgba(181,134,45,0.12); color: #7a5a16; border-radius: 5px;
  padding: 0.05em 0.4em; font-size: 0.92em; font-weight: 600;
}
.contact-card {
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 1.4rem 1.6rem;
  background: var(--white); margin-top: 1.4rem;
}
.contact-card strong { display: block; margin-bottom: 0.2rem; }

/* ---- Support specifics ---------------------------------------------------- */
.faq { margin-top: 2rem; }
.faq details {
  border: 1px solid var(--hairline); border-radius: var(--radius); margin-bottom: 0.8rem; overflow: hidden; background: var(--white);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 1.1rem 1.4rem; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--bordeaux); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.4rem 1.2rem; color: #444; font-size: 0.96rem; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__mark { order: -1; }
  .about__mark img { width: 130px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__brand { grid-column: 1 / -1; }
  .legal__toc ol { columns: 1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav__right { gap: 1rem; }
  .nav__cta { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn, .hero__actions .appbadge { justify-content: center; }
}

/* ---- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
