/*
 * PlotWatch Standalone — Site-wide styles (Phase 9)
 * Design tokens copied verbatim from the real WordPress theme's
 * --pw-* custom properties (wp-content/themes/astra-child/style.css,
 * confirmed 2026-09-03) — same source checkout.css (Phase 8) already
 * uses, kept self-contained here rather than @import'd, matching that
 * file's own convention.
 */

:root {
    --pw-navy: #040926;
    --pw-navy-tint: #10193f;
    --pw-red: #ff040a;
    --pw-white: #ffffff;
    --pw-cream: #f7f4ef;
    --pw-grey-bg: #f5f6fa;
    --pw-grey-bg-alt: #eef1f8;
    --pw-grey-line: #e1e4ee;
    --pw-grey-text: #6b7280;
    --pw-grey-text-soft: #94a0b8;
    --pw-radius-sm: 8px;
    --pw-radius-md: 14px;
    --pw-radius-lg: 22px;
    --pw-shadow-sm: 0 2px 10px rgba(4,9,38,0.06);
    --pw-shadow-md: 0 14px 34px rgba(4,9,38,0.08);
    --pw-shadow-lg: 0 26px 64px rgba(4,9,38,0.16);
    --pw-container: 1200px;
    --pw-green: #1c8a4b;
    --pw-header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

body.pw-page {
    background: var(--pw-white);
    color: var(--pw-navy);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--pw-header-h);
}

h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 800; color: var(--pw-navy); margin: 0 0 10px; line-height: 1.2; }
p { line-height: 1.65; color: var(--pw-grey-text); margin: 0 0 12px; }
a { color: var(--pw-red); text-decoration: none; }
img { max-width: 100%; display: block; }

/* Accessibility: visible focus state everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--pw-red);
    outline-offset: 2px;
}
.pw-skip-hidden { position: absolute; left: -9999px; }

.pw-section-inner { max-width: var(--pw-container); margin: 0 auto; padding: 0 20px; }
.pw-section { padding: 64px 0; }
.pw-section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.pw-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pw-red); margin-bottom: 10px; }
.pw-section-head p { margin: 0; }

.pw-btn-primary, .pw-btn-secondary, .pw-link-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: var(--pw-radius-sm); font-weight: 700; font-size: 15px;
    border: none; cursor: pointer; text-decoration: none;
}
.pw-btn-primary { background: var(--pw-red); color: var(--pw-white); }
.pw-btn-primary:hover { filter: brightness(0.92); }
.pw-btn-secondary { background: var(--pw-white); color: var(--pw-navy); border: 1.5px solid var(--pw-grey-line); }
.pw-btn-secondary:hover { background: var(--pw-grey-bg); }
.pw-link-btn { background: none; padding: 0; color: var(--pw-red); font-weight: 600; border: none; }

/* ============================= HEADER ============================= */
.pw-site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--pw-header-h);
    background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--pw-grey-line);
}
.pw-site-header-inner {
    max-width: none; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
}
.pw-site-logo img { height: 26px; }
.pw-site-nav { display: flex; align-items: center; gap: 22px; }
.pw-site-nav a { color: var(--pw-navy); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pw-site-nav a.is-active, .pw-site-nav a:hover { color: var(--pw-red); }
.pw-site-nav-account { display: flex; align-items: center; gap: 14px; margin-left: 8px; }
.pw-nav-cta { background: var(--pw-red); color: var(--pw-white) !important; padding: 10px 18px; border-radius: var(--pw-radius-sm); }
.pw-nav-account { color: var(--pw-navy) !important; }
.pw-nav-logout-form { display: inline; }
.pw-nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.pw-nav-toggle span { width: 22px; height: 2px; background: var(--pw-navy); display: block; }

/* ============================= FOOTER ============================= */
.pw-site-footer { background: var(--pw-navy); color: var(--pw-white); padding: 56px 0 0; margin-top: 40px; }
.pw-site-footer-inner { max-width: var(--pw-container); margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.pw-footer-col h4 { color: var(--pw-white); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.pw-footer-col a { display: block; color: rgba(255,255,255,0.75); font-size: 14px; margin-bottom: 10px; }
.pw-footer-col a:hover { color: var(--pw-white); }
.pw-footer-brand p { color: rgba(255,255,255,0.65); font-size: 13px; margin-top: 12px; }
.pw-footer-address { color: rgba(255,255,255,0.65); font-size: 13px; }
.pw-site-footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding: 18px 20px; text-align: center; }
.pw-site-footer-bottom p { color: rgba(255,255,255,0.5); font-size: 12px; margin: 0; }

/* ============================= HERO ============================= */
.pw-hero { position: relative; height: 88vh; min-height: 480px; max-height: 780px; overflow: hidden; }
.pw-hero-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.pw-hero-scene.is-active { opacity: 1; }
.pw-hero-scene-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.pw-hero-scene-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,9,38,0.55) 0%, rgba(4,9,38,0.35) 45%, rgba(4,9,38,0.75) 100%); }
.pw-hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 20px; }
.pw-hero-inner h1 { color: var(--pw-white); font-size: clamp(30px, 5.2vw, 56px); max-width: 900px; margin-bottom: 24px; }
.pw-hero-accent { color: var(--pw-red); }
.pw-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pw-hero-progress { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.pw-hero-progress button { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; }
.pw-hero-progress button.is-active { background: var(--pw-red); width: 22px; border-radius: 5px; }

/* ============================= WHY / RISK GRID ============================= */
.pw-risk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pw-risk-card { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); padding: 22px; box-shadow: var(--pw-shadow-sm); position: relative; }
.pw-risk-number { position: absolute; top: 16px; right: 18px; font-size: 26px; font-weight: 800; color: var(--pw-grey-bg-alt); }
.pw-risk-card i { font-size: 22px; color: var(--pw-red); margin-bottom: 12px; display: block; }
.pw-risk-card h3 { font-size: 16px; margin-bottom: 6px; }
.pw-risk-card p { font-size: 13.5px; margin: 0; }

