/* ============================================================
   PrinterGuide 365 — Stylesheet
   Aesthetic: editorial, professional, calm. Deep ink-blue with
   a warm coral accent. Uses HP Simplified (or Open Sans fallback).
   ============================================================ */

/* ---------- HP Simplified (optional, drop files into assets/fonts/) ----
   These @font-face rules will silently do nothing if the files don't
   exist — the browser will quietly use Open Sans instead.
   Expected files in /assets/fonts/:
     HPSimplified-Light.woff2
     HPSimplified-Regular.woff2
     HPSimplified-Bold.woff2
   ---------------------------------------------------------------- */
@font-face {
    font-family: 'HP Simplified';
    src: url('../fonts/HPSimplified-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'HP Simplified';
    src: url('../fonts/HPSimplified-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'HP Simplified';
    src: url('../fonts/HPSimplified-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
    --c-bg:        #eef3fb;
    --c-surface:   #ffffff;
    --c-ink:       #0b2545;
    --c-ink-soft:  #2c4068;
    --c-muted:     #6b7a90;
    --c-border:    #d8e1ee;
    --c-accent:    #024ad8;
    --c-accent-d:  #0238a8;
    --c-accent-l:  #6e9dff;
    --c-success:   #2f9c6e;
    --c-warning-bg:#e8efff;
    --c-warning-bd:#aec3ed;

    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06);
    --shadow-md: 0 8px 24px -8px rgba(11, 37, 69, 0.18);
    --shadow-lg: 0 24px 48px -16px rgba(11, 37, 69, 0.22);

    /* HP Simplified — used if you drop legitimate font files into /assets/fonts/.
       Falls back to Open Sans, which is the closest free, open-licensed
       humanist sans-serif. */
    --f-base: 'HP Simplified', 'Open Sans', -apple-system, BlinkMacSystemFont,
              'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --max-w: 1140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--f-base);
    font-size: 17px;
    line-height: 1.65;
    color: var(--c-ink);
    background: var(--c-bg);
    background-image:
        radial-gradient(at 8% 0%, rgba(2, 74, 216, 0.06) 0, transparent 40%),
        radial-gradient(at 92% 0%, rgba(11, 37, 69, 0.06) 0, transparent 45%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--c-accent-d); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-ink); }
ul, ol { padding-left: 1.25rem; }
h1, h2, h3, h4 {
    font-family: var(--f-base);
    font-weight: 700;
    color: var(--c-ink);
    line-height: 1.2;
    margin: 0 0 .6em;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.005em; }
h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--c-muted); }

p { margin: 0 0 1em; }
strong { color: var(--c-ink); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.muted { color: var(--c-muted); }

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute; top: -40px; left: 1rem;
    background: var(--c-ink); color: #fff;
    padding: .5rem .9rem; border-radius: var(--r-sm);
    z-index: 100; transition: top .2s;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(246, 243, 238, 0.85);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--c-border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 1rem; padding-bottom: 1rem; gap: 1rem;
}

/* Brand */
.brand {
    display: inline-flex; align-items: center;
    text-decoration: none; color: var(--c-ink);
    line-height: 0;
}
.brand-logo {
    height: 28px;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
}
.brand-logo--footer {
    height: 32px;
}
@media (max-width: 540px) {
    .brand-logo { height: 24px; }
    .brand-logo--footer { height: 28px; }
}

/* Nav */
.primary-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: .25rem;
}
.primary-nav a {
    display: inline-block; padding: .55rem .9rem;
    font-size: .95rem; font-weight: 500;
    color: var(--c-ink-soft); border-radius: 8px;
    transition: background .2s, color .2s;
}
.primary-nav a:hover { background: rgba(11,37,69,.06); color: var(--c-ink); }
.primary-nav a.is-active {
    color: var(--c-ink);
    background: var(--c-surface);
    box-shadow: var(--shadow-sm);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    background: none; border: 1px solid var(--c-border);
    padding: .55rem; border-radius: 8px;
    cursor: pointer;
    flex-direction: column; gap: 4px;
}
.nav-toggle span {
    width: 22px; height: 2px; background: var(--c-ink); border-radius: 2px;
}

@media (max-width: 820px) {
    .nav-toggle { display: flex; }
    .primary-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--c-surface);
        border-bottom: 1px solid var(--c-border);
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
    }
    .primary-nav.is-open { max-height: 400px; }
    .primary-nav ul { flex-direction: column; padding: .75rem 1.5rem 1rem; gap: 0; }
    .primary-nav a { padding: .8rem 0; border-bottom: 1px solid var(--c-border); border-radius: 0; }
    .primary-nav li:last-child a { border-bottom: 0; }
}

/* ---------- Main ---------- */
.site-main { padding: 4rem 0 5rem; }
@media (max-width: 600px) { .site-main { padding: 2.5rem 0 3.5rem; } }

