/* ---------------------------------------------------------------------------
 * pv-lab.css — the website wearing the app's design.
 *
 * Perfumers Vault 2 ships the "Lab" theme: a #F2F4F8 canvas, white cards with
 * a 1px #D9DEE8 hairline and 10px corners, deep navy #14213D for type and
 * fills, gold #E9C46A as the single accent, Sora for text and JetBrains Mono
 * for numerals. The source of truth is `lib/utils/pv_palette.dart` in the app
 * repo (`PvPalette.labLight`); keep the tokens below in step with it.
 *
 * Why this file exists rather than Tailwind utilities: `css/tailwind.css` is a
 * pre-compiled stylesheet that generates nothing new, so any `tw-` class that
 * is not already in `tailwind-build.css` renders nothing at all (see
 * CLAUDE.md > Commands). Ordinary CSS rules work normally, so the design
 * system lives here.
 *
 * Load this LAST. It redefines the custom properties that css/index.css sets,
 * which is how the inherited template's buttons, links and inputs are
 * re-skinned without touching their markup.
 *
 * Inline styles still beat these rules. Page colours were rewritten in place
 * to the tokens below, so the two agree; if you add markup, take the colour
 * from a variable here rather than inventing one.
 * ------------------------------------------------------------------------- */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
    /* --- PvPalette.labLight ------------------------------------------- */
    --pv-canvas: #f2f4f8;
    --pv-surface: #ffffff;
    --pv-pill: #e8ebf1;
    --pv-border: #d9dee8;
    --pv-hero: #14213d;
    --pv-on-hero: #ffffff;
    --pv-nav-active: #dde3f0;
    --pv-accent: #e9c46a;
    --pv-text: #14213d;
    --pv-text-strong: #33405e;
    --pv-text-muted: #5b6478;
    --pv-text-faint: #6e7893;

    /* Semantic trio, from PvPalette's okGreen / warnGold / badRed. */
    --pv-ok: #3f8f5a;
    --pv-warn: #c98a1e;
    --pv-danger: #c4443c;

    /* Radii: the app uses 10 and 6. Pills are fully round. */
    --pv-radius: 10px;
    --pv-radius-sm: 6px;
    --pv-radius-pill: 999px;

    --pv-font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
    --pv-font-num: "JetBrains Mono", Menlo, "Courier New", monospace;

    --pv-shadow-card: 0 1px 2px rgba(20, 33, 61, 0.04);
    --pv-shadow-lift: 0 14px 34px rgba(20, 33, 61, 0.1);
    --pv-shadow-device: 0 34px 70px rgba(20, 33, 61, 0.26);

    /* --- Re-skin the inherited template's variables (css/index.css) --- */
    --btn-color: var(--pv-on-hero);
    --btn-bg: var(--pv-hero);
    --primary-text-color: var(--pv-text);
    --link-hover: var(--pv-text);
    --footer-link-hover: var(--pv-text);
    --input-focus-bd-color: var(--pv-hero);
}

/* --- Base --------------------------------------------------------------- */

html {
    font-family: var(--pv-font);
    /* The app's canvas, so the page is not stark white behind the cards. */
    background-color: var(--pv-canvas);
    color: var(--pv-text);
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--pv-font);
    background-color: var(--pv-canvas);
    color: var(--pv-text-muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--pv-font);
    color: var(--pv-text);
    letter-spacing: -0.015em;
}

/* Sora is a wide face: the template's uppercase 6xl hero needs reining in. */
h1,
.tw-text-6xl {
    letter-spacing: -0.03em;
}

strong,
b {
    color: var(--pv-text);
    font-weight: 600;
}

code,
kbd,
samp,
.pv-num {
    font-family: var(--pv-font-num);
    font-size: 0.92em;
}

/* Links: navy, with the accent arriving underneath on hover. Gold is never
 * link text — #E9C46A on white is around 1.8:1 and unreadable. */
a {
    text-decoration-color: var(--pv-border);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
    text-decoration-color: var(--pv-accent);
}

