/* ==========================================================================
   Notary one — Sektionen der Produktseite
   Reihenfolge wie im HTML. Setzt base.css voraus (Tokens, Typo, Buttons).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
/* Der Hero füllt den ersten Bildschirm, damit der Scroll-Pfeil am unteren
   Rand sitzt. Auf kleinen Geräten wächst er einfach mit dem Inhalt. */
.hero {
    min-height: calc(100vh - var(--header-h-top));
    min-height: calc(100svh - var(--header-h-top));
    display: flex;
    align-items: center;
    padding-top: clamp(3rem, 7vw, 5.5rem);
    padding-bottom: clamp(5.5rem, 9vw, 7rem);
    position: relative;
    overflow: hidden;
    border-top: none;
}
.hero > .container { width: 100%; }
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 78% 28%, color-mix(in oklch, var(--accent) 16%, transparent), transparent 68%);
    pointer-events: none;
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: clamp(120px, 18vh, 240px);
    background: linear-gradient(to bottom, transparent, var(--bg) 92%);
    pointer-events: none;
    z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero .eyebrow { animation: fadeUp 600ms var(--ease) both; }

/* Ohne JS erscheint die Headline als Block — mit JS wortweise (siehe unten). */
.hero h1 { animation: fadeUp 700ms var(--ease) 100ms both; margin-bottom: 1.5rem; max-width: 16ch; font-size: clamp(2.4rem, 4.8vw, 4.1rem); }
/* Produktname als eigene Zeile über dem Claim */
.hero h1 .h1-brand { display: block; color: var(--ink-muted); font-size: 0.6em; letter-spacing: -0.015em; margin-bottom: 0.2em; }
/* «Der Schweizer Urkundengenerator» bleibt zusammen — Umbruch nur nach dem Gedankenstrich.
   Unter 360px darf er frei umbrechen, sonst entstünde horizontaler Overflow. */
@media (min-width: 360px) { .hero h1 .h1-claim { white-space: nowrap; } }
.hero .lede { animation: fadeUp 700ms var(--ease) 350ms both; margin-bottom: 2rem; }

/* Wortweiser Einlauf der Headline. Das Aufteilen übernimmt app.js; --i ist der
   Wortindex und erzeugt den Versatz. */
.hero h1.is-split { animation: none; }
.hero h1.is-split .w {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.42em);
    animation: wordIn 640ms var(--ease) both;
    animation-delay: calc(var(--i, 0) * 38ms + 60ms);
}
@keyframes wordIn {
    from { opacity: 0; transform: translateY(0.42em); }
    to   { opacity: 1; transform: none; }
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; animation: fadeUp 700ms var(--ease) 560ms both; margin-bottom: 2rem; }

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line-soft);
    animation: fadeUp 700ms var(--ease) 650ms both;
}
.hero-trust li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-muted);
}
.hero-trust svg { color: var(--accent); flex: none; }

.hero-visual { position: relative; animation: fadeUp 800ms var(--ease) 350ms both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Scroll-Pfeil — mittig am unteren Rand des Hero, springt sanft zu #geschichte */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: clamp(1.25rem, 3vh, 2rem);
    z-index: 2;
    width: 46px; height: 46px;
    margin-left: -23px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1.5px solid oklch(0.45 0.013 260);
    color: var(--accent);
    background: color-mix(in oklch, var(--bg) 60%, transparent);
    animation: fadeUp 700ms var(--ease) 900ms both;
    transition: border-color 220ms var(--ease), background 220ms var(--ease);
}
.scroll-cue svg { animation: cueBob 1.8s var(--ease) 1.6s infinite; }
@media (hover: hover) and (pointer: fine) {
    .scroll-cue:hover { border-color: var(--accent); background: var(--accent-soft); }
}
@keyframes cueBob {
    0%, 100% { transform: translateY(-2px); }
    50%      { transform: translateY(4px); }
}
/* Mit JS: Pfeil fest am unteren Bildschirmrand, damit er beim Laden immer
   sichtbar ist — auch wenn der Hero höher als der Bildschirm ist. app.js
   blendet ihn aus (.is-gone), sobald #geschichte ins Bild kommt.
   Einblenden mit fill-mode «backwards», damit danach die Opacity-Transition greift. */