/* ============================= HOW IT WORKS ============================= */
.pw-step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pw-step-card { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); padding: 26px; box-shadow: var(--pw-shadow-sm); position: relative; }
.pw-step-number { position: absolute; top: 18px; right: 20px; font-size: 30px; font-weight: 800; color: var(--pw-grey-bg-alt); }
.pw-step-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--pw-navy); color: var(--pw-white); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.pw-step-card h3 { font-size: 17px; margin-bottom: 6px; }
.pw-step-card p { font-size: 14px; margin: 0; }

/* ============================= PACKAGES TEASER (Home) ============================= */
.pw-packages-teaser { background: var(--pw-grey-bg); }
.pw-packages-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.pw-packages-preview .pw-pkg-chip { background: var(--pw-white); border-radius: var(--pw-radius-md); padding: 18px; text-align: center; box-shadow: var(--pw-shadow-sm); }
.pw-packages-preview .pw-pkg-chip strong { display: block; font-size: 15px; margin-bottom: 4px; }
.pw-packages-preview .pw-pkg-chip span { font-size: 13px; color: var(--pw-grey-text-soft); }
.pw-loading-note { text-align: center; color: var(--pw-grey-text-soft); }
.pw-packages-teaser-cta { text-align: center; }

/* ============================= REVIEWS ============================= */
.pw-review-carousel { overflow: hidden; }
.pw-review-track { display: flex; gap: 20px; transition: transform 0.6s ease; }
.pw-review-card { flex: 0 0 calc(33.333% - 14px); background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); padding: 24px; box-shadow: var(--pw-shadow-sm); }
.pw-review-text { font-size: 14px; color: var(--pw-navy); min-height: 120px; }
.pw-review-meta { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; }
.pw-review-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pw-navy); color: var(--pw-white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.pw-review-name { font-weight: 700; font-size: 14px; }
.pw-review-product { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--pw-grey-text-soft); }
.pw-review-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.pw-review-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--pw-grey-line); cursor: pointer; padding: 0; }
.pw-review-dots button.is-active { background: var(--pw-red); }
.pw-review-more-link { text-align: center; margin-top: 16px; font-size: 14px; }