.header-links:hover,
.footer-link:hover {
    color: var(--pv-text);
    text-decoration: underline;
    text-decoration-color: var(--pv-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* Hover cannot be written inline, and on this site inline styles carry the
 * rendering, so these three rules are the only ones that need !important.
 * Every content link now reads as navy text under a gold rule; on hover the
 * rule thickens and turns navy. Before this, most content links were navy
 * with no underline at all, which made them indistinguishable from the
 * sentence around them. */
main a:hover,
.faq-content a:hover,
.pv-note a:hover,
.pv-split__copy a:hover,
.pv-spotlight__body a:hover {
    text-decoration-line: underline !important;
    text-decoration-color: var(--pv-hero) !important;
    text-decoration-thickness: 3px !important;
}

/* Footer and header links carry no underline at rest, so the page does not
 * look ruled; the accent arrives on hover. */
footer a:hover,
header a:not([class*="logo"]):hover {
    text-decoration-line: underline !important;
    text-decoration-color: var(--pv-accent) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 4px;
}

/* A content link that carries no inline style of its own still gets the
 * treatment, and keyboard focus is always visible. */
main a:not([class*="btn"]):not(.pv-pill):not([style*="text-decoration"]) {
    color: var(--pv-text);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--pv-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:focus-visible {
    outline: 2px solid var(--pv-hero);
    outline-offset: 3px;
    border-radius: 3px;
}

/* --- Buttons ------------------------------------------------------------ */

/* PvPillButton: a pill, filled with the hero navy or outlined on the hairline. */
.btn,
.pv-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: var(--pv-radius-pill);
    border: 1px solid var(--pv-hero);
    background-color: var(--pv-hero);
    color: var(--pv-on-hero);
    font-family: var(--pv-font);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.1;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}

.btn:hover,
.pv-pill:hover {
    box-shadow: var(--pv-shadow-lift);
    transform: translateY(-1px);
}

.pv-pill--ghost {
    background-color: transparent;
    border-color: var(--pv-border);
    color: var(--pv-text);
}

.pv-pill--ghost:hover {
    border-color: var(--pv-hero);
    background-color: var(--pv-pill);
}

/* --- Cards and section furniture --------------------------------------- */

/* PvCard. */
.pv-card {
    background-color: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: var(--pv-radius);
    box-shadow: var(--pv-shadow-card);
    padding: 1.25rem;
}

/* PvEyebrow: a small capitalised label over a section, with its icon. */
.pv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pv-text-muted);
}

.pv-eyebrow i {
    color: var(--pv-accent);
    font-size: 0.95rem;
}

/* The gold rule the app puts under a section heading. */
.pv-rule {
    width: 46px;
    height: 3px;
    border-radius: 3px;
    background-color: var(--pv-accent);
}