/* ---------- Hero ---------- */
.hero {
    text-align: left;
    padding: 2.5rem 0 3.5rem;
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 3.5rem;
}
.hero .eyebrow {
    display: inline-block;
    font-size: .78rem; font-weight: 600;
    letter-spacing: .15em; text-transform: uppercase;
    color: var(--c-accent-d);
    background: rgba(2,74,216,.1);
    padding: .35rem .75rem; border-radius: 999px;
    margin-bottom: 1.25rem;
}
.hero h1 {
    max-width: 22ch;
    margin-bottom: 1rem;
}
.hero h1 em {
    font-style: italic; font-weight: 400;
    color: var(--c-accent-d);
}
.hero .lede {
    font-size: 1.15rem; max-width: 60ch;
    color: var(--c-ink-soft);
}
.hero-meta {
    display: flex; flex-wrap: wrap; gap: 1.5rem;
    margin-top: 2rem;
    font-size: .9rem; color: var(--c-muted);
}
.hero-meta span::before { content: "•"; margin-right: .5rem; color: var(--c-accent); }
.hero-meta span:first-child::before { content: ""; margin-right: 0; }

/* Inner page hero */
.page-hero {
    padding: 1.5rem 0 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--c-border);
}
.page-hero .eyebrow {
    display: inline-block;
    font-size: .78rem; font-weight: 600;
    letter-spacing: .15em; text-transform: uppercase;
    color: var(--c-muted); margin-bottom: .75rem;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .5rem; }
.page-hero p { color: var(--c-ink-soft); font-size: 1.1rem; max-width: 60ch; }

/* ---------- Layout: article + sidebar ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
}
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- Article / steps ---------- */
.article h2 { margin-top: 2.5rem; }
.article h2:first-child { margin-top: 0; }
.article p, .article li { color: var(--c-ink-soft); }
.article a { font-weight: 600; border-bottom: 1px solid currentColor; }

.steps {
    list-style: none; padding: 0; margin: 2rem 0 0;
    display: grid; gap: 1.25rem;
    counter-reset: step;
}
.step {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 1.5rem 1.5rem 1.25rem 4.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform .25s, box-shadow .25s;
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute; top: 1.5rem; left: 1.5rem;
    width: 2.25rem; height: 2.25rem;
    display: grid; place-items: center;
    background: var(--c-ink); color: var(--c-accent-l);
    font-family: var(--f-base); font-weight: 700;
    font-size: 1rem; border-radius: 8px;
}
.step h3 {
    font-family: var(--f-base); font-size: 1.4rem;
    font-weight: 600; margin-bottom: .5rem;
    letter-spacing: -0.01em;
}
.step ul { margin: .5rem 0 0; padding-left: 1.1rem; }
.step ul li { margin-bottom: .35rem; }
.step ul li::marker { color: var(--c-accent); }

/* Tip / callout */
.callout {
    border-left: 3px solid var(--c-accent);
    background: var(--c-warning-bg);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    padding: 1.25rem 1.5rem;
    margin: 2.5rem 0;
}
.callout h3 {
    font-family: var(--f-base); font-size: 1rem;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--c-accent-d); margin-bottom: .5rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout ul { margin: .5rem 0 0; }
.callout ul li { margin-bottom: .35rem; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.side-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.side-card h3 {
    font-family: var(--f-base); font-size: .8rem;
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--c-muted); margin-bottom: 1rem;
}
.side-card ul { padding: 0; list-style: none; margin: 0; }
.side-card ul li {
    padding: .55rem 0; border-bottom: 1px dashed var(--c-border);
    font-size: .95rem;
}
.side-card ul li:last-child { border-bottom: 0; }
.side-card ul li a { color: var(--c-ink); font-weight: 500; }
.side-card ul li a:hover { color: var(--c-accent-d); }

.side-card.dark {
    background: var(--c-ink); border-color: var(--c-ink);
    color: #d8e0ec;
}
.side-card.dark h3 { color: var(--c-accent-l); }
.side-card.dark p { color: #b8c2d3; font-size: .95rem; }

/* ---------- Generic content sections (legal pages) ---------- */
.prose {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    max-width: 820px;
}
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; font-size: 1.1rem; }
.prose p, .prose li { color: var(--c-ink-soft); }
.prose ul li { margin-bottom: .35rem; }
.prose hr {
    border: none; border-top: 1px solid var(--c-border);
    margin: 2rem 0;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 980px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info {
    background: var(--c-ink); color: #d8e0ec;
    border-radius: var(--r-md);
    padding: 2.25rem;
    position: relative; overflow: hidden;
}
.contact-info::before {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 180px; height: 180px; border-radius: 50%;
    background: radial-gradient(circle, rgba(110, 157, 255, 0.3), transparent 70%);
}
.contact-info h2 { color: #fff; }
.contact-info dl { margin: 1.5rem 0 0; }
.contact-info dt {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--c-accent-l); margin-top: 1.25rem;
}
.contact-info dd { margin: .25rem 0 0; font-size: 1rem; color: #e6ecf5; }
.contact-info a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.3); }

