/* =============================================================================
   JustPrices.org -- Just Prices, LLC
   Three static pages. No framework and no build step: this file plus
   js/justprices.js are the whole front end, so the site can be dropped into an
   IIS folder and served as static content.
   ============================================================================= */
:root {
    --jp-bg: #F5F7FA;
    --jp-bg-alt: #E9EFF6;
    --jp-surface: #FFFFFF;
    --jp-surface-2: #EFF3F9;
    --jp-text: #1F2A38;
    --jp-text-muted: #58687A;
    --jp-border: #D4DDE7;
    --jp-border-strong: #AFBECD;

    --jp-navy: #002B52;
    --jp-blue: #0060A8;
    --jp-blue-strong: #004E8C;
    --jp-blue-soft: #E1EDF8;

    --jp-teal: #1E8A94;
    --jp-teal-soft: #DCEFF1;
    --jp-teal-deep: #10646D;

    --jp-amber: #D2901E;
    --jp-amber-soft: #FAEDD4;
    --jp-amber-deep: #8A5E12;
    --jp-amber-light: #E8B65C;

    /* Chip text is small and bold on a tinted fill, so these run deeper than the
       logo colours they come from -- the lighter ones fail 4.5:1 at 0.74rem. */
    --jp-public: #1F5C8C;
    --jp-public-soft: #E3EEF8;
    --jp-user: var(--jp-teal-deep);
    --jp-retailer: var(--jp-amber-deep);
    --jp-retailer-soft: var(--jp-amber-soft);

    --jp-on-dark: #EEF3F8;

    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Karla', 'Segoe UI', system-ui, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(0, 26, 60, 0.07), 0 1px 1px rgba(0, 26, 60, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 26, 60, 0.12), 0 2px 6px rgba(0, 26, 60, 0.07);

    --container: 1160px;
    --gutter: clamp(16px, 4vw, 32px);
    --section-y: clamp(48px, 8vw, 96px);
    --header-h: 68px;
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Anchored sections have to clear the sticky header. */
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    background: var(--jp-bg);
    color: var(--jp-text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0.005em;
    color: var(--jp-navy);
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--jp-blue-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--jp-navy); }

:focus-visible {
    outline: 3px solid var(--jp-navy);
    outline-offset: 2px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--jp-navy); color: #fff;
    padding: 10px 16px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    text-decoration: none; font-weight: 700;
    transition: top 120ms ease-in;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------- primitives */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.container.narrow { max-width: 780px; }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--jp-text); max-width: 46ch; }
.muted { color: var(--jp-text-muted); }
.stack-top { margin-top: 38px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 11px 22px;
    border: 1.5px solid transparent; border-radius: 999px;
    font-family: var(--font-body); font-size: 1rem; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--jp-blue); color: #fff; border-color: var(--jp-blue); }
