/* Repsig Distribution Website — style.css */

/* Self-hosted Space Grotesk (Latin subset, 700 weight).
   Pulled once from Google's CDN, now lives in assets/fonts/ so we
   never load anything from fonts.gstatic.com at runtime. Important
   for the privacy notice — privacy.html promises "no third-party
   scripts", which the Google Fonts CDN would violate (it sees every
   visitor IP). Per LG München 3 O 17493/20 (2022), runtime CDN
   loading of Google Fonts breaches GDPR. font-display: swap shows
   the fallback system font during the brief load, then swaps in. */
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../assets/fonts/space-grotesk-700.woff2") format("woff2");
}

/* Repsig Grotesk — derivations of Space Grotesk with the R's top-left
   sharp corner rounded into a quadratic Bezier arc of varying radius
   (units on a 1000 UPM em). Each variant is a separate font file +
   family name so the comparison preview can render them side-by-side
   without a name collision. Built by scripts/build-repsig-grotesk.py.
   Renamed per SIL OFL §4 (Reserved Font Names) — Florian Karsten's
   "Space Grotesk" must not be used as the family name of a modified
   version; original copyright preserved in the font's name table id 0.
   After picking a final radius, collapse to a single @font-face. */
@font-face {
    font-family: "Repsig Grotesk R120";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r120.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R140";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r140.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R150";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r150.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R160";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r160.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R200";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r200.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R250";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r250.woff2") format("woff2");
}
/* R130 variants with s-terminal rounding — one inwards-cap reference (s50),
   three outwards-cap variants (s50/s60/s70). Inwards = cap bulges into the
   stroke body (dent-like); outwards = cap extends past flat cut (pen-stroke). */
@font-face {
    font-family: "Repsig Grotesk R130 S50 IN";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s50-in.woff2") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130 S50 OUT";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s50-out.woff2?v=2seg-out") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130 S60 OUT";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s60-out.woff2?v=2seg-out") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130 S70 OUT";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s70-out.woff2?v=2seg-out") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130 S100 OUT";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s100-out.woff2?v=2seg-out") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130 S150 OUT";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s150-out.woff2?v=2seg-out") format("woff2");
}
@font-face {
    font-family: "Repsig Grotesk R130 S200 OUT";
    font-style: normal; font-weight: 700; font-display: swap;
    src: url("../assets/fonts/repsig-grotesk-r130-s200-out.woff2?v=2seg-out") format("woff2");
}

/* ── Official Repsig wordmark ─────────────────────────────────────
   The brand expression. Three pieces work together:
     .repsig-wordmark  → sets the custom font on the wrapping span
     .brand-overline   → black line above the "Rep" portion
     .brand-accent     → blue color + underline on the "sig" portion
   Markup: <span class="repsig-wordmark">
             <span class="brand-overline">Rep</span><span class="brand-accent">sig</span>
           </span>
   The PDF-stamp pen-ink blue is separate (.sig-stamp-pen-blue in editor.css). */
.repsig-wordmark {
    font-family: "Repsig Grotesk R130 S50 IN", var(--font-family);
    font-weight: 700;
}

/* Brand-accent — the "sig" half. Color parameterised via
   --brand-accent-color (default = medium paper-plane stop). Underline
   metrics 0.110em thick at 0.090em offset crosses through the descender
   of the g. clip-path crops the rightward overshoot caused by the g's
   right side bearing (~70 em-units past the visible ink) so the line
   ends at the glyph edge instead of the glyph advance. */
.brand-accent {
    color: var(--brand-accent-color, var(--color-plane-medium));
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--brand-accent-color, var(--color-plane-medium));
    text-decoration-thickness: 0.110em;
    text-underline-offset: 0.090em;
    display: inline-block;            /* needed for clip-path on inline */
    clip-path: inset(0 0.07em 0 0);   /* crop g's right-side overshoot */
    padding-right: 0;
    cursor: pointer;
}
.brand-accent--light  { --brand-accent-color: var(--color-plane-light); }
.brand-accent--medium { --brand-accent-color: var(--color-plane-medium); }
.brand-accent--dark   { --brand-accent-color: var(--color-plane-dark); }
a.brand-accent:hover {
    color: var(--color-plane-dark);   /* always shift to deepest stop on hover */
}

/* Brand-overline — the black line above "Rep". Implemented as
   text-decoration: underline with a large NEGATIVE text-underline-offset,
   which reverses direction so the line sits above the baseline. Free
   benefit: text-decoration-skip-ink defaults to auto, so the browser
   automatically carves visual gaps where the line crosses glyph ink
   (e.g. the vertical strokes of the R). -0.70em puts the line at
   roughly i-dot height in Repsig Grotesk R130 at 700 weight. */