.js-scroll .scroll-cue {
    position: fixed;
    z-index: 50;
    background: color-mix(in oklch, var(--bg) 82%, transparent);
    animation: cueIn 700ms var(--ease) 900ms backwards;
    transition: border-color 220ms var(--ease), background 220ms var(--ease),
                opacity 300ms var(--ease), visibility 300ms var(--ease);
}
.js-scroll .scroll-cue.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes cueIn { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   Produktbild — MacBook-Screenshot, freigestellt (ohne Rahmen)
   -------------------------------------------------------------------------- */
.hero-shot {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 28px 44px oklch(0 0 0 / 0.55));
}
/* Desktop: Notebook grösser und bis über den Container-Rand hinaus
   (Hero hat overflow: hidden, es entsteht kein horizontaler Scroll). */
@media (min-width: 961px) {
    .hero-shot {
        width: calc(100% + clamp(3rem, 9vw, 9rem));
        max-width: none;
    }
}
/* Mobile: Notebook randabfallend über die ganze Breite */
@media (max-width: 960px) {
    .hero-visual { margin-inline: calc(-0.5 * var(--pad-x)); }
}

/* --------------------------------------------------------------------------
   Erfolgsgeschichte — einzige Sektion auf --bg-elev (Aufbau wie tpus.binaryone.ch)
   Links Chronik in vier Schritten, rechts Portrait und Links.
   -------------------------------------------------------------------------- */
.story { background: var(--bg-elev); }
.story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
}
@media (max-width: 960px) { .story-grid { grid-template-columns: minmax(0, 1fr); } }
.story-copy .section-intro { margin-bottom: clamp(2rem, 4vw, 2.75rem); }

/* Chronik — Linie oben und 9-px-Quadrat wie die Timeline im Ablauf */
.story-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
}
.story-steps li::before {
    content: "";
    position: absolute;
    top: -5px; left: 0;
    width: 9px; height: 9px;
    background: var(--bg-elev);
    border: 1px solid var(--accent);
}
.story-when {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    padding-top: 0.25rem;
}
.story-steps b { display: block; font-size: 1.05rem; color: var(--ink); margin-bottom: 0.3rem; }
.story-steps p { color: var(--ink-muted); font-size: 0.93rem; }
@media (max-width: 480px) { .story-steps li { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; } }

.story-side { display: grid; gap: 1.25rem; }

/* Portrait: Foto links, Kanzlei-Logo rechts oben (transparentes PNG).
   Nur die beiden linken Ecken sind gerundet — im Pillen-Radius der Buttons. */
