/* Public pages: the landing/acquisition set and the /en/ content surface.
 *
 * Every colour, typeface, radius and shadow here comes from tokens.css — the
 * same file styles.css reads (#361). The public pages and the app are one
 * product and must look like it, so nothing in this file may introduce a
 * literal colour or a font stack of its own. If a value is missing, add a token
 * rather than a hex code.
 *
 * Breakpoints follow the app's set (#360): 979px, 759px, 479px. */
@import url('./tokens.css');

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100dvh;
    color: var(--text-base);
    font-family: var(--font-body);
    background:
        radial-gradient(circle at 14% 10%, rgba(216, 198, 158, 0.36), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(var(--tint-rgb), 0.14), transparent 24rem),
        linear-gradient(180deg, var(--bg-base), var(--bg-secondary));
    background-attachment: fixed;
}

a { color: inherit; }

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.seo-shell {
    width: min(100% - 32px, 1180px);
    margin: 0 auto;
}

/* ── Header and footer ──────────────────────────────────────────────────── */

.seo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
    border-bottom: 1px solid var(--border);
}

.seo-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-strong);
    font-family: var(--font-brand);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}

.seo-brand__mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 11px;
    background: var(--mark);
    box-shadow: 0 6px 16px var(--mark-glow);
    color: #fff;
    font-family: var(--font-body);
    letter-spacing: 0;
}

.seo-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
}

.seo-nav a {
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.seo-nav a:hover { color: var(--accent-strong); }

.seo-nav .seo-nav__app {
    padding: 9px 16px;
    border: 1px solid var(--action-line);
    border-radius: 999px;
    background: var(--action);
    box-shadow: 0 3px 0 var(--action-shadow);
    color: #fff;
}

.seo-nav .seo-nav__app:hover { color: #fff; }

.seo-footer {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding: 36px 0 52px;
    border-top: 1px solid var(--border);
}

.seo-footer p { max-width: 48ch; margin: 10px 0 0; color: var(--text-muted); line-height: 1.6; }
.seo-footer nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 14px 22px; }
.seo-footer nav a { color: var(--accent); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.seo-footer nav a:hover { color: var(--accent-strong); }

/* ── Hero and buttons ───────────────────────────────────────────────────── */

.seo-hero {
    position: relative;
    max-width: 900px;
    padding: clamp(52px, 8vw, 104px) 0 clamp(44px, 6vw, 80px);
}

.seo-eyebrow,
.seo-kicker {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.seo-hero h1 {
    max-width: 18ch;
    margin: 0;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.02;
}

.seo-hero__intro {
    max-width: 68ch;
    margin: 22px 0 0;
    color: var(--text-muted);
    font-size: clamp(1.02rem, 1.8vw, 1.2rem);
    line-height: 1.7;
}

.seo-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.seo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid var(--action-line);
    border-radius: 15px;
    background: var(--action);
    box-shadow: 0 4px 0 var(--action-shadow);
    color: #fff;
    font-weight: 850;
    text-decoration: none;
}

.seo-button:hover { transform: translateY(-1px); }
.seo-button:active { transform: translateY(0); box-shadow: 0 2px 0 var(--action-shadow); }

.seo-button--secondary {
    border-color: var(--border-strong);
    background: var(--bg-panel-soft);
    box-shadow: 0 3px 0 var(--border);
    color: var(--text-strong);
}

/* ── Sections, cards, lists ─────────────────────────────────────────────── */

.seo-section { margin-bottom: clamp(56px, 8vw, 104px); }

.seo-section--split {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(380px, 1.15fr);
    gap: clamp(32px, 6vw, 76px);
    align-items: start;
}

.seo-section__heading { max-width: 680px; }

.seo-section__heading h2,
.seo-section--callout h2 {
    margin: 0;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.06;
}

.seo-section__heading > p:not(.seo-kicker),
.seo-section--callout p {
    margin: 16px 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.seo-card-grid {
    display: grid;
    gap: 18px;
    margin-top: 32px;
}

.seo-card-grid--feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seo-card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.seo-card {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 3.5vw, 34px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-panel);
    box-shadow: var(--shadow-sm);
}

/* The same hairline the app draws across the top of a .panel. */
.seo-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.seo-card--accent {
    border-color: var(--border-strong);
    background: var(--bg-panel-strong);
}

.seo-card__glyph {
    display: block;
    margin-bottom: 20px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 700;
}

.seo-card__meta {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.seo-card h3 {
    margin: 0;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
}

.seo-card p:not(.seo-card__meta) {
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.seo-text-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent);
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.seo-text-link:hover { color: var(--accent-strong); }

.seo-process {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.seo-process--three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }

.seo-process li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-panel-soft);
    box-shadow: var(--shadow-sm);
}

.seo-process--three li { grid-template-columns: 1fr; }

.seo-process li > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: var(--mark);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
}