.brand-overline {
    text-decoration: underline;
    text-decoration-color: var(--color-text);
    text-decoration-thickness: 0.110em;
    text-underline-offset: -0.70em;
}

/* Cookie consent banner. Rendered by js/cookie-banner.js only when
   REQUIRES_CONSENT=true (toggled when analytics/tracking is added).
   Pre-launch: invisible (the script returns early). */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--color-header);
    color: #fff;
    padding: 14px 20px;
    display: flex; gap: 16px;
    flex-wrap: wrap; align-items: center; justify-content: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-size: 13px;
    transform: translateY(110%);
    transition: transform 0.25s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner-msg { flex: 1 1 300px; max-width: 600px; }
.cookie-banner a { color: rgb(138, 150, 198); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 8px; }
.cookie-banner-btn {
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}
.cookie-banner-btn.accept {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.cookie-banner-btn.accept:hover { background: var(--color-primary-hover); }
.cookie-banner-btn.reject:hover { background: rgba(255, 255, 255, 0.08); }

:root {
    /* Paper-plane palette — three blue stops sampled from the paper
       plane in RepSigLogo.png. Light = top-highlight facets, medium =
       main body, dark = shadow/underside facets. Use these anywhere
       the page needs a brand-blue accent so the whole site reads as
       one family with the logo. Three intensities, one hue. */
    --color-plane-light:  #a6d5f8;
    --color-plane-medium: #5b9cf0;
    --color-plane-dark:   #2563d6;

    /* Pen-blue, full saturation — the hover-state value from
       editor.css:4716 (`a.brand-accent:hover`). Used for CTAs, links,
       feature icons. Sits in a different hue family from the paper-
       plane palette above (pen-blue is from the PDF signature stamp;
       paper-plane blues are sampled from the logo). */
    --color-primary: #142E8C;
    --color-primary-hover: #0D2069;
    --color-header: #1a1a2e;
    --color-bg: #f5f5f5;
    --color-card-bg: #ffffff;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-border: #e0e0e0;
    --color-green: #d4edda;
    --color-green-text: #155724;
    --color-yellow: #fff3cd;
    --color-yellow-text: #856404;
    --color-gray-badge: #e8e8e8;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(0,0,0,0.1);
    --max-width: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ───────────────────────────────────────────────── */

.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--color-header);
    padding: 0 24px;
    display: flex; align-items: center; height: 56px;
}
.nav-inner {
    max-width: var(--max-width); width: 100%;
    margin: 0 auto;
    display: flex; align-items: center; gap: 16px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    color: #fff; font-size: 18px; font-weight: 700;
    text-decoration: none;
}
.nav-brand img { width: 28px; height: 28px; border-radius: 4px; }
.nav-spacer { flex: 1; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: rgba(255,255,255,0.8); font-size: 14px; text-decoration: none; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-hamburger {
    display: none; background: none; border: none; color: #fff;
    font-size: 24px; cursor: pointer; padding: 4px;
}
.nav-mobile {
    display: none;
    position: absolute; top: 56px; left: 0; right: 0;
    background: var(--color-header);
    padding: 12px 24px 20px;
    flex-direction: column; gap: 12px;
}
.nav-mobile a { color: rgba(255,255,255,0.8); font-size: 15px; text-decoration: none; }
.nav-mobile a:hover { color: #fff; }
.nav-mobile.open { display: flex; }

/* ── Hero ─────────────────────────────────────────────────────── */

.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 80px 24px 72px;
    text-align: center;
}
.hero h1 {
    font-size: 44px; font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 18px; max-width: 640px; margin: 0 auto 32px;
    color: rgba(255,255,255,0.8); line-height: 1.5;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block; padding: 10px 24px; border-radius: 6px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    text-decoration: none; border: 2px solid transparent;
    transition: background 0.15s, color 0.15s;
}
.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: #fff; text-decoration: none; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-disabled { opacity: 0.5; cursor: default; pointer-events: none; }

/* ── Feature strip ────────────────────────────────────────────── */

.features {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 28px 24px;
}
.features-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.feature-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--color-text-light);
    white-space: nowrap;
}
.feature-icon {
    width: 20px; height: 20px; flex-shrink: 0;
    fill: var(--color-primary);
}

/* ── Sections ─────────────────────────────────────────────────── */

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px;
}
.section-title {
    font-size: 28px; font-weight: 700;
    margin-bottom: 8px; text-align: center;
}
.section-subtitle {
    font-size: 15px; color: var(--color-text-light);
    text-align: center; margin-bottom: 40px;
    max-width: 560px; margin-left: auto; margin-right: auto;
}