.story-figure { margin: 0; }
.story-figure img {
    width: 100%;
    height: auto;
    border-radius: 999px 0 0 999px;
}
.story-caption {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.story-caption b { font-weight: 500; font-size: 1rem; }
.story-caption span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

.story-links {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    padding: 0.25rem clamp(1.1rem, 2.5vw, 1.5rem);
}
.story-links-label {
    display: block;
    padding: 1rem 0 0.75rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.story-links li { border-top: 1px solid var(--line-soft); }
.story-links a { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 0; }
.story-links a b { font-size: 1rem; color: var(--ink); transition: color 200ms var(--ease); }
.story-links a span { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); }
.story-links a svg { flex: none; color: var(--accent); transition: transform 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
    .story-links a:hover b { color: var(--accent); }
    .story-links a:hover svg { transform: translate(2px, -2px); }
}
@media (max-width: 420px) {
    .story-links a { flex-wrap: wrap; row-gap: 0.15rem; }
    .story-links a span { order: 3; width: 100%; margin-left: 0; }
    .story-links a svg { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   Funktionen — drei Hauptfunktionen hervorgehoben, weitere im Accordion
   -------------------------------------------------------------------------- */
.feature-top .card {
    border-color: color-mix(in oklch, var(--accent) 30%, var(--line-soft));
    background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 7%, var(--bg-card)), var(--bg-card) 70%);
}
.feature-top .card h3 { font-size: 1.45rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.card-head .card-num { margin-bottom: 0; }
.card-tag {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid color-mix(in oklch, var(--accent) 50%, transparent);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.feature-more { margin-top: 1.25rem; }

/* Eingeklappt (Klasse setzt features.js): Die oberen Ränder der weiteren
   Kacheln bleiben sichtbar und laufen in den Hintergrund aus — so ist klar,
   dass hier noch mehr kommt. Ohne JS ist alles offen. */
.feature-more-panel {
    position: relative;
    overflow: hidden;
    transition: max-height 520ms var(--ease);
}
.feature-more.is-collapsed .feature-more-panel { max-height: 132px; }
.feature-more-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, color-mix(in oklch, var(--bg) 15%, transparent), var(--bg) 90%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 400ms var(--ease);
}
.feature-more.is-collapsed .feature-more-panel::after { opacity: 1; }
.feature-more.is-collapsed .feature-more-panel .card { cursor: pointer; }

.feature-toggle-wrap { display: flex; justify-content: center; margin-top: 1.5rem; }
.feature-more.is-collapsed .feature-toggle-wrap { margin-top: -1.5rem; position: relative; z-index: 1; }
.feature-toggle { background: var(--bg); }
.feature-toggle svg { transition: transform 300ms var(--ease); }
.feature-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.feature-toggle[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Ablauf / Timeline
   -------------------------------------------------------------------------- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }

.tl-step { padding: 2rem 1.5rem 2rem 0; position: relative; border-top: 1px solid var(--line); }
.tl-step::before {
    content: "";
    position: absolute;
    top: -5px; left: 0;
    width: 9px; height: 9px;
    background: var(--bg);
    border: 1px solid var(--accent);
}
.tl-step:first-child::after {
    content: "";
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, var(--accent), transparent);
}
.tl-week {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}
.tl-step h3 { margin-bottom: 0.6rem; }
.tl-step p { color: var(--ink-muted); font-size: 0.93rem; }

/* --------------------------------------------------------------------------
   Vergleich — Merkmalstabelle, eigene Spalte hervorgehoben
   -------------------------------------------------------------------------- */
.compare-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    width: 100%;
    position: relative;
}
.compare-table { min-width: 720px; width: 100%; }
@media (max-width: 620px) {
    .compare-table { min-width: 540px; }
    .compare-table th, .compare-table td { padding: 0.7rem 0.7rem; }
    .compare-table thead th { font-size: 0.55rem; letter-spacing: 0.05em; }
    .compare-table thead th b { font-size: 0.86rem; }
    .compare-table tbody th { font-size: 0.82rem; }
}

.compare-table th,
.compare-table td {
    padding: 0.85rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

/* Kopfzeile */
.compare-table thead th {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    vertical-align: bottom;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.compare-table thead th b {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--display);
    font-variation-settings: "wdth" 97;
    font-size: 1.02rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    text-transform: none;
    color: var(--ink);
}

/* Zeilenkopf = das Merkmal */
.compare-table tbody th {
    font-weight: 400;
    font-size: 0.94rem;
    color: var(--ink);
}
.compare-table tbody tr { transition: background 200ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
    .compare-table tbody tr:hover th { background: var(--bg-elev); }
}

/* Die eigene Spalte — durchgehend getönt, damit sie als Spalte liest */
.compare-table .is-ours { background: color-mix(in oklch, var(--accent) 8%, transparent); }
.compare-table thead .is-ours {
    background: color-mix(in oklch, var(--accent) 14%, var(--bg-elev));
    border-bottom-color: color-mix(in oklch, var(--accent) 30%, transparent);
}
.compare-table thead .is-ours b { color: var(--accent); }

.mk-text { font-size: 0.86rem; color: var(--ink-muted); }
.is-ours .mk-text,
.is-ours.mk-text { color: var(--ink); font-family: var(--display); font-size: 0.95rem; letter-spacing: -0.01em; }

/* --------------------------------------------------------------------------
   Betrieb & Datensicherheit
   -------------------------------------------------------------------------- */
.deploy-card { border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--bg-card); padding: clamp(1.5rem, 2.5vw, 2rem); }
.deploy-card .tier-badge { display: inline-block; font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0.25rem 0.7rem; margin-bottom: 1rem; }
.deploy-card h3 { margin-bottom: 0.75rem; font-size: 1.4rem; }
.deploy-card > p { color: var(--ink-muted); font-size: 0.95rem; margin-bottom: 1.25rem; }
.deploy-list li { display: flex; gap: 0.6rem; font-size: 0.9rem; color: var(--ink-muted); padding: 0.5rem 0; }
.deploy-list li + li { border-top: 1px solid var(--line-soft); }
.deploy-list svg { color: var(--accent); flex: none; margin-top: 3px; }

