/* Oravel v5 — the recorded light system (DESIGN.md) implementing the legacy page vocabulary.
   Tokens and rules come from the shipped homepage: one purple voice, hairlines first,
   ink shadows, Sarabun display / Inter UI / Fraunces reserved, AA contrast floor. */

:root {
  --ground: #f7f7f7;
  --ink: #0e1727;
  --ink2: #565a62;
  --ink3: #6d7079;
  --accent: #6a62f0;
  --accent-ink: #5b53e0;
  --grad-a: #695ff0;
  --grad-b: #5749ec;
  --hair: #e4e4e8;
  --hair2: #cbcbcd;
  --card: #ffffff;
  --green: #128052;
  --green-soft: #e2f6ec;
  --violet-soft: #ece9fd;
  --amber-soft: #fef6e8;
  --amber-ink: #8f620e;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --display: "Sarabun", var(--sans);
  --serif: "Fraunces", Georgia, serif;
  --mono: var(--sans);
  --r: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; }
img { max-width: 100%; }
.mono { font-family: var(--sans); }

.aurora, .halo { display: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- nav ---------- */
.navbar { position: sticky; top: 0; z-index: 50; background: rgba(247, 247, 247, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.navbar.scrolled { border-bottom-color: var(--hair); }
.navbar { padding: 5px 0; }
.navbar nav, .wrap > nav { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; }
.logo { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.logo .word { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.3px; }
.logo .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(106, 98, 240, 0.6); align-self: center; }
.logo .by { font-size: 12px; color: var(--ink3); letter-spacing: 0.3px; text-transform: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink); }
.nav-links a:hover { color: var(--accent-ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--card); border: 1px solid var(--hair2); border-radius: 12px; padding: 9px 18px; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background-color: #5f56ee; background-image: linear-gradient(180deg, var(--grad-a), var(--grad-b)); border: 0; color: #fff; box-shadow: 0 6px 16px rgba(14, 23, 39, 0.10); }
.btn.primary:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 10px 24px rgba(14, 23, 39, 0.14); }
.btn.lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; padding: 84px 0 72px; }
.hero > div:only-child, .hero.single { display: block; }
.kicker, .sec-kicker { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); margin-bottom: 18px; text-transform: none; letter-spacing: 0; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.5px; color: var(--ink); }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--accent-ink); }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -0.5px; color: var(--ink); margin-bottom: 16px; }
.sub { font-size: 17.5px; line-height: 1.65; color: var(--ink2); margin: 18px 0 26px; max-width: 56ch; }
.sub b { color: #23262e; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.note { font-size: 13px; color: var(--ink3); margin-top: 14px; }
.sec-sub { font-size: 17px; line-height: 1.65; color: var(--ink2); max-width: 62ch; margin-bottom: 8px; }
section { padding: 44px 0; }

/* ---------- feature rows ---------- */
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 52px 0; }
.feat.flip .copy { order: 2; }
.feat h3, .copy h3 { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.3px; margin-bottom: 12px; color: var(--ink); }
.copy p { font-size: 16px; line-height: 1.65; color: var(--ink2); margin-bottom: 18px; }
.points { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: #33363e; }
.points span { display: flex; align-items: baseline; gap: 10px; }
.points span::before { content: ""; flex: none; width: 14px; height: 14px; align-self: center; background: var(--green); -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12.5l5.5 5.5L20 6.5"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12.5l5.5 5.5L20 6.5"/></svg>') center/contain no-repeat; }
.points a { color: var(--accent-ink); }

/* ---------- panels / mock UI ---------- */
.panel { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 22px; box-shadow: 0 18px 44px rgba(14, 23, 39, 0.06); }
.panel .ph { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink3); padding-bottom: 13px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; text-transform: none; letter-spacing: 0.2px; }
.rowline { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f0f0f3; font-size: 14px; color: var(--ink); }
.rowline:last-child { border-bottom: 0; }
.rowline .t { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowline .m { font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.g { background: var(--green-soft); color: #0f7a49; }
.pill.v { background: var(--violet-soft); color: var(--accent-ink); }
.pill.a { background: var(--amber-soft); color: var(--amber-ink); }
.bar-bg { width: 84px; height: 6px; border-radius: 99px; background: #ececf1; overflow: hidden; flex: none; }
.bar-bg i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.article-mock .line, .line { font-size: 13.5px; line-height: 1.65; color: #33363e; padding: 8px 0; }
.link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* legacy hero demo card (chat) */
.answer-demo { position: relative; }
.chat { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 20px 22px; box-shadow: 0 18px 44px rgba(14, 23, 39, 0.06); }
.chat .bar { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); margin-bottom: 14px; font-size: 12px; color: var(--ink3); }
.chat .bar .dots { display: flex; gap: 5px; }
.chat .bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: #dcdce2; }
.chat .q { font-size: 14px; color: var(--ink); background: #f1f1f4; border-radius: 11px; padding: 10px 14px; width: fit-content; margin-bottom: 16px; }
.chat .a { font-size: 14px; line-height: 1.7; color: #33363e; }
.chat .a .caret { display: inline-block; width: 8px; height: 17px; background: var(--accent); vertical-align: -3px; margin-left: 2px; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cite { display: none; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--violet-soft); border: 1px solid #ddd8fb; border-radius: 999px; padding: 3px 10px; }
.cite.show { display: inline-flex; }
.cite::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.chat .foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 12px; color: var(--ink3); }
.chat .foot .ok { opacity: 0; color: #0f7a49; font-weight: 600; transition: opacity 0.4s ease; }
.chat .foot .ok.show { opacity: 1; }

/* ---------- pricing ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 44px 0 8px; align-items: stretch; }
.price-card, .tier { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; }
.price-card.hot, .tier.hot { border-color: var(--accent); box-shadow: 0 20px 40px rgba(90, 80, 230, 0.10); position: relative; }
.price-card h3, .tier h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 6px; }
.amount { font-family: var(--display); font-weight: 600; font-size: 44px; letter-spacing: -1px; color: var(--ink); }
.per { font-size: 14px; color: var(--ink3); }
.price-card ul, .tier ul { list-style: none; margin: 18px 0 22px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: #33363e; }
.price-card li::before, .tier li::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 9px; vertical-align: -2px; background: var(--green); -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12.5l5.5 5.5L20 6.5"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12.5l5.5 5.5L20 6.5"/></svg>') center/contain no-repeat; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 26px; }

/* ---------- steps / finale / legal ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 44px; }
.stepv .num { font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--accent-ink); margin-bottom: 10px; }
.stepv h4, .stepv h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; }
.stepv p { font-size: 14px; line-height: 1.6; color: var(--ink2); }
.finale { text-align: center; padding: 96px 0 110px; }
.finale h2 { margin-bottom: 14px; }
.finale .sec-kicker { justify-content: center; }
.finale .sec-kicker::before { display: none; }
.finale .sec-sub { margin: 0 auto 30px; }
.legal { max-width: 760px; margin: 0 auto; padding: 56px 32px 90px; font-size: 15px; color: #33363e; }
.legal h1 { font-size: 36px; margin-bottom: 8px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal p, .legal li { line-height: 1.75; color: var(--ink2); }
.legal ul { padding-left: 22px; margin: 10px 0; }
.updated { font-size: 13px; color: var(--ink3); margin-bottom: 26px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--hair); background: var(--card); margin-top: 40px; position: relative; }
.bigmark { display: none; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding: 52px 0 38px; }
.foot-cols h5, .foot-cols .fh { font-size: 12px; color: var(--ink3); margin-bottom: 13px; font-weight: 600; text-transform: none; letter-spacing: 0.3px; }
.foot-cols a { display: block; font-size: 14px; color: #33363e; padding: 5px 0; }
.foot-cols a:hover { color: var(--accent-ink); }
.foot-cols .blurb { font-size: 13.5px; color: var(--ink3); max-width: 30ch; line-height: 1.6; margin-top: 10px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 0; }
.foot .links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot .links a { font-size: 13.5px; color: #33363e; }
.foot .links a:hover { color: var(--accent-ink); }
.fine { font-size: 12.5px; color: var(--ink3); }

/* ---------- reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
  [data-reveal].in { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero, .feat { grid-template-columns: 1fr; gap: 30px; }
  .feat.flip .copy { order: 0; }
  .tiers { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .wrap { padding: 0 22px; }
  .hero { padding: 56px 0 48px; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .nav-links { gap: 16px; } .nav-links a:not(.btn) { display: none; } }

/* legacy variable aliases: old inline styles across pages resolve to light-system values */
:root {
  --text: #0e1727;
  --text2: #565a62;
  --text3: #6d7079;
  --accent2: #5b53e0;
  --bg: #f7f7f7;
  --bg2: #ffffff;
  --bg3: #f1f1f4;
  --line: #e4e4e8;
  --line2: #cbcbcd;
  --card2: #f1f1f4;
  --accent-soft: #ece9fd;
  --amber: #9a6b13;
  --red: #b3323b;
  --pink: #b3327e;
  --teal: #0f766e;
}

.price-card .tier { background: none; border: 0; padding: 0; display: block; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink3); margin-bottom: 10px; }

.feat h2, .copy h2 { font-family: var(--display); font-weight: 600; font-size: 26px; letter-spacing: -0.3px; line-height: 1.2; margin-bottom: 12px; color: var(--ink); }
.price-card h2, .card h2 { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: 0; margin-bottom: 6px; }
.stepv h2 { font-family: var(--sans); font-weight: 600; font-size: 16.5px; letter-spacing: 0; margin-bottom: 6px; }