.btn-primary:hover { background: var(--jp-blue-strong); border-color: var(--jp-blue-strong); color: #fff; }
.btn-secondary { background: transparent; color: var(--jp-navy); border-color: var(--jp-navy); }
.btn-secondary:hover { background: var(--jp-blue-soft); color: var(--jp-navy); }
.btn-light { background: #fff; color: var(--jp-navy); border-color: #fff; }
.btn-light:hover { background: var(--jp-blue-soft); color: var(--jp-navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* ----------------------------------------------------------------- header */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(245, 247, 250, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--jp-border);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
/* The logo is a single lockup (emblem + wordmark), so the brand link is one
   image: height is what we set, width follows the 605x160 intrinsic ratio. */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: auto; height: 40px; }
@media (max-width: 420px) { .brand img { height: 34px; } }

.primary-nav { display: none; margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.primary-nav a {
    display: inline-block; padding: 10px 12px; border-radius: 8px;
    color: var(--jp-text); text-decoration: none; font-weight: 600; font-size: 0.97rem;
}
.primary-nav a:hover { background: var(--jp-blue-soft); color: var(--jp-navy); }
.primary-nav a[aria-current="page"] { color: var(--jp-navy); box-shadow: inset 0 -3px 0 var(--jp-amber); border-radius: 8px 8px 0 0; }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto;
    width: 44px; height: 44px; padding: 0;
    background: transparent; border: 1.5px solid var(--jp-border-strong); border-radius: 10px;
    color: var(--jp-navy); cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.mobile-menu {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(0, 26, 60, 0.50);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
    background: var(--jp-bg); padding: 18px var(--gutter) 28px;
    display: flex; flex-direction: column; gap: 22px;
    box-shadow: var(--shadow-md);
    animation: slide-in 160ms ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu-top .brand img { height: 34px; }
.menu-close {
    width: 44px; height: 44px; font-size: 1.7rem; line-height: 1;
    background: transparent; border: 0; color: var(--jp-navy); cursor: pointer;
}
.mobile-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mobile-nav-list a {
    display: block; padding: 14px 8px; border-bottom: 1px solid var(--jp-border);
    color: var(--jp-text); text-decoration: none; font-weight: 600; font-size: 1.05rem;
}

@media (min-width: 940px) {
    .primary-nav { display: block; }
    .nav-toggle { display: none; }
}

/* ------------------------------------------------------------------- hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 5vw, 56px); position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(90% 120% at 85% 0%, var(--jp-blue-soft) 0%, rgba(225, 237, 248, 0) 62%);
    pointer-events: none;
}
.hero-inner { position: relative; display: grid; gap: 40px; align-items: center; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual-panel { display: block; width: 100%; max-width: 440px; margin-inline: auto; }

/* sample price panel in the hero: the product's output, in miniature */
.price-panel {
    margin: 0; background: var(--jp-surface); border: 1px solid var(--jp-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden;
}
.price-panel-head {
    padding: 15px 20px; background: var(--jp-surface-2); border-bottom: 1px solid var(--jp-border);
}
.price-panel-title {
    margin: 0; font-family: var(--font-display); font-size: 1.15rem;
    font-weight: 600; color: var(--jp-navy);
}
.price-rows { list-style: none; margin: 0; padding: 0; }
.price-row { padding: 14px 20px; border-bottom: 1px solid var(--jp-border); }
.price-row:last-child { border-bottom: 0; }
.price-row-main { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.price-row-product { margin: 0; font-weight: 600; }
.price-row-size { font-weight: 400; color: var(--jp-text-muted); }
.price-row-value {
    margin: 0; font-family: var(--font-display); font-size: 1.5rem;
    font-weight: 700; color: var(--jp-navy); white-space: nowrap;
}
.price-row-unit { font-size: 0.8rem; font-weight: 600; color: var(--jp-text-muted); }
.price-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 9px; }
.price-row-date { font-size: 0.85rem; color: var(--jp-text-muted); }

@media (min-width: 940px) {
    .hero-inner:has(.hero-visual) { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
}

/* --------------------------------------------------------------- sections */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--jp-bg-alt); }
.section-navy { background: var(--jp-navy); color: var(--jp-on-dark); }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a:not(.btn) { color: var(--jp-amber-light); }
.section-head { max-width: 820px; margin-bottom: clamp(24px, 4vw, 40px); }
.section-intro { color: var(--jp-text-muted); }

.pull-question {
    margin: 28px 0; padding: 18px 24px;
    border-left: 4px solid var(--jp-amber);
    background: var(--jp-surface-2); border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.pull-question p { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; color: var(--jp-navy); line-height: 1.2; }

/* ------------------------------------------------------------- card grids */
.cards { display: grid; gap: 20px; }
@media (min-width: 720px) {
    .cards-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background: var(--jp-surface); border: 1px solid var(--jp-border);
    border-radius: var(--radius-lg); padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin: 14px 0 8px; }
.card p { color: var(--jp-text-muted); }

/* Square, unlike every other pill on the site. A price label is not a button
   and it stopped reading like data once it had the same shape as one. */
.source-chip {
    display: inline-block; font-size: 0.74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 4px 10px; border-radius: 3px;
}
.source-chip-public { background: var(--jp-public-soft); color: var(--jp-public); }
.source-chip-retailer { background: var(--jp-retailer-soft); color: var(--jp-retailer); }
.source-chip-user { border: 1px solid var(--jp-teal); color: var(--jp-user); padding: 3px 9px; }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feature-list li { position: relative; padding-left: 32px; }
.feature-list li::before {
    content: ""; position: absolute; left: 0; top: 0.42em;
    width: 18px; height: 10px;
    border-left: 3px solid var(--jp-teal); border-bottom: 3px solid var(--jp-teal);
    transform: rotate(-45deg);
}

/* --------------------------------------------------------- split / product */
.split { display: grid; gap: 32px; align-items: center; }
/* for splits whose two columns are very different heights, so the short one doesn't float */
.split-top { align-items: start; }
@media (min-width: 940px) { .split { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }

.product-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-lg); padding: 28px 26px;
}
.product-card p { color: rgba(238, 243, 248, 0.88); }
.product-name { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #fff; margin: 0 0 2px; line-height: 1.05; }
.product-tagline { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.9rem; color: var(--jp-amber-light); margin: 0 0 14px; }
.product-facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.product-facts li { color: rgba(238, 243, 248, 0.9); }
.product-facts strong { color: #fff; }

/* ---------------------------------------------------------------- contact */
.contact-cards { display: grid; gap: 18px; margin-top: 26px; }
@media (min-width: 720px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
.contact-card {
    background: var(--jp-surface); border: 1px solid var(--jp-border);
    border-radius: var(--radius-md); padding: 22px 24px;
}
.contact-card-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--jp-navy); margin: 0 0 6px; }
.contact-card p { color: var(--jp-text-muted); }
.contact-email {
    display: inline-block; margin-top: 12px;
    font-weight: 700; font-size: 1.05rem; word-break: break-word;
}

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--jp-bg-alt); border-top: 1px solid var(--jp-border); padding: clamp(36px, 6vw, 64px) 0 32px; font-size: 0.95rem; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.footer-top .brand img { height: 38px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--jp-text); text-decoration: none; }
.footer-links a:hover { color: var(--jp-navy); text-decoration: underline; }
.footer-disclaimer { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--jp-border); color: var(--jp-text-muted); font-size: 0.88rem; max-width: 92ch; }
.footer-copyright { color: var(--jp-text-muted); font-size: 0.88rem; margin-top: 12px; }

/* Added when the one page became three. */
.page-head { padding-bottom: 0; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); }

.method h3, .commitments h3 { margin-top: 34px; }
.method h3:first-child, .commitments h3:first-child { margin-top: 24px; }
.method p, .commitments p { color: var(--jp-text-muted); max-width: 68ch; }

.qa h3 { margin-top: 30px; font-size: 1.15rem; color: #1F2A38; }
.qa h3:first-child { margin-top: 20px; }
.qa p { color: var(--jp-text-muted); max-width: 70ch; }
