/*
 * The public site.
 *
 * Separate from admin.css on purpose. The admin panel is a dense tool people
 * use for eight hours; this is a front door somebody reads once on a phone,
 * often standing up, often while deciding whether to bother. Different job,
 * different type scale, different density.
 *
 * Bootstrap is not loaded here. The marketing pages need a grid, a button and
 * a card, which is a few hundred lines -- against 30KB of framework the
 * visitor downloads before reading a word.
 */

/* --- Tokens ---------------------------------------------------------- */
:root {
    /* The brand teal, and a deeper one for large fills so white text on it
       clears the contrast threshold rather than sitting just under it. */
    --wv-teal: #0F766E;
    --wv-teal-deep: #0B5B55;
    --wv-teal-bright: #14A6A0;
    --wv-teal-wash: #E6F4F3;

    /* Neutrals pulled very slightly towards the teal, so greys next to the
       brand colour read as chosen rather than as the browser default. */
    --wv-ink: #0C1A19;
    --wv-body: #46514F;
    --wv-muted: #6B7A78;
    --wv-line: #DEE7E6;
    --wv-surface: #FFFFFF;
    --wv-page: #F7FAFA;

    --wv-amber: #B45309;
    --wv-radius: 14px;
    --wv-radius-lg: 22px;
    --wv-shadow: 0 1px 2px rgba(12, 26, 25, .06), 0 8px 24px rgba(12, 26, 25, .06);
    --wv-shadow-lift: 0 2px 4px rgba(12, 26, 25, .07), 0 18px 48px rgba(12, 26, 25, .12);

    --wv-max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body.wv-public {
    margin: 0;
    background: var(--wv-page);
    color: var(--wv-body);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 17px rather than 16: this is read on phones at arm's length, often by
       people who are not twenty-five. */
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    color: var(--wv-ink);
    line-height: 1.15;
    margin: 0 0 .5em;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.16rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--wv-teal); }

img { max-width: 100%; height: auto; }

.wv-container {
    width: 100%;
    max-width: var(--wv-max);
    margin-inline: auto;
    padding-inline: 20px;
}

.wv-skip {
    position: absolute; left: -9999px;
    background: var(--wv-ink); color: #fff;
    padding: 12px 18px; border-radius: 0 0 var(--wv-radius) 0; z-index: 200;
}
.wv-skip:focus { left: 0; top: 0; }

:where(a, button, [tabindex]):focus-visible {
    outline: 3px solid var(--wv-teal-bright);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --- Header ----------------------------------------------------------- */
.wv-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.6) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.wv-header[data-scrolled] {
    border-bottom-color: var(--wv-line);
    box-shadow: 0 6px 20px rgba(12, 26, 25, .05);
}
.wv-header-inner {
    display: flex; align-items: center; gap: 16px;
    min-height: 68px;
}
.wv-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 1.16rem; color: var(--wv-ink);
    text-decoration: none; letter-spacing: -.02em;
    margin-right: auto;
}
.wv-brand img { display: block; }

.wv-nav { display: flex; align-items: center; gap: 4px; }
.wv-nav a {
    color: var(--wv-body); text-decoration: none;
    padding: 9px 13px; border-radius: 9px; font-size: .97rem; font-weight: 550;
}
.wv-nav a:hover { background: var(--wv-teal-wash); color: var(--wv-teal-deep); }
.wv-nav a[aria-current="page"] { color: var(--wv-teal-deep); font-weight: 700; }

.wv-burger {
    display: none;
    background: none; border: 1px solid var(--wv-line);
    border-radius: 10px; padding: 7px 11px; font-size: 1.4rem;
    color: var(--wv-ink); cursor: pointer; line-height: 1;
}