/* ============================= FINAL CTA ============================= */
.pw-final-cta { position: relative; padding: 80px 0; text-align: center; overflow: hidden; background: var(--pw-navy); }
.pw-final-cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.28; }
.pw-final-cta .pw-section-inner { position: relative; z-index: 1; }
.pw-final-cta h2 { color: var(--pw-white); font-size: clamp(26px, 4vw, 40px); }
.pw-final-cta-accent { color: var(--pw-red); }
.pw-final-cta p { color: rgba(255,255,255,0.75); max-width: 560px; margin: 0 auto 24px; }
.pw-final-cta-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.pw-final-cta .pw-btn-secondary { background: transparent; color: var(--pw-white); border-color: rgba(255,255,255,0.35); }

/* ============================= AUTH PAGES ============================= */
.pw-auth-page { max-width: 440px; margin: 60px auto 80px; padding: 0 20px; }
.pw-auth-card { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-lg); padding: 36px 30px; box-shadow: var(--pw-shadow-md); }
.pw-auth-card h1 { font-size: 22px; text-align: center; margin-bottom: 22px; }
.pw-auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.pw-auth-form input { font: inherit; padding: 11px 12px; border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-sm); background: var(--pw-grey-bg); }
.pw-auth-form input:focus { outline: none; border-color: var(--pw-red); background: var(--pw-white); }
.pw-auth-form button { width: 100%; margin-top: 6px; }
.pw-auth-error { background: #fdeaea; color: #b91c1c; padding: 10px 12px; border-radius: var(--pw-radius-sm); font-size: 13px; margin-bottom: 14px; }

/* ============================= PLAN FINDER / OTP ============================= */
.pw-planfinder { max-width: 520px; margin: 50px auto 80px; padding: 0 20px; }
.pw-planfinder-card { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-lg); padding: 34px 28px; box-shadow: var(--pw-shadow-md); }
.pw-planfinder-card h1 { font-size: 22px; }
.pw-planfinder-intro { font-size: 14px; }
.pw-planfinder-form .pw-checkout-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.pw-planfinder-form input, .pw-planfinder-form select, .pw-planfinder-form textarea {
    font: inherit; font-weight: 400; padding: 11px 12px; border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-sm); background: var(--pw-grey-bg);
}
.pw-planfinder-form input:focus, .pw-planfinder-form select:focus, .pw-planfinder-form textarea:focus { outline: none; border-color: var(--pw-red); background: var(--pw-white); }
.pw-planfinder-form button { width: 100%; }
.pw-checkout-required { color: var(--pw-red); }
.pw-checkout-status { padding: 10px 12px; border-radius: var(--pw-radius-sm); font-size: 13px; margin: 12px 0; }
.pw-checkout-status.is-error { background: #fdeaea; color: #b91c1c; }
.pw-checkout-status.is-success { background: #e7f6ed; color: var(--pw-green); }
.pw-checkout-status.is-info { background: var(--pw-grey-bg-alt); color: var(--pw-navy); }

/* ============================= CONTACT ============================= */
.pw-contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 44px; }
.pw-contact-card { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); padding: 22px; text-align: center; box-shadow: var(--pw-shadow-sm); }
.pw-contact-card i { font-size: 24px; color: var(--pw-red); margin-bottom: 10px; display: block; }
.pw-contact-card h3 { font-size: 15px; margin-bottom: 4px; }
.pw-contact-card p { font-size: 13px; margin-bottom: 12px; }
.pw-contact-form-wrap { max-width: 560px; margin: 0 auto 30px; background: var(--pw-grey-bg); border-radius: var(--pw-radius-lg); padding: 30px; }
.pw-contact-form-wrap h2 { font-size: 18px; }
.pw-checkout-field-full { grid-column: 1 / -1; }
.pw-contact-enquiry-cta { text-align: center; font-size: 14px; }