/* ── Product cards ────────────────────────────────────────────── */

.product-group { margin-bottom: 48px; }
.product-group:last-child { margin-bottom: 0; }
.group-label {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--color-primary);
    margin-bottom: 6px;
}
.group-desc {
    font-size: 14px; color: var(--color-text-light);
    margin-bottom: 16px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.card {
    background: var(--color-card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 10px;
}
.card-header { display: flex; align-items: center; gap: 12px; }
.card-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    fill: var(--color-text-light);
}
.card-name { font-size: 16px; font-weight: 600; }
.card-desc { font-size: 13px; color: var(--color-text-light); flex: 1; }
.card-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; }

.badge {
    display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
}
.badge-available { background: var(--color-green); color: var(--color-green-text); }
.badge-prototype { background: var(--color-yellow); color: var(--color-yellow-text); }
.badge-soon { background: var(--color-gray-badge); color: #666; }

/* ── How it works ─────────────────────────────────────────────── */

.steps {
    display: flex; gap: 32px; justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap; margin-top: 8px;
}
.step {
    text-align: center; flex: 1; min-width: 200px; max-width: 280px;
    display: flex; flex-direction: column; align-items: center;
}
.step-num {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.step-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.step-desc { font-size: 13px; color: var(--color-text-light); }

/* ── Comparison table ─────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 8px;
}
.cmp-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px; min-width: 700px;
}
.cmp-table th, .cmp-table td {
    padding: 8px 10px; text-align: center;
    border-bottom: 1px solid var(--color-border);
}
.cmp-table th {
    background: var(--color-card-bg); font-weight: 600;
}
.cmp-table th:first-child,
.cmp-table td:first-child { text-align: left; font-weight: 600; }
.cmp-table .yes { color: var(--color-green-text); }
.cmp-table .no { color: var(--color-text-muted); }
.cmp-table .planned { color: var(--color-yellow-text); font-style: italic; }

/* ── Trust / open source section ──────────────────────────────── */

.trust-section {
    background: #fff; border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.trust-inner {
    max-width: var(--max-width); margin: 0 auto;
    padding: 48px 24px; text-align: center;
}
.trust-inner h2 { font-size: 24px; margin-bottom: 12px; }
.trust-inner p { font-size: 15px; color: var(--color-text-light); max-width: 560px; margin: 0 auto 16px; }
.trust-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.trust-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--color-bg); padding: 6px 14px; border-radius: 20px;
    font-size: 13px; color: var(--color-text-light);
}

/* ── Footer ───────────────────────────────────────────────────── */

.footer {
    background: var(--color-header); color: rgba(255,255,255,0.6);
    padding: 40px 24px;
}
.footer-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; gap: 40px; flex-wrap: wrap;
    justify-content: space-between; align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; }
.footer-brand img { width: 24px; height: 24px; border-radius: 3px; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-legal { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ── Tabs (getting-started) ───────────────────────────────────── */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; }
.tab-btn {
    padding: 8px 16px; border: 1px solid var(--color-border);
    border-radius: 6px 6px 0 0; background: var(--color-bg);
    font-size: 13px; cursor: pointer; color: var(--color-text-light);
    font-family: inherit;
}
.tab-btn.active { background: var(--color-card-bg); border-bottom-color: var(--color-card-bg); color: var(--color-primary); font-weight: 600; }
.tab-panel { display: none; background: var(--color-card-bg); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tab-panel.active { display: block; }
.tab-panel h3 { font-size: 16px; margin-bottom: 12px; }
.tab-panel ol, .tab-panel ul { padding-left: 20px; margin-bottom: 12px; font-size: 14px; }
.tab-panel li { margin-bottom: 6px; }
.tab-panel code { background: var(--color-bg); padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.tab-panel pre {
    background: var(--color-header); color: #e0e0e0;
    padding: 14px 18px; border-radius: 6px;
    overflow-x: auto; font-size: 13px; margin: 12px 0;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: block; }
    .hero { padding: 56px 20px 48px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 16px; }
    .features-inner { gap: 20px; }
    .feature-item { font-size: 13px; }
    .section { padding: 40px 16px; }
    .section-title { font-size: 22px; }
    .steps { gap: 20px; }
    .footer-inner { flex-direction: column; gap: 24px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 26px; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; text-align: center; }
    .card-grid { grid-template-columns: 1fr; }
    .features-inner { flex-direction: column; align-items: center; gap: 12px; }
}