/* The PRO tag used beside a feature name. */
.pv-tag-pro {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.5rem;
    border-radius: var(--pv-radius-pill);
    background-color: var(--pv-hero);
    color: var(--pv-accent);
    font-family: var(--pv-font);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

/* The navy panel the app uses for its hero card. Gold is legible on it, so
 * this is the one place the accent carries text. */
.pv-hero-card {
    background: linear-gradient(155deg, #1b2c50 0%, var(--pv-hero) 55%, #0f1a33 100%);
    border: 1px solid #253559;
    border-radius: var(--pv-radius);
    color: var(--pv-on-hero);
    box-shadow: var(--pv-shadow-lift);
}

.pv-hero-card h2,
.pv-hero-card h3,
.pv-hero-card strong {
    color: var(--pv-on-hero);
}

.pv-hero-card .pv-eyebrow {
    color: var(--pv-accent);
}

/* The check-mark bullets in the feature columns. */
.bi-check-all {
    color: var(--pv-accent);
}

/* --- iPhone mockup ------------------------------------------------------ */

/* Frames a 780 x 1688 screenshot (iPhone 14/15 Pro aspect) in a device
 * shell, so a flat PNG reads as the app running on a phone. Width is the only
 * thing to set: --pv-phone-w, defaulting to 300px, drives everything else.
 *
 *   <div class="pv-phone">
 *     <div class="pv-phone__screen">
 *       <div class="pv-phone__island"></div>
 *       <img src="..." alt="..." />
 *     </div>
 *   </div>
 */
.pv-phone {
    --pv-phone-w: 300px;
    position: relative;
    flex: 0 0 auto;
    width: var(--pv-phone-w);
    /* 9 : 19.5, the aspect of the screenshots plus the bezel. */
    aspect-ratio: 9 / 19.5;
    padding: calc(var(--pv-phone-w) * 0.033);
    border-radius: calc(var(--pv-phone-w) * 0.155);
    background: linear-gradient(155deg, #3a4a70 0%, #1b2c50 38%, #0d1526 100%);
    box-shadow: var(--pv-shadow-device), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.pv-phone__screen {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: calc(var(--pv-phone-w) * 0.125);
    background-color: var(--pv-canvas);
}

.pv-phone__screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* The Dynamic Island, drawn rather than baked into the screenshot. */
.pv-phone__island {
    position: absolute;
    top: calc(var(--pv-phone-w) * 0.035);
    left: 50%;
    transform: translateX(-50%);
    width: 31%;
    height: calc(var(--pv-phone-w) * 0.073);
    border-radius: var(--pv-radius-pill);
    background-color: #0d1526;
    z-index: 2;
}

/* The side buttons, for weight rather than realism. */
.pv-phone::before,
.pv-phone::after {
    content: "";
    position: absolute;
    left: calc(var(--pv-phone-w) * -0.008);
    width: calc(var(--pv-phone-w) * 0.008);
    border-radius: 2px 0 0 2px;
    background-color: #253559;
}

.pv-phone::before {
    top: 22%;
    height: 7%;
}

.pv-phone::after {
    top: 32%;
    height: 12%;
}

/* A capture taller than the screen pans down on hover, so one frame can show
 * a whole scrolling page. Used for the full-length home screenshot. */
.pv-phone--tall .pv-phone__screen img {
    height: auto;
    object-fit: fill;
    transition: transform 6s ease-in-out;
}

.pv-phone--tall:hover .pv-phone__screen img {
    transform: translateY(calc(-100% + var(--pv-phone-w) * 2.167));
}

@media (prefers-reduced-motion: reduce) {
    .pv-phone--tall .pv-phone__screen img,
    .pv-phone--tall:hover .pv-phone__screen img {
        transition: none;
        transform: none;
    }
}

/* --- iPad mockup -------------------------------------------------------- */

/* The tablet counterpart of .pv-phone, for the 1210 x 834 landscape capture.
 * An iPad's bezel is even on all four sides and there is no island, so the
 * only furniture is the camera on the long top edge.
 *
 * The aspect ratio sits on the screen rather than the frame, so the
 * screenshot is shown whole and the frame's height derives from it. Set
 * --pv-tablet-w and everything else scales from it.
 *
 *   <div class="pv-tablet">
 *     <div class="pv-tablet__camera"></div>
 *     <div class="pv-tablet__screen"><img src="..." alt="..." /></div>
 *   </div>
 *
 * No transform of its own: GSAP writes one here to reveal the hero device,
 * and the two would fight.
 */
.pv-tablet {
    --pv-tablet-w: 420px;
    position: relative;
    flex: 0 0 auto;
    width: var(--pv-tablet-w);
    padding: calc(var(--pv-tablet-w) * 0.026);
    border-radius: calc(var(--pv-tablet-w) * 0.042);
    background: linear-gradient(150deg, #3a4a70 0%, #1b2c50 40%, #0d1526 100%);
    box-shadow: var(--pv-shadow-device), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.pv-tablet__screen {
    position: relative;
    width: 100%;
    /* The capture's own ratio, so nothing is cropped. */
    aspect-ratio: 1210 / 834;
    overflow: hidden;
    border-radius: calc(var(--pv-tablet-w) * 0.026);
    background-color: var(--pv-canvas);
}

.pv-tablet__screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* The front camera, centred on the landscape top edge. */
.pv-tablet__camera {
    position: absolute;
    top: calc(var(--pv-tablet-w) * 0.0115);
    left: 50%;
    width: calc(var(--pv-tablet-w) * 0.012);
    height: calc(var(--pv-tablet-w) * 0.012);
    margin-left: calc(var(--pv-tablet-w) * -0.006);
    border-radius: 50%;
    background-color: #0b1220;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    z-index: 2;
}

/* A gold glow behind a device, replacing the template's green blob. */
.pv-device-glow {
    position: relative;
}

.pv-device-glow::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4%;
    width: 78%;
    height: 62%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(233, 196, 106, 0.42), transparent);
    filter: blur(6px);
    z-index: 0;
}

.pv-device-glow > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 1023px) {
    .pv-phone {
        --pv-phone-w: 250px;
    }
}

/* --- The template's green blob behind the hero device ------------------- */

#hero-img-bg {
    background: radial-gradient(closest-side, rgba(233, 196, 106, 0.5), transparent) !important;
}

/* --- Header and footer -------------------------------------------------- */

header {
    backdrop-filter: saturate(140%) blur(10px);
    background-color: rgba(242, 244, 248, 0.82) !important;
    border-bottom: 1px solid var(--pv-border);
}

.header-links {
    border-radius: var(--pv-radius-sm);
    font-weight: 500;
    color: var(--pv-text-muted);
}

footer {
    background-color: var(--pv-surface);
    border-top: 1px solid var(--pv-border);
}

.footer-link {
    color: var(--pv-text-muted);
}

/* --- Long documents ----------------------------------------------------- */

/* The sidebar nav on privacy, terms and faq. */
.sidebar-nav .nav-link {
    border-radius: var(--pv-radius-sm) !important;
    font-size: 0.92rem;
    border-left: 2px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--pv-pill) !important;
    color: var(--pv-text) !important;
}

.sidebar-nav .nav-link.active {
    background-color: var(--pv-nav-active) !important;
    border-left-color: var(--pv-accent);
    color: var(--pv-text) !important;
    font-weight: 600;
}

/* Section headings in a policy: the icon becomes the app's gold accent. */
main section > h2 > i.bi {
    color: var(--pv-accent) !important;
}

/* Tables in the FAQ and the plans comparison. */
table {
    font-family: var(--pv-font);
}

table thead th {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pv-text-muted);
}