/* --- Buttons ---------------------------------------------------------- */
.wv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 11px;
    font-weight: 650; font-size: .98rem; text-decoration: none;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease;
}
.wv-btn-primary { background: var(--wv-teal); color: #fff; }
.wv-btn-primary:hover { background: var(--wv-teal-deep); transform: translateY(-1px); box-shadow: var(--wv-shadow); }
.wv-btn-ghost { color: var(--wv-ink); border-color: var(--wv-line); background: var(--wv-surface); }
.wv-btn-ghost:hover { border-color: var(--wv-teal); color: var(--wv-teal-deep); }
.wv-btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.34); }
.wv-btn-light:hover { background: rgba(255,255,255,.24); }
.wv-btn-lg { padding: 15px 26px; font-size: 1.04rem; }
@media (prefers-reduced-motion: reduce) {
    .wv-btn:hover { transform: none; }
}

/* --- Sections --------------------------------------------------------- */
.wv-section { padding: clamp(56px, 8vw, 104px) 0; }
.wv-section-tint { background: var(--wv-surface); }
.wv-eyebrow {
    display: inline-block;
    font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
    color: var(--wv-teal); margin-bottom: 12px;
}
.wv-lede { font-size: clamp(1.04rem, 2vw, 1.2rem); color: var(--wv-body); max-width: 62ch; }
.wv-section-head { max-width: 70ch; margin-bottom: clamp(30px, 5vw, 52px); }

/* --- Hero + the 3D scene --------------------------------------------- */
.wv-hero {
    position: relative;
    background:
        radial-gradient(1100px 520px at 78% -12%, rgba(20, 166, 160, .22), transparent 62%),
        linear-gradient(178deg, #F2FAF9 0%, var(--wv-page) 72%);
    padding: clamp(44px, 7vw, 92px) 0 clamp(56px, 8vw, 104px);
    overflow: hidden;
}
.wv-hero-grid {
    display: grid; gap: clamp(34px, 5vw, 60px);
    grid-template-columns: 1.05fr .95fr; align-items: center;
}
.wv-hero p.wv-lede { margin-bottom: 26px; }
.wv-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.wv-hero-trust {
    display: flex; flex-wrap: wrap; gap: 10px 22px;
    font-size: .92rem; color: var(--wv-muted); list-style: none; padding: 0; margin: 0;
}
.wv-hero-trust li { display: flex; align-items: center; gap: 7px; }
.wv-hero-trust i { color: var(--wv-teal); }

/*
 * The 3D scene.
 *
 * Real CSS 3D -- preserve-3d on a perspective stage, with the cards on
 * genuinely different Z planes -- rather than a flat image with a drop
 * shadow. It tilts towards the pointer, which is what makes the depth read
 * as depth instead of as decoration.
 *
 * No WebGL and no library. A marketing page that ships a 3D engine to show
 * three rectangles has spent a visitor's data allowance on a gimmick, and on
 * a mid-range Android the frame budget goes with it.
 */
.wv-stage {
    perspective: 1400px;
    perspective-origin: 55% 40%;
    min-height: clamp(330px, 42vw, 470px);
    display: grid; place-items: center;
}
.wv-scene {
    position: relative;
    width: min(100%, 460px);
    aspect-ratio: 4 / 3.4;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -14deg));
    transition: transform .5s cubic-bezier(.2, .7, .3, 1);
    will-change: transform;
}
.wv-card3d {
    position: absolute;
    background: var(--wv-surface);
    border: 1px solid var(--wv-line);
    border-radius: var(--wv-radius-lg);
    box-shadow: var(--wv-shadow-lift);
    padding: 18px;
    transform-style: preserve-3d;
}
/* Each card sits on its own Z plane; the browser handles the parallax. */
.wv-card3d.is-back  { inset: 0 22% 30% 0;  transform: translateZ(-70px) rotate(-4deg); }
.wv-card3d.is-mid   { inset: 16% 6% 12% 16%; transform: translateZ(10px); }
.wv-card3d.is-front { inset: auto 0 0 30%; width: 62%; transform: translateZ(88px); }

.wv-float { animation: wv-float 7s ease-in-out infinite; }
.wv-float-slow { animation: wv-float 9s ease-in-out infinite reverse; }
@keyframes wv-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -12px; }
}
@media (prefers-reduced-motion: reduce) {
    .wv-float, .wv-float-slow { animation: none; }
    .wv-scene { transition: none; }
}

