/* Chobial — chobial.app */
:root {
  --bg: #0d0d0f;
  --bg-2: #151518;
  --bg-3: #1d1d22;
  --line: #2a2a31;
  --text: #f3ede3;
  --muted: #a9a39a;
  --dim: #75706a;
  --accent: #ff9938;
  --accent-2: #f7c7b7;
  --teal: #1a6e68;
  --paper: #f6eee0;
  --radius: 18px;
  --max: 1120px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: .1em .4em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: block; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(13,13,15,.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(255,255,255,.06); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 600 1.08rem var(--sans); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: .95rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); text-decoration: none; }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 16px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font: 600 1rem var(--sans); border: 1px solid transparent; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #1a0f05; }
.btn-primary:hover { background: #ffab5c; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn svg { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.note { font-size: .88rem; color: var(--dim); margin-top: 12px; }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto -10%; height: 520px; background: radial-gradient(ellipse at 30% 40%, rgba(255,153,56,.20), transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(26,110,104,.28), transparent 60%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent-2); }
.hero .lede { margin-bottom: 28px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 48px; } }

/* Phone frame */
.phone { position: relative; border-radius: 46px; padding: 10px; background: linear-gradient(145deg, #2c2c33, #0c0c0e); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06) inset; max-width: 320px; margin: 0 auto; }
.phone img { border-radius: 37px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: #000; }
.phone.sm { max-width: 250px; border-radius: 38px; padding: 8px; }
.phone.sm img { border-radius: 31px; }

/* Sections */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.pillar { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.pillar .num { font: 500 2.2rem var(--serif); color: var(--accent); line-height: 1; margin-bottom: 14px; }
.pillar p { color: var(--muted); margin: 0; }
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; } }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 48px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-media { order: -1; }
.feature ul { padding-left: 1.1em; color: var(--muted); }
.feature li { margin-bottom: .4em; }
.feature li strong { color: var(--text); font-weight: 600; }
@media (max-width: 880px) { .feature { grid-template-columns: 1fr; gap: 32px; } .feature.flip .feature-media { order: 0; } }

/* Grid of small features */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 36px; }
.card { background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font: 600 1.02rem var(--sans); letter-spacing: 0; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.card .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,153,56,.12); color: var(--accent); margin-bottom: 14px; }
.card .ico svg { width: 20px; height: 20px; }
a.card { color: inherit; display: block; transition: border-color .15s, transform .15s; }
a.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }

/* Film strip / gallery */
.films { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 36px; }
.film { margin: 0; background: var(--paper); color: #231c14; border-radius: 6px; padding: 10px 10px 12px; box-shadow: 0 14px 30px -18px rgba(0,0,0,.9); transition: transform .2s; }
.film:nth-child(odd) { transform: rotate(-.6deg); }
.film:nth-child(even) { transform: rotate(.5deg); }
.film:hover { transform: rotate(0) scale(1.02); }
.film img { border-radius: 2px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.film figcaption { font: 600 .92rem var(--sans); margin-top: 9px; display: flex; justify-content: space-between; gap: 8px; }
.film figcaption span { font-weight: 400; color: #6f6456; font-size: .8rem; text-align: right; }

/* Before/after compare */
.compare { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; max-width: 480px; margin: 0 auto; background: #000; user-select: none; touch-action: pan-y; border: 1px solid var(--line); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--paper); transform: translateX(-1px); pointer-events: none; }
.compare .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--paper); color: #1a1a1a; display: grid; place-items: center; font-size: 18px; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); font: 600 .75rem var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.compare .tag.l { left: 12px; } .compare .tag.r { right: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); font: 500 .88rem var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: rgba(255,153,56,.12); }

/* Screenshots rail */
.rail { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 20px 28px; margin-top: 32px; scrollbar-width: thin; }
.rail figure { flex: 0 0 240px; margin: 0; scroll-snap-align: center; }
.rail figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 12px; }
.rail .phone { max-width: 240px; }

/* Pricing */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.price .card { padding: 32px; }
.price .card.hl { border-color: var(--accent); background: linear-gradient(180deg, rgba(255,153,56,.08), var(--bg-3)); }
.price h3 { font: 500 1.6rem var(--serif); }
.price ul { list-style: none; padding: 0; margin: 18px 0 0; }
.price li { padding: 7px 0 7px 28px; position: relative; color: var(--muted); }
.price li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 760px) { .price { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 760px; margin: 36px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* CTA */
.cta { text-align: center; padding: 96px 0; background: radial-gradient(ellipse at 50% 0%, rgba(255,153,56,.16), transparent 60%); }
.cta img.icon { width: 96px; height: 96px; margin: 0 auto 24px; }
.cta .actions { justify-content: center; margin-top: 24px; }

/* Docs / guide pages */
.doc { display: grid; grid-template-columns: 230px 1fr; gap: 56px; padding: 56px 20px 96px; max-width: var(--max); margin: 0 auto; }
.doc nav.toc { position: sticky; top: 90px; align-self: start; font-size: .92rem; }
.doc nav.toc strong { display: block; color: var(--dim); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.doc nav.toc a { display: block; color: var(--muted); padding: 5px 0; }
.doc nav.toc a:hover { color: var(--text); text-decoration: none; }
.doc article { max-width: 720px; min-width: 0; }
.doc article h2 { margin-top: 2.2em; padding-top: .4em; font-size: 2rem; scroll-margin-top: 80px; }
.doc article h2:first-of-type { margin-top: .6em; }
.doc article h3 { margin-top: 1.6em; font: 600 1.1rem var(--sans); letter-spacing: 0; }
.doc article p, .doc article li { color: #d9d3c9; }
.doc article ol, .doc article ul { padding-left: 1.3em; }
.doc article li { margin-bottom: .5em; }
.doc .step-shot { display: flex; gap: 28px; align-items: flex-start; margin: 22px 0; }
.doc .step-shot .phone { flex: 0 0 210px; max-width: 210px; margin: 0; border-radius: 34px; padding: 7px; }
.doc .step-shot .phone img { border-radius: 28px; }
.doc .step-shot > div:last-child { flex: 1; min-width: 0; }
.tip { border-left: 3px solid var(--accent); background: var(--bg-2); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0; color: var(--muted); }
.tip strong { color: var(--text); }
.meta { color: var(--dim); font-size: .9rem; }
@media (max-width: 880px) {
  .doc { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .doc nav.toc { position: static; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
  .doc .step-shot { flex-direction: column; }
  .doc .step-shot .phone { flex-basis: auto; width: 200px; }
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--dim); font-size: .92rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer.site a { color: var(--muted); }

/* Page header for inner pages */
.page-head { padding: 64px 0 8px; }
.page-head .lede { margin-bottom: 0; }

.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin: 20px 0; }
.downloads a { display: block; background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: var(--muted); font-size: .85rem; }
.downloads a:hover { border-color: var(--accent); text-decoration: none; }
.downloads img { border-radius: 8px; margin-bottom: 8px; width: 100%; aspect-ratio: 1206/2622; object-fit: cover; }
.downloads img.sq { aspect-ratio: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