/* ============================= BLOG ============================= */
.pw-blog-empty { text-align: center; color: var(--pw-grey-text-soft); padding: 40px 0; }
.pw-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pw-blog-card { display: block; background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); overflow: hidden; box-shadow: var(--pw-shadow-sm); }
.pw-blog-card img, .pw-blog-card-noimage { width: 100%; height: 170px; object-fit: cover; background: var(--pw-grey-bg-alt); display: flex; align-items: center; justify-content: center; color: var(--pw-grey-text-soft); font-size: 26px; }
.pw-blog-card-body { padding: 18px; }
.pw-blog-category { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--pw-red); margin-bottom: 6px; }
.pw-blog-card h3 { font-size: 16px; color: var(--pw-navy); margin-bottom: 6px; }
.pw-blog-card p { font-size: 13px; margin-bottom: 10px; }
.pw-blog-card-date { font-size: 12px; color: var(--pw-grey-text-soft); }
.pw-blog-article-inner { max-width: 760px; margin: 0 auto; }
.pw-blog-article-image { width: 100%; border-radius: var(--pw-radius-md); margin-bottom: 20px; max-height: 420px; object-fit: cover; }
.pw-blog-article-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--pw-grey-text-soft); margin-bottom: 8px; }
.pw-blog-article-body { font-size: 15.5px; line-height: 1.75; color: var(--pw-navy); }
.pw-blog-article-body img { border-radius: var(--pw-radius-sm); margin: 16px 0; }

/* ============================= DASHBOARD ============================= */
.pw-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.pw-stat-card { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); padding: 20px; box-shadow: var(--pw-shadow-sm); text-align: center; }
.pw-stat-card i { font-size: 20px; color: var(--pw-red); margin-bottom: 8px; display: block; }
.pw-stat-value { display: block; font-size: 26px; font-weight: 800; color: var(--pw-navy); }
.pw-stat-label { font-size: 12.5px; color: var(--pw-grey-text-soft); }
.pw-dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pw-dashboard-panel { background: var(--pw-white); border: 1px solid var(--pw-grey-line); border-radius: var(--pw-radius-md); padding: 22px; box-shadow: var(--pw-shadow-sm); }
.pw-dashboard-panel h2 { font-size: 16px; margin-bottom: 14px; }
.pw-dashboard-empty { color: var(--pw-grey-text-soft); font-size: 13.5px; }
.pw-dashboard-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--pw-grey-bg-alt); font-size: 13.5px; }
.pw-dashboard-row:last-child { border-bottom: none; }
.pw-dashboard-row-sub { display: block; font-size: 12px; color: var(--pw-grey-text-soft); }
.pw-badge { background: var(--pw-grey-bg-alt); color: var(--pw-navy); font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* =====================================================================
 * Responsive — breakpoints per Phase 9 Step 18:
 * 320 / 360 / 375 / 390 / 414 / 768 / 1024 / 1280 / 1440+
 * ===================================================================== */
@media (max-width: 1024px) {
    .pw-risk-grid { grid-template-columns: repeat(2, 1fr); }
    .pw-step-grid { grid-template-columns: repeat(2, 1fr); }
    .pw-contact-grid { grid-template-columns: repeat(2, 1fr); }
    .pw-blog-grid { grid-template-columns: repeat(2, 1fr); }
    .pw-dashboard-grid { grid-template-columns: 1fr; }
    .pw-review-card { flex: 0 0 calc(50% - 10px); }
    .pw-site-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .pw-site-nav { position: fixed; top: var(--pw-header-h); left: 0; right: 0; bottom: 0; background: var(--pw-white);
        flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; overflow-y: auto;
        transform: translateX(100%); transition: transform 0.25s ease; }
    .pw-site-nav.is-open { transform: translateX(0); }
    .pw-site-nav a { font-size: 17px; }
    .pw-site-nav-account { flex-direction: column; align-items: flex-start; margin-left: 0; margin-top: 10px; width: 100%; }
    .pw-nav-toggle { display: flex; }
}

@media (max-width: 640px) {
    .pw-section { padding: 44px 0; }
    .pw-risk-grid, .pw-step-grid, .pw-contact-grid, .pw-blog-grid, .pw-stat-grid { grid-template-columns: 1fr; }
    .pw-review-card { flex: 0 0 100%; }
    .pw-hero { height: 82vh; }
    .pw-hero-ctas { flex-direction: column; width: 100%; }
    .pw-hero-ctas .pw-btn-primary, .pw-hero-ctas .pw-btn-secondary { width: 100%; }
    .pw-final-cta-ctas { flex-direction: column; }
    .pw-site-footer-inner { grid-template-columns: 1fr; }
    .pw-auth-card, .pw-planfinder-card { padding: 26px 20px; }
    .pw-contact-form-wrap { padding: 20px; }
}

@media (max-width: 360px) {
    h1 { font-size: 22px; }
    .pw-hero-inner h1 { font-size: 26px; }
}