.seo-process h3 { margin: 0; color: var(--text-strong); font-size: 1.05rem; }
.seo-process p { margin: 7px 0 0; color: var(--text-muted); line-height: 1.6; }

.seo-facts {
    display: grid;
    gap: 0;
    margin: 28px 0 0;
}

.seo-facts div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.seo-facts dt { color: var(--text-muted); }
.seo-facts dd { margin: 0; color: var(--text-strong); font-weight: 800; text-align: right; }

.seo-sample-card {
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid var(--border-strong);
    border-radius: 26px;
    background: var(--bg-panel-strong);
    box-shadow: var(--shadow-md);
}

.seo-word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.seo-word-list li {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-strong);
}

.seo-sample-card > p:last-child { color: var(--text-muted); line-height: 1.7; }

.seo-word-groups { display: grid; gap: 8px; }
.seo-word-group h3 { margin: 18px 0 0; color: var(--text-strong); font-size: 1.05rem; }
.seo-word-group .seo-word-list { margin: 12px 0; }
.seo-word-list a { color: inherit; text-decoration: none; }
.seo-word-list a:hover,
.seo-word-list a:focus-visible { text-decoration: underline; }

.seo-section--callout {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--bg-panel);
    box-shadow: var(--shadow-sm);
}

.seo-section--callout > div { max-width: 720px; }
.seo-section--callout .seo-button { flex: 0 0 auto; }

.seo-faq { max-width: 820px; }
.seo-faq details { border-top: 1px solid var(--border); padding: 20px 0; }
.seo-faq summary { color: var(--text-strong); cursor: pointer; font-weight: 800; }
.seo-faq details p { color: var(--text-muted); line-height: 1.7; }

/* ── Content surface: /en/docs, /en/blog, trust pages ───────────────────── */

.seo-page--doc .seo-shell { width: min(100% - 32px, 1100px); }

.doc-article { padding-bottom: clamp(48px, 8vw, 92px); }

.doc-breadcrumbs { padding: 24px 0 0; }

.doc-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    list-style: none;
}

.doc-breadcrumbs li + li::before {
    content: "/";
    margin-right: 8px;
    color: var(--border-strong);
}

.doc-breadcrumbs a { color: var(--accent); text-decoration: none; }
.doc-breadcrumbs a:hover { color: var(--accent-strong); }
.doc-breadcrumbs [aria-current="page"] { color: var(--text-muted); }

.doc-hero {
    max-width: 46rem;
    padding: clamp(28px, 5vw, 50px) 0 clamp(24px, 4vw, 40px);
}

.doc-hero h1 {
    max-width: 24ch;
    margin: 0;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.05;
}

.doc-hero__intro {
    max-width: 62ch;
    margin: 20px 0 0;
    color: var(--text-base);
    font-size: clamp(1.02rem, 1.7vw, 1.14rem);
    line-height: 1.72;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.doc-meta a { color: var(--accent); }

.doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: clamp(28px, 5vw, 60px);
    align-items: start;
    border-top: 1px solid var(--border);
    padding-top: clamp(28px, 4vw, 44px);
}

.doc-body { min-width: 0; max-width: 46rem; }

.doc-toc {
    position: sticky;
    top: 24px;
    order: 2;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-panel-soft);
}

.doc-toc__title {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.doc-toc ol {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.doc-toc li { margin-bottom: 8px; }
.doc-toc a { color: var(--text-muted); text-decoration: none; }
.doc-toc a:hover { color: var(--accent); }

.doc-section { margin-bottom: clamp(36px, 5vw, 56px); scroll-margin-top: 24px; }

.doc-section h2 {
    margin: 0 0 16px;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
}

.doc-section h3 {
    margin: 28px 0 8px;
    color: var(--text-strong);
    font-size: 1.06rem;
    font-weight: 800;
}

.doc-section p { margin: 0 0 16px; color: var(--text-base); line-height: 1.75; }
.doc-section a { color: var(--accent); }
.doc-section a:hover { color: var(--accent-strong); }

.doc-section code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--bg-muted);
    font-size: 0.92em;
}

.doc-list,
.doc-steps {
    margin: 0 0 18px;
    padding-left: 1.25rem;
    color: var(--text-base);
    line-height: 1.75;
}