/* --- Print -------------------------------------------------------------- */

@media print {
    .pv-phone,
    .pv-device-glow::before,
    header {
        box-shadow: none;
    }
}

/* --- Page layout ---------------------------------------------------------
 *
 * The landing page was written with arbitrary Tailwind values —
 * tw-max-w-[520px], tw-w-[350px], tw-gap-[10%] — none of which exist in the
 * pre-compiled stylesheet, so none of them ever applied. These are the real
 * rules for the same intent.
 * ---------------------------------------------------------------------- */

/* A screenshot on one side, a feature list on the other. */
.pv-split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 7vw, 6rem);
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 3.5rem 0;
}

.pv-split__copy {
    max-width: 540px;
}

.pv-split__copy > h3 {
    font-size: clamp(1.75rem, 3.2vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
    margin: 0.35rem 0 0.25rem;
}

/* One feature: a heading with its check mark, then the explanation. */
.pv-split__copy h4 {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.4rem 0 0.3rem;
}

@media (max-width: 1023px) {
    .pv-split {
        flex-direction: column;
        padding: 2.5rem 0;
    }
    .pv-split__copy {
        max-width: 100%;
    }
}

/* Section heading, centred, with the app's eyebrow and gold rule. */
.pv-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
    max-width: 760px;
    margin: 0 auto 2rem;
}

.pv-section-head > h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    font-weight: 600;
    line-height: 1.15;
    margin: 0;
}

