/*
 * onderweg-intro.css
 *
 * /onderweg: the app's Onderweg gate on a page (components/onderweg-intro.php)
 * and the explanation under it. Lockup, lit text and the lit button come from
 * brand-lockup.css; the timings are the app's (OnderwegRouteMap.tsx): the
 * route draws in 1.4 s, the pumps pop up along it, the cheapest one and the
 * callout follow, then the arrow drives the rit in a loop.
 */

.ow-page {
    --ow-ink: var(--color-text-strong, #000);
    --ow-text: var(--color-text, #212529);
    --ow-muted: var(--color-muted, #6c757d);
    --ow-accent: var(--color-primary, #F38651);
    --ow-accent-ink: var(--color-primary-700, #c9633a);
    --ow-success: #2e7d32;
    --ow-blue: #0079fd;
    --ow-orange: #F38651;
    color: var(--ow-text);
    font-family: var(--font-family-body);
}

.ow-main {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 7.5rem 16px 4rem;
}

/* --- First screen ---------------------------------------------------------- */
.ow-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 48px;
    align-items: center;
    min-height: calc(100vh - 11rem);
}

.ow-intro .bt-lockup { margin-bottom: 20px; }

.ow-intro-title {
    font-family: var(--font-family-title);
    font-weight: 800;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ow-ink);
    margin: 0 0 16px;
}

.ow-intro-lit { display: block; }

.ow-intro-lead {
    font-size: 1.08rem;
    line-height: 1.6;
    max-width: 32em;
    margin: 0 0 22px;
}

/* The three points: frosted pills with an orange icon, sliding in after the title. */
.ow-points {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ow-point {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 11px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--ow-ink);
    animation: ow-slide 450ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--ow-delay, 0ms);
}

.ow-point svg { width: 16px; height: 16px; color: var(--ow-accent-ink); flex: 0 0 auto; }

@keyframes ow-slide {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: none; }
}

/* --- The way into the app -------------------------------------------------- */
.ow-cta { max-width: 460px; }
.ow-cta-phone,
.ow-cta-desktop { display: none; }
.ow-cta[data-platform="ios"] .ow-cta-phone,
.ow-cta[data-platform="android"] .ow-cta-phone { display: block; }
.ow-cta[data-platform="desktop"] .ow-cta-desktop { display: block; }

.ow-cta-open { width: 100%; }

.ow-cta-stores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* The official badges, at one height (Apple and Google both ask for this, unaltered). */
.ow-badge { display: inline-block; line-height: 0; border-radius: 8px; transition: transform 0.2s ease; }
.ow-badge img { height: 48px; width: auto; }
.ow-badge:hover { transform: translateY(-2px); }
.ow-badge:focus-visible { outline: 3px solid rgba(243, 134, 81, 0.5); outline-offset: 3px; }

/* On a phone only that phone's store. */
.ow-cta-store--ios,
.ow-cta-store--android { display: none; }
.ow-cta[data-platform="ios"] .ow-cta-store--ios,
.ow-cta[data-platform="android"] .ow-cta-store--android { display: inline-block; }
.ow-cta-phone .ow-cta-note { margin: 16px 0 8px; }
.ow-cta-desktop .ow-cta-note { margin-top: 14px; }

.ow-cta-note {
    margin: 12px 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--ow-muted);
}

.ow-intro-pro a { color: var(--ow-accent-ink); font-weight: 600; }

.ow-intro-pro {
    margin: 18px 0 0;
    font-size: 0.92rem;
    color: var(--ow-muted);
}

/* --- The map ---------------------------------------------------------------- */
.ow-map {
    position: relative;
    margin: 0;
    aspect-ratio: 637 / 512;
    border-radius: 24px;
    overflow: hidden;
    background: #f5f2ec;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.05);
}