.doc-list li,
.doc-steps li { margin-bottom: 10px; }

.doc-table-wrap {
    overflow-x: auto;
    margin: 0 0 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-panel-soft);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-base);
    font-size: 0.93rem;
    text-align: left;
}

.doc-table caption {
    padding: 14px 18px 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: left;
}

.doc-table th,
.doc-table td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.6;
}

.doc-table thead th {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doc-table tbody th { color: var(--text-strong); font-weight: 800; }
.doc-table tbody tr:last-child th,
.doc-table tbody tr:last-child td { border-bottom: none; }

/* Matches .legal-note in the app, which is the same idea in the same product. */
.doc-callout {
    margin: 0 0 22px;
    padding: 12px 16px;
    border-left: 3px solid var(--accent);
    border-radius: 0 14px 14px 0;
    background: var(--accent-soft);
    color: var(--text-base);
    line-height: 1.7;
}

/* A warning reads on the terracotta --danger, not on the accent tint: with the
   tint on pine (#301) a green-striped callout would say "fine" where it means
   "careful". */
.doc-callout--warn {
    border-left-color: var(--danger);
    background: var(--bg-muted);
}

.doc-term { color: var(--accent); text-decoration-style: dotted; }

/* Hover/focus preview of a glossary definition. Positioned from script, so the
   only thing set here is how it looks; `hidden` keeps it out of the flow and
   out of the accessibility tree until an anchor describes itself with it. */
.doc-term-preview {
    position: fixed;
    z-index: 20;
    display: grid;
    gap: 5px;
    width: max-content;
    max-width: min(22rem, calc(100vw - 24px));
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--bg-panel-strong);
    box-shadow: var(--shadow-md);
    color: var(--text-base);
    font-size: 0.86rem;
    line-height: 1.55;
    pointer-events: none;
}

.doc-term-preview[hidden] { display: none; }

.doc-term-preview strong {
    color: var(--text-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doc-glossary { margin: 0; }

.doc-glossary__entry {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 24px;
}

.doc-glossary dt { color: var(--text-strong); font-weight: 800; }
.doc-glossary dt a { color: var(--text-strong); text-decoration: none; }
.doc-glossary dd { margin: 6px 0 0; color: var(--text-muted); line-height: 1.7; }

.doc-faq__item { padding: 18px 0; border-top: 1px solid var(--border); scroll-margin-top: 24px; }
.doc-faq__item h3 { margin: 0 0 8px; color: var(--text-strong); font-size: 1.02rem; }
.doc-faq__item p { margin: 0; color: var(--text-muted); }

.doc-index-list { margin: 0 0 18px; padding: 0; list-style: none; }
.doc-index-list li { padding: 14px 0; border-top: 1px solid var(--border); }
.doc-index-list a { display: block; color: var(--accent); font-weight: 800; }
.doc-index-list a:hover { color: var(--accent-strong); }
.doc-index-list span { display: block; margin-top: 4px; color: var(--text-muted); line-height: 1.65; }

.doc-note { color: var(--text-muted); font-size: 0.88rem; }

.doc-related {
    margin-top: clamp(32px, 5vw, 52px);
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.doc-related__title {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.doc-related ul { margin: 0; padding: 0; list-style: none; }
.doc-related li { margin-bottom: 8px; }
.doc-related a { color: var(--accent); font-weight: 700; }
.doc-related a:hover { color: var(--accent-strong); }

/* ── Breakpoints (#360) ─────────────────────────────────────────────────── */

@media (max-width: 979px) {
    .seo-section--split { grid-template-columns: 1fr; }
    .seo-card-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .seo-process--three { grid-template-columns: 1fr; }
    .doc-layout { grid-template-columns: 1fr; }
    .doc-toc { position: static; order: 0; }
}

@media (max-width: 759px) {
    .seo-shell,
    .seo-page--doc .seo-shell { width: min(100% - 22px, 1180px); }
    .seo-header { align-items: flex-start; padding: 16px 0; }
    .seo-nav { justify-content: flex-end; flex-wrap: wrap; gap: 9px 14px; }
    .seo-nav a:not(.seo-nav__app) { font-size: 0.84rem; }
    .seo-hero { padding-top: 48px; }
    .seo-hero h1 { font-size: clamp(2.4rem, 13vw, 4rem); }
    .seo-card-grid--feature,
    .seo-card-grid--three { grid-template-columns: 1fr; }
    .seo-section--callout,
    .seo-footer { align-items: flex-start; flex-direction: column; }
    .seo-section--callout .seo-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .seo-button:hover { transform: none; }
}