/* Form */
.contact-form {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 1.1rem; }
.field label {
    display: block; font-size: .85rem; font-weight: 600;
    margin-bottom: .35rem; color: var(--c-ink);
}
.field label .req { color: var(--c-accent); margin-left: 2px; }
.field input, .field textarea {
    width: 100%; padding: .75rem .9rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    font-family: inherit; font-size: 1rem; color: var(--c-ink);
    transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--c-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(2,74,216,.18);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
    border-color: #c44;
    background: #fdecec;
}
.field textarea { min-height: 130px; resize: vertical; }

.field-error {
    display: block;
    color: #983131;
    font-size: .82rem;
    margin-top: .35rem;
    font-weight: 500;
}

/* Two columns side by side on wide screens */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 540px) {
    .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* Honeypot — visually hidden but reachable to bots */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.hp-field input,
.hp-field label { display: none !important; }

.form-note {
    color: var(--c-muted);
    font-size: .85rem;
    margin: 1rem 0 0;
}

.btn {
    display: inline-block; cursor: pointer;
    background: var(--c-ink); color: #fff;
    border: none;
    padding: .85rem 1.6rem;
    font-family: inherit; font-size: .95rem; font-weight: 600;
    border-radius: var(--r-sm);
    transition: background .2s, transform .1s;
}
.btn:hover { background: var(--c-accent-d); color: #fff; }
.btn:active { transform: translateY(1px); }

.alert {
    padding: .85rem 1rem; border-radius: var(--r-sm);
    margin-bottom: 1.25rem; font-size: .95rem;
    border: 1px solid;
}
.alert.success { background: #ecf8f2; color: #1f6b4d; border-color: #b9e0ce; }
.alert.error   { background: #fdecec; color: #983131; border-color: #f1b9b9; }

/* ---------- Cards on About page ---------- */
.value-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; margin-top: 2rem;
}
@media (max-width: 780px) { .value-grid { grid-template-columns: 1fr; } }
.value-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.value-card .value-num {
    font-family: var(--f-base); font-size: 1.6rem;
    color: var(--c-accent); font-weight: 600;
    line-height: 1; margin-bottom: .75rem;
}
.value-card h3 {
    font-family: var(--f-base); font-size: 1.2rem;
    font-weight: 600; margin-bottom: .35rem;
}
.value-card p { font-size: .95rem; margin: 0; color: var(--c-ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--c-ink); color: #b8c2d3;
    padding: 4rem 0 2rem;
}
.site-footer .footer-brand .brand { margin-bottom: 1rem; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col h4 { color: #fff; margin-bottom: 1rem; }
.footer-text { font-size: .92rem; line-height: 1.6; max-width: 38ch; margin-top: 1rem; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; font-size: .92rem; }
.footer-links a { color: #b8c2d3; }
.footer-links a:hover { color: var(--c-accent-l); }
.footer-links .muted { color: #8a93a5; }

/* ---------- Sticky disclaimer band (floats over footer) ----------
   Pinned to the bottom of the viewport at all times, full width.
   Body has bottom padding to keep page content above it.        */
body { padding-bottom: 88px; }
@media (max-width: 600px) { body { padding-bottom: 110px; } }

.disclaimer-band {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: var(--c-surface);
    border-top: 3px solid var(--c-accent);
    padding: .75rem 1.5rem;
    box-shadow: 0 -8px 24px -8px rgba(11, 37, 69, 0.18);
}
.disclaimer-inner {
    display: flex;
    align-items: center;
    gap: .85rem;
    width: 100%;
    margin: 0;
}
.disclaimer-icon {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--c-accent);
    color: #fff;
    display: inline-grid; place-items: center;
    font-family: var(--f-base);
    font-weight: 700; font-size: .85rem; font-style: italic;
    box-shadow: 0 2px 6px -2px rgba(2, 74, 216, 0.4);
}
.disclaimer-text {
    margin: 0;
    flex: 1;
    font-size: .88rem;
    line-height: 1.5;
    color: var(--c-ink-soft);
}
.disclaimer-text strong {
    color: var(--c-ink);
    margin-right: .25rem;
}
@media (max-width: 600px) {
    .disclaimer-band { padding: .65rem .9rem; }
    .disclaimer-inner { align-items: flex-start; gap: .65rem; }
    .disclaimer-icon  { width: 24px; height: 24px; font-size: .75rem; margin-top: 4px; }
    .disclaimer-text  { font-size: .82rem; line-height: 1.4; }
}

.footer-bottom {
    margin-top: 1.5rem;
    display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem;
    font-size: .85rem; color: #8a93a5;
}

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
    .hero h1, .hero .lede, .hero-meta, .step, .value-card, .prose, .contact-info, .contact-form {
        animation: rise .6s ease-out both;
    }
    .hero .lede     { animation-delay: .08s; }
    .hero-meta      { animation-delay: .16s; }
    .step:nth-child(1) { animation-delay: .05s; }
    .step:nth-child(2) { animation-delay: .12s; }
    .step:nth-child(3) { animation-delay: .19s; }
    .step:nth-child(4) { animation-delay: .26s; }
    .value-card:nth-child(2) { animation-delay: .1s; }
    .value-card:nth-child(3) { animation-delay: .2s; }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Selection ---------- */
::selection { background: var(--c-accent); color: #fff; }