.pv-section-head > p,
.pv-section-head > span:not(.pv-eyebrow):not(.pv-rule) {
    color: var(--pv-text-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* The two plan cards. */
.pv-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.pv-plans > * {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
}

/* A tag beside a plan name or a feature: BETA, FREE, SUBSCRIPTION, PRO. */
.pv-tag {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border-radius: var(--pv-radius-pill);
    background-color: var(--pv-pill);
    color: var(--pv-text-muted);
    font-family: var(--pv-font);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    vertical-align: middle;
    white-space: nowrap;
}

.pv-tag--pro {
    background-color: var(--pv-hero);
    color: var(--pv-accent);
}

.pv-tag--free {
    background-color: #e4efe8;
    color: var(--pv-ok);
}

.pv-tag--beta {
    background-color: #f7efdc;
    color: var(--pv-warn);
}

/* On the navy plan card the pill inverts, so it stays legible. */
.pv-hero-card .pv-tag--pro {
    background-color: var(--pv-accent);
    color: var(--pv-hero);
}

.pv-hero-card .pv-split__copy,
.pv-hero-card p,
.pv-hero-card div {
    color: rgba(255, 255, 255, 0.86);
}

/* A quiet note under a section, like the subscription terms. */
.pv-note {
    max-width: 820px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.15rem;
    border: 1px solid var(--pv-border);
    border-left: 3px solid var(--pv-accent);
    border-radius: var(--pv-radius);
    background-color: var(--pv-surface);
    color: var(--pv-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Hero ---------------------------------------------------------------- */

/* The hero was written with tw-min-h-[100vh], tw-p-[5%] and
 * tw-leading-[80px], all arbitrary values that were never compiled, so it had
 * no height, no padding and default line height and came out far smaller than
 * intended. These are the real rules, and they run larger. */
.pv-hero {
    min-height: min(100vh, 940px);
    padding: clamp(5.5rem, 11vh, 9rem) clamp(1rem, 5vw, 4.5rem) clamp(3rem, 7vh, 5.5rem);
}

.pv-hero__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 5.5vw, 5rem);
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
}

.pv-hero__copy {
    display: flex;
    flex-direction: column;
    max-width: 560px;
}

/* Sora is wide, so the wordmark gets negative tracking and a tight leading. */
.pv-hero__title {
    font-size: clamp(2.6rem, 5.6vw, 4.4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.pv-hero__subtitle {
    font-size: clamp(1.25rem, 2.1vw, 1.75rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--pv-text);
    margin-top: 0.85rem;
}

.pv-hero__lead {
    font-size: clamp(1rem, 1.25vw, 1.15rem);
    line-height: 1.6;
    color: var(--pv-text-muted);
    margin-top: 1rem;
    max-width: 520px;
}

.pv-hero__badges {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* The badge anchors are inline by default, which ignores a height, and the
 * images carry tw-w-full; a type+class selector outranks that class. */
.pv-hero__badges a {
    display: inline-flex;
    height: 56px;
}

.pv-hero__badges img {
    height: 100%;
    width: auto;
}

@media (max-width: 1023px) {
    .pv-hero {
        min-height: 0;
        padding: 6rem 1rem 3rem;
    }
    .pv-hero__inner {
        flex-direction: column;
        text-align: center;
    }
    .pv-hero__copy {
        align-items: center;
        max-width: 100%;
    }
    .pv-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }
    .pv-hero__badges {
        justify-content: center;
    }
    .pv-hero__badges a {
        height: 48px;
    }
}


/* The phone stands beside the tablet, bottom edges aligned. An earlier
 * version tucked it in front with a negative margin; at the sizes the two
 * screenshots actually render, that put the phone across the tablet's
 * content instead of its corner, so they no longer overlap at all. */
.pv-hero-devices {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(12px, 2vw, 26px);
    width: 100%;
    /* Bounded so the pair cannot push into the hero's text column. */
    max-width: 700px;
    /* Headroom for the scroll tilt, which lifts the top edge. */
    padding-top: 34px;
}

.pv-hero-devices .pv-phone {
    --pv-phone-w: 176px;
}

.pv-hero-devices .pv-tablet {
    --pv-tablet-w: 498px;
}

@media (max-width: 1023px) {
    .pv-hero-devices {
        max-width: 440px;
        padding-top: 18px;
    }
    .pv-hero-devices .pv-phone {
        --pv-phone-w: 112px;
    }
    .pv-hero-devices .pv-tablet {
        --pv-tablet-w: 300px;
    }
}

@media (max-width: 480px) {
    /* Too little room for both; the tablet carries the hero on its own. */
    .pv-hero-devices .pv-phone {
        display: none;
    }
}