.wv-card3d h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--wv-muted); margin-bottom: 10px; }
.wv-stat-big { font-size: 2rem; font-weight: 800; color: var(--wv-ink); line-height: 1; }
.wv-stat-sub { font-size: .82rem; color: var(--wv-muted); }
.wv-bar { height: 7px; border-radius: 99px; background: var(--wv-teal-wash); overflow: hidden; margin-top: 10px; }
.wv-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--wv-teal); }
.wv-tick { display: flex; align-items: center; gap: 9px; font-size: .87rem; padding: 5px 0; }
.wv-tick i { color: var(--wv-teal); }
.wv-pill {
    display: inline-block; font-size: .7rem; font-weight: 700; padding: 3px 9px;
    border-radius: 99px; background: var(--wv-teal-wash); color: var(--wv-teal-deep);
}

/* --- Cards and grids -------------------------------------------------- */
.wv-grid { display: grid; gap: 22px; }
.wv-grid-3 { grid-template-columns: repeat(3, 1fr); }
.wv-grid-2 { grid-template-columns: repeat(2, 1fr); }

.wv-card {
    background: var(--wv-surface);
    border: 1px solid var(--wv-line);
    border-radius: var(--wv-radius);
    padding: 26px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.wv-card:hover { border-color: var(--wv-teal-bright); box-shadow: var(--wv-shadow); }
.wv-card-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.3rem;
    background: var(--wv-teal-wash); color: var(--wv-teal-deep);
    margin-bottom: 14px;
}
.wv-card p:last-child { margin-bottom: 0; }

/* --- Frequently asked questions (and the AEO block) ------------------- */
.wv-faq { border-top: 1px solid var(--wv-line); }
.wv-faq details {
    border-bottom: 1px solid var(--wv-line);
    padding: 18px 0;
}
.wv-faq summary {
    cursor: pointer; font-weight: 650; color: var(--wv-ink);
    font-size: 1.05rem; list-style: none;
    display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
}
.wv-faq summary::-webkit-details-marker { display: none; }
.wv-faq summary::after {
    content: "\F282"; font-family: "bootstrap-icons"; font-size: .9rem;
    color: var(--wv-teal); transition: transform .2s ease; flex: none; margin-top: 4px;
}
.wv-faq details[open] summary::after { transform: rotate(180deg); }
.wv-faq details > p { margin: 12px 0 0; max-width: 78ch; }

/* --- Contact (support page) ------------------------------------------ */
.wv-contact-card {
    display: flex; gap: 18px; align-items: flex-start;
    background: var(--wv-surface); border: 1px solid var(--wv-line);
    border-radius: var(--wv-radius); padding: 26px;
}
.wv-contact-card i.wv-contact-icon {
    font-size: 1.5rem; color: var(--wv-teal-deep);
    background: var(--wv-teal-wash); border-radius: 12px;
    width: 50px; height: 50px; display: grid; place-items: center; flex: none;
}
.wv-contact-value {
    font-size: 1.22rem; font-weight: 700; color: var(--wv-ink);
    text-decoration: none; word-break: break-word;
}
.wv-contact-value:hover { color: var(--wv-teal); }

/* --- Video library ---------------------------------------------------- */
.wv-video-card {
    background: var(--wv-surface); border: 1px solid var(--wv-line);
    border-radius: var(--wv-radius); overflow: hidden;
    display: flex; flex-direction: column;
}
.wv-video-thumb {
    position: relative; aspect-ratio: 16 / 9; background: var(--wv-ink);
    border: 0; padding: 0; cursor: pointer; display: block; width: 100%;
}
.wv-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wv-video-thumb::after {
    content: "\F4F4"; font-family: "bootstrap-icons";
    position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 3rem; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5);
    transition: transform .18s ease;
}
.wv-video-thumb:hover::after { transform: scale(1.1); }
.wv-video-duration {
    position: absolute; right: 9px; bottom: 9px;
    background: rgba(12,26,25,.82); color: #fff;
    font-size: .76rem; font-weight: 600; padding: 2px 7px; border-radius: 5px;
}
.wv-video-body { padding: 16px 18px 20px; }
.wv-video-body h3 { margin-bottom: 6px; font-size: 1.04rem; }
.wv-video-body p { font-size: .92rem; color: var(--wv-muted); margin: 0; }