.ow-map-svg {
    display: block;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ow-map-credit {
    position: absolute;
    right: 8px;
    bottom: 6px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    color: #6b7280;
}

/* The route: blue in a white casing, as on the app's map. */
.ow-route-casing {
    fill: none;
    stroke: #fff;
    stroke-width: 9;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.ow-route {
    fill: none;
    stroke: var(--ow-blue);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
    animation: ow-draw 1400ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes ow-draw { to { stroke-dashoffset: 0; } }

/* Markers spring into view after --ow-delay. The outer group is positioned
   (an SVG transform attribute); the inner one scales around its centre. */
.ow-pop-in {
    transform-box: fill-box;
    transform-origin: center;
    animation: ow-pop 520ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: var(--ow-delay, 0ms);
}

@keyframes ow-pop {
    from { opacity: 0; transform: scale(0); }
    60% { opacity: 1; }
    to { opacity: 1; transform: scale(1); }
}

.ow-end circle { fill: #000; stroke: #fff; stroke-width: 2; }
.ow-end text { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; }
.ow-pump circle { fill: var(--ow-orange); stroke: #fff; stroke-width: 2; }

.ow-best-dot { fill: var(--ow-success); stroke: #fff; stroke-width: 3; }

.ow-best-ring {
    fill: var(--ow-success);
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: ow-pulse 1600ms cubic-bezier(0.5, 1, 0.89, 1) infinite;
    animation-delay: calc(var(--ow-delay, 0ms) + 300ms);
}

@keyframes ow-pulse {
    from { opacity: 0.55; transform: scale(1); }
    to { opacity: 0; transform: scale(2.4); }
}

/* The callout over the cheapest stop. */
.ow-callout {
    animation: ow-rise 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--ow-delay, 0ms);
}

@keyframes ow-rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.ow-card,
.ow-tail { fill: #fff; }
.ow-tail { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.14)); }
.ow-ok { fill: var(--ow-success); }
.ow-ok-check { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ow-eyebrow { fill: var(--ow-success); font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; }
.ow-price { fill: #000; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.ow-price-last { font-size: 17px; }
.ow-chip { fill: #f3f1ed; }
.ow-chip-text { fill: #4b5563; font-size: 12px; font-weight: 700; }
.ow-saving { fill: var(--ow-success); }
.ow-saving-text { fill: #fff; font-size: 12.5px; font-weight: 800; }

/* --- What Onderweg works out (under the first screen) ---------------------- */
.ow-section {
    max-width: 880px;
    margin: 72px auto 0;
}

.ow-section h2 {
    font-family: var(--font-family-title);
    font-weight: 800;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    letter-spacing: -0.01em;
    color: var(--ow-ink);
    margin: 0 0 14px;
}

.ow-section > p { font-size: 1.04rem; line-height: 1.65; margin: 0 0 24px; }

.ow-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.ow-fact {
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--color-border, #e5e7eb);
}

.ow-fact h3 { font-size: 1.02rem; font-weight: 700; color: var(--ow-ink); margin: 0 0 6px; }
.ow-fact p { margin: 0; font-size: 0.94rem; line-height: 1.5; color: var(--ow-muted); }

.ow-caveats { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; line-height: 1.6; }

.ow-faq-item {
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    padding: 14px 0;
}

.ow-faq-item summary { cursor: pointer; list-style: none; }
.ow-faq-item summary::-webkit-details-marker { display: none; }
.ow-faq-item summary h3 { display: inline; font-size: 1.04rem; font-weight: 700; color: var(--ow-ink); margin: 0; }
.ow-faq-item p { margin: 10px 0 0; line-height: 1.6; }

/* --- Phone: one column, the map under the way in -------------------------- */
@media (max-width: 900px) {
    .ow-main { padding-top: 6.5rem; }

    .ow-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        min-height: 0;
    }

    .ow-intro .bt-lockup { --bt-logo-h: 34px; --bt-word-size: 29px; }
    .ow-cta { max-width: none; }
    /* Narrower and taller: the map crops its sides (slice) and keeps the rit. */
    .ow-map { aspect-ratio: 1 / 1; border-radius: 20px; }
    .ow-facts { grid-template-columns: minmax(0, 1fr); }
    .ow-section { margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .ow-point,
    .ow-route,
    .ow-pop-in,
    .ow-callout { animation: none; }
    .ow-route { stroke-dashoffset: 0; }
    .ow-best-ring { animation: none; }
    /* The arrow only exists to move; without motion it is left out, as in the app. */
    .ow-car { display: none; }
}