/* Empfohlene Variante (eigene Hardware) klar im Vordergrund, Cloud (ohne Hardware, höhere Lizenz) gedämpft */
.deploy-card { display: flex; flex-direction: column; }
.deploy-card.is-recommended {
    border-color: color-mix(in oklch, var(--accent) 45%, var(--line-soft));
    background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 9%, var(--bg-card)), var(--bg-card) 65%);
}
.deploy-card.is-muted { background: var(--bg-elev); }
.deploy-card.is-muted .tier-badge { color: var(--ink-soft); border-color: var(--line); }
.deploy-card.is-muted h3 { color: var(--ink-muted); }
.deploy-card.is-muted .deploy-list svg { color: var(--ink-soft); }
.deploy-card .tier-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.deploy-card .tier-badges .tier-badge { margin-bottom: 0; }
.deploy-card .tier-badge.is-solid { background: var(--accent); color: var(--accent-ink); }
.deploy-card .deploy-foot { margin-top: auto; padding-top: 1.5rem; }

/* 100 % Swissness — drei Fakten über den beiden Betriebsmodellen */
.swiss-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-card);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.swiss-fact { padding: clamp(1.25rem, 2.5vw, 1.75rem); display: flex; gap: 0.9rem; align-items: flex-start; }
.swiss-fact + .swiss-fact { border-left: 1px solid var(--line-soft); }
.swiss-fact svg { flex: none; color: var(--danger); margin-top: 3px; }
.swiss-fact b { display: block; font-size: 1rem; margin-bottom: 0.25rem; }
.swiss-fact p { font-size: 0.88rem; color: var(--ink-muted); }
@media (max-width: 820px) {
    .swiss-facts { grid-template-columns: 1fr; }
    .swiss-fact + .swiss-fact { border-left: none; border-top: 1px solid var(--line-soft); }
}

/* --------------------------------------------------------------------------
   Roadmap — Sektion ist im HTML aktuell auskommentiert, Styles bleiben bereit
   -------------------------------------------------------------------------- */
.roadmap-card { position: relative; }
.roadmap-tag { position: absolute; top: 1.4rem; right: 1.4rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.6rem; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-list { max-width: 860px; border-top: 1px solid var(--line-soft); }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.4rem 3rem 1.4rem 0;
    position: relative;
    font-family: var(--display);
    font-variation-settings: "wdth" 98;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    letter-spacing: -0.012em;
    line-height: 1.35;
    transition: color 200ms var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { .faq-item summary:hover { color: var(--accent); } }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 6px; top: 50%;
    width: 11px; height: 11px;
    margin-top: -6px;
    border-right: 1.5px solid var(--accent);
    border-bottom: 1.5px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 300ms var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-answer { padding: 0 3rem 1.6rem 0; color: var(--ink-muted); font-size: 0.98rem; max-width: 70ch; }

/* --------------------------------------------------------------------------
   Abschluss-CTA
   -------------------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; background: var(--bg-elev); }
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 140% at 20% 0%, color-mix(in oklch, var(--accent) 15%, transparent), transparent 62%);
    pointer-events: none;
}
.cta-band .container { position: relative; }
.cta-inner { max-width: 720px; }
.cta-inner h2 { margin-bottom: 1.25rem; }
.cta-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }
.cta-contact { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); display: flex; gap: 1.5rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.82rem; color: var(--ink-muted); }
.cta-contact a { color: var(--accent); }
