/* Foldi website. Tokens follow the app's design system: cool blue-grey chrome, ink as the one interactive colour,
   white cards, capsule buttons, Newsreader headlines and Inter body. No third-party requests. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/newsreader-500.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #eef1f5;
  --bg-top: #f4f6f9;
  --surface: #ffffff;
  --sunken: #e6eaf0;
  --text: #14171c;
  --muted: #566070;
  --accent: #14171c;
  --on-accent: #ffffff;
  --tint: #e9edf3;
  --border: rgba(20, 30, 50, 0.1);
  --shadow: 0 6px 18px rgba(26, 36, 56, 0.08);
  --shadow-lg: 0 10px 28px rgba(26, 36, 56, 0.14);
  --mark-bg: #ffe08a;
  --mark-text: #14171c;
  --radius: 24px;
  --radius-sm: 16px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e12;
    --bg-top: #10131a;
    --surface: #171a21;
    --sunken: #07080b;
    --text: #f2f4f8;
    --muted: #a3aab8;
    --accent: #f2f4f8;
    --on-accent: #0c0e12;
    --tint: #262b34;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: none;
    --shadow-lg: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(to bottom, var(--bg-top), var(--bg) 480px);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 6px; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.center { text-align: center; }
.plain { list-style: none; margin: 0; padding: 0; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: 12px; top: -80px; background: var(--accent); color: var(--on-accent); padding: 10px 18px; border-radius: 999px; z-index: 20; }
.skip:focus { top: 12px; }

/* draft-only */
.draft-banner { background: var(--mark-bg); color: var(--mark-text); text-align: center; padding: 8px 16px; font-weight: 600; font-size: 0.9rem; }
mark.placeholder { background: var(--mark-bg); color: var(--mark-text); outline: 2px dashed #b45309; outline-offset: 1px; padding: 0 0.25em; border-radius: 4px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.brand img { border-radius: 22%; box-shadow: 0 0 0 1px var(--border); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; font-size: 0.9375rem; }
.nav a { text-decoration: none; padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--tint); }
.nav a[aria-current="page"] { background: var(--tint); font-weight: 600; }
.nav-lang { margin-left: 4px; padding-left: 8px; border-left: 1px solid var(--border); }
.nav-lang a { font-weight: 600; }
@media (max-width: 719px) { .nav .nav-anchor { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font: 600 1rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { text-decoration: none; opacity: 0.9; }
.btn--ghost { background: var(--surface); border-color: var(--border); }
.btn--ghost:hover { background: var(--tint); text-decoration: none; }
.btn--soon { background: var(--tint); color: var(--muted); border: 1px dashed var(--muted); cursor: default; user-select: none; }

/* hero */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.eyebrow { font-weight: 600; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.hero-lead { font-size: 1.25rem; line-height: 1.55; max-width: 36ch; }
.hero-cta { margin: 26px 0 14px; }
.shot { width: 100%; }
.shot img { border-radius: 38px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface); margin: 0 auto; }
.shot--hero { max-width: 300px; margin: 0 auto; }
.shot--wide { max-width: 520px; margin: 0 auto; }
.shot--wide img { border-radius: var(--radius); }
@media (min-width: 860px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .shot--hero { max-width: 340px; margin: 0 0 0 auto; }
}

/* sections */
.section { padding: 56px 0; }
@media (min-width: 860px) { .section { padding: 80px 0; } }
.section-title { margin-bottom: 0.4em; }
.section-lead { font-size: 1.1875rem; color: var(--muted); max-width: 60ch; }
.center .section-lead { margin-left: auto; margin-right: auto; }
#features .section-title { margin-bottom: 1.2em; }

.feature { display: grid; gap: 24px; align-items: center; margin-bottom: 72px; }
.feature:last-child { margin-bottom: 0; }
.feature-text p { color: var(--muted); font-size: 1.125rem; max-width: 46ch; }
.feature .shot { max-width: 280px; margin: 0 auto; }
.feature-text h3 { font-size: clamp(1.625rem, 3.4vw, 2.25rem); }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 72px; }
  .feature .shot { max-width: 300px; }
  .feature .shot { margin: 0; }
  .feature--flip .feature-text { order: 2; }
  .feature--flip .shot { margin-left: auto; margin-right: 0; }
  .feature:not(.feature--flip) .shot { margin-left: auto; margin-right: 0; }
}

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 22px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .panel { padding: 48px; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel .card { background: var(--bg); box-shadow: none; }
@media (prefers-color-scheme: dark) { .panel .card { background: var(--tint); } }
.card h3 { font-size: 1.25rem; margin-bottom: 0.3em; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; }
.card--accent { border-color: var(--accent); }
.grid-4 { display: grid; gap: 14px; margin: 28px 0; }
@media (min-width: 560px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.pro-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .pro-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; } }
.cols-2 { display: grid; gap: 14px; margin: 24px 0; }
@media (min-width: 560px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.ticks { list-style: none; margin: 12px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 0.5em; width: 7px; height: 12px; border: solid var(--text); border-width: 0 2px 2px 0; transform: rotate(40deg); }

/* faq */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; border-radius: var(--radius-sm); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--muted); flex: none; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 22px 8px; color: var(--muted); }
.faq-a a { color: var(--text); }

.cta { padding-bottom: 96px; }

/* footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0 28px; flex-shrink: 0; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.brand--footer { font-size: 1.25rem; margin: 0 0 6px; }
.footer-h { font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.site-footer li { margin-bottom: 4px; }
.site-footer a { display: inline-block; padding: 6px 0; }
.footer-lang a { margin-left: 10px; font-weight: 600; }
.footer-note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 0.875rem; }
.footer-note p { margin: 0; }

/* legal and support pages */
.prose { padding-top: 40px; padding-bottom: 48px; }
.prose h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); margin-bottom: 0.2em; }
.prose h2 { font-size: 1.75rem; margin-top: 2em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.prose .lead { font-size: 1.1875rem; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .panel { margin: 28px 0; }
.prose .panel h2 { margin-top: 0; }
.prose details + h2, .prose .faq-item:first-of-type { margin-top: 0; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 22px 14px; margin: 24px 0 8px; }
.toc summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.toc[open] summary { margin-bottom: 6px; }
.toc ol { margin: 0; columns: 2 220px; column-gap: 28px; }
.toc li { margin-bottom: 2px; break-inside: avoid; }
.toc a { display: inline-block; padding: 4px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.9375rem; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prose th { font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--tint); }
@media (max-width: 599px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose thead { position: absolute; left: -9999px; }
  .prose tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 6px 0; }
  .prose td { border: 0; padding: 4px 14px; }
  .prose td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
}
.notfound { padding: 96px 20px; }