/* The player replaces the thumbnail in place -- nobody is sent to YouTube. */
.wv-video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.wv-video-frame iframe,
.wv-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.wv-cat-head {
    display: flex; align-items: baseline; gap: 12px;
    margin: clamp(34px, 5vw, 54px) 0 20px;
}
.wv-cat-head h2 { margin: 0; }
.wv-cat-count { font-size: .88rem; color: var(--wv-muted); }

/* --- Call to action band --------------------------------------------- */
.wv-cta {
    background: linear-gradient(135deg, var(--wv-teal-deep), var(--wv-teal) 55%, var(--wv-teal-bright));
    color: #fff; border-radius: var(--wv-radius-lg);
    padding: clamp(34px, 5vw, 62px);
    text-align: center;
}
.wv-cta h2 { color: #fff; }
.wv-cta p { color: rgba(255,255,255,.9); max-width: 58ch; margin-inline: auto; }
.wv-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* --- Footer ----------------------------------------------------------- */
.wv-footer { background: var(--wv-ink); color: #B4C4C2; padding: clamp(44px, 6vw, 68px) 0 26px; margin-top: 60px; }
.wv-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.35fr; gap: 34px; }
.wv-brand-footer { color: #fff; margin-bottom: 12px; }
.wv-footer-note { font-size: .92rem; max-width: 42ch; color: #93A5A3; }
.wv-footer-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: #fff; margin-bottom: 12px; }
.wv-footer ul { list-style: none; margin: 0; padding: 0; }
.wv-footer li { margin-bottom: 9px; }
.wv-footer a { color: #B4C4C2; text-decoration: none; font-size: .94rem; }
.wv-footer a:hover { color: #fff; text-decoration: underline; }
.wv-footer-contact li { display: flex; align-items: center; gap: 9px; }
.wv-footer-contact i { color: var(--wv-teal-bright); }
.wv-footer-legal {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 34px; padding-top: 20px;
    font-size: .86rem; color: #7C8E8C;
}
.wv-footer-legal p { margin: 0; }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 940px) {
    .wv-hero-grid { grid-template-columns: 1fr; }
    /* The scene goes first on a phone: it is the thing that says "this is a
       real product" before anybody reads a sentence. */
    .wv-stage { order: -1; min-height: 300px; }
    .wv-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .wv-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .wv-burger { display: inline-flex; }
    .wv-nav {
        display: none;
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--wv-surface);
        border-bottom: 1px solid var(--wv-line);
        padding: 12px 20px 20px;
        box-shadow: var(--wv-shadow);
    }
    .wv-nav[data-open] { display: flex; }
    .wv-nav a { padding: 13px 12px; font-size: 1.02rem; }
    .wv-nav .wv-btn { margin-top: 6px; justify-content: center; }
    .wv-header-inner { position: relative; }
}

@media (max-width: 620px) {
    .wv-grid-3, .wv-grid-2 { grid-template-columns: 1fr; }
    .wv-footer-grid { grid-template-columns: 1fr; }
    .wv-contact-card { flex-direction: column; gap: 14px; }

    /* The headline comes back above the picture on a phone.
     *
     * Stacked full-width, the cards filled the entire first screen and
     * pushed "what this is" below the fold -- a visitor met two screenshots
     * and had to scroll to find out what they were looking at. The scene
     * earns its place on a wide screen, where it sits beside the words
     * rather than in front of them. */
    .wv-stage { order: 0; min-height: 0; margin-top: 26px; }

    /* Flatten the tilt: there is no pointer to follow, and the rotation eats
       horizontal space a phone has none of. */
    .wv-scene { transform: none; aspect-ratio: auto; }
    /* One card, not three. The point on a phone is "this is a real product",
       and one made well says that; three stacked is a scroll. */
    .wv-card3d.is-back,
    .wv-card3d.is-mid { display: none; }
    .wv-card3d.is-front { position: static; inset: auto; width: 100%; transform: none; }
}

/* --- Legal documents -------------------------------------------------- */
/* Set for reading a contract, not for scanning marketing copy: narrower
   measure, more room between clauses, and numbering that stays legible when
   somebody is quoting a clause back at you on the phone. */

.wv-hero-slim { padding-block: clamp(34px, 5vw, 56px); }

.wv-legal { max-width: 78ch; }
.wv-legal h2 {
    font-size: 1.32rem;
    margin: clamp(30px, 4vw, 46px) 0 14px;
    padding-top: 6px;
    scroll-margin-top: 90px;      /* the sticky header must not cover a target */
}
.wv-legal h2:first-of-type { margin-top: 0; }
.wv-legal p { margin-bottom: 14px; }
.wv-legal ul { margin: 0 0 16px; padding-left: 22px; }
.wv-legal li { margin-bottom: 8px; }
.wv-legal code {
    background: var(--wv-teal-wash); color: var(--wv-teal-deep);
    padding: 1px 6px; border-radius: 5px; font-size: .88em;
}

.wv-legal-meta { font-size: .9rem; color: var(--wv-muted); }

.wv-legal-callout {
    background: var(--wv-teal-wash);
    border-left: 4px solid var(--wv-teal);
    border-radius: 0 var(--wv-radius) var(--wv-radius) 0;
    padding: 18px 22px;
    margin: 22px 0;
}
.wv-legal-callout p:last-child { margin-bottom: 0; }
/* Amber for the clauses somebody will wish they had read. */
.wv-legal-callout-strong {
    background: #FEF6EC;
    border-left-color: var(--wv-amber);
}

.wv-legal-table-wrap { overflow-x: auto; margin: 18px 0 22px; }
.wv-legal-table {
    width: 100%; border-collapse: collapse; font-size: .93rem;
    min-width: 460px;      /* below this a three-column table is unreadable */
}
.wv-legal-table th, .wv-legal-table td {
    text-align: left; padding: 11px 14px;
    border-bottom: 1px solid var(--wv-line); vertical-align: top;
}
.wv-legal-table th {
    background: var(--wv-teal-wash); color: var(--wv-teal-deep);
    font-weight: 700; font-size: .82rem;
    text-transform: uppercase; letter-spacing: .05em;
}

/* --- Cookie banner ---------------------------------------------------- */
/* Anchored, not modal. A banner that blocks the page before somebody has
   read a word of it is the pattern the ICO complains about, and it makes
   "reject" feel like the way out rather than a real choice. */
.wv-cookie {
    position: fixed; inset: auto 0 0 0; z-index: 150;
    background: var(--wv-surface);
    border-top: 1px solid var(--wv-line);
    box-shadow: 0 -8px 32px rgba(12, 26, 25, .12);
    padding: 18px 0;
}
.wv-cookie[hidden] { display: none; }
.wv-cookie-inner {
    width: 100%; max-width: var(--wv-max); margin-inline: auto;
    padding-inline: 20px;
    display: flex; align-items: center; gap: 26px;
}
.wv-cookie h2 { font-size: 1.02rem; margin-bottom: 5px; }
.wv-cookie p { font-size: .92rem; margin: 0; color: var(--wv-body); }
.wv-cookie-actions { display: flex; gap: 10px; flex: none; }
/* Equal weight, deliberately. Refusing has to be exactly as easy as
   accepting, which means the same size and the same prominence -- not a grey
   link beside a green button. */
.wv-cookie-actions .wv-btn { min-width: 148px; }

@media (max-width: 760px) {
    .wv-cookie-inner { flex-direction: column; align-items: stretch; gap: 14px; }
    .wv-cookie-actions .wv-btn { flex: 1; min-width: 0; }
}
