/* If It Happens — warm, editorial, community-minded */

/* ============================================================
   Design tokens
   ============================================================ */
:root {
    --brand-cream:    #FDFAF5;
    --brand-warm:     #FFF8EE;
    --brand-amber:    #C17817;
    --brand-amber-light: #F5E6CF;
    --brand-sage:     #5B8A5B;
    --brand-sage-light: #E8F0E8;
    --brand-charcoal: #2D2A24;
    --brand-stone:    #8C8478;
    --brand-border:   #E8E2D8;
    --brand-card:     #FFFCF7;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   Global overrides on Pico
   ============================================================ */
html[data-theme="light"] {
    --pico-background-color: var(--brand-cream);
    --pico-color: var(--brand-charcoal);
    --pico-muted-color: var(--brand-stone);
    --pico-primary: var(--brand-amber);
    --pico-primary-hover: #A8650F;
    --pico-primary-inverse: #fff;
    --pico-card-background-color: var(--brand-card);
    --pico-card-border-color: var(--brand-border);
    --pico-muted-border-color: var(--brand-border);
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--brand-charcoal);
    background: var(--brand-cream);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--brand-charcoal);
    line-height: 1.25;
}

a {
    color: var(--brand-amber);
}
a:hover {
    color: #A8650F;
}

/* ============================================================
   Site header
   ============================================================ */
.site-header {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--brand-border);
    margin-bottom: 2rem;
}

.site-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--brand-charcoal) !important;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.site-brand:hover {
    color: var(--brand-amber) !important;
}

.site-header nav ul:last-child a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--brand-stone);
    text-decoration: none;
}
.site-header nav ul:last-child a:hover {
    color: var(--brand-amber);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
    max-width: 680px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-sage);
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--brand-charcoal);
}

.hero-sub {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--brand-stone);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}
.hero-sub em {
    color: var(--brand-charcoal);
    font-style: italic;
}

/* ============================================================
   Postcode form
   ============================================================ */
.postcode-form {
    max-width: 480px;
    margin: 0 auto 3rem;
    text-align: center;
}
.postcode-form fieldset[role="group"] {
    max-width: 440px;
    margin: 0 auto 1rem;
}
.postcode-form input {
    font-family: var(--font-body);
    font-size: 1.05rem;
    background: #fff;
    border-color: var(--brand-border);
}
.postcode-form input:focus {
    border-color: var(--brand-amber);
}
.postcode-form button {
    font-family: var(--font-body);
    font-weight: 600;
    white-space: nowrap;
}
.postcode-form small {
    color: var(--brand-stone);
}

/* ============================================================
   Current situation banner
   ============================================================ */
.current-situation {
    background: var(--brand-warm);
    border: 1px solid var(--brand-amber-light);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.situation-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-amber);
    background: var(--brand-amber-light);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.current-situation h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.current-situation p {
    color: var(--brand-charcoal);
    line-height: 1.75;
    max-width: 640px;
}
.current-situation p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Feature cards
   ============================================================ */
.features {
    margin-bottom: 3rem;
}
.features h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--brand-card);
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(45, 42, 36, 0.08);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: var(--brand-sage);
    line-height: 1;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.feature-card p {
    font-size: 0.95rem;
    color: var(--brand-stone);
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================================
   Why section
   ============================================================ */
.why-section {
    margin-bottom: 3rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--brand-border);
    border-bottom: 1px solid var(--brand-border);
}
.why-section h2 {
    margin-bottom: 1.5rem;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.why-item p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--brand-charcoal);
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }
}

/* ============================================================
   Guide section
   ============================================================ */
.guide-section {
    margin-bottom: 2rem;
}
.guide-card {
    background: var(--brand-sage-light);
    border: 1px solid #C8DCC8;
    border-radius: 12px;
    padding: 2.5rem;
}
.guide-text h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}
.guide-text p {
    max-width: 560px;
    line-height: 1.7;
}
.guide-text a[role="button"] {
    display: inline-block;
    margin-top: 0.5rem;
}

/* ============================================================
   Report page — risk bands
   ============================================================ */
.risk-summary {
    border-radius: 12px;
    padding: 1.5rem;
}
.risk-summary header h2 {
    margin-bottom: 0.25rem;
}
.risk-lower      { --pico-card-background-color: var(--brand-sage-light); border-left: 5px solid var(--brand-sage); }
.risk-moderate   { --pico-card-background-color: #FFF3E0; border-left: 5px solid #FF9800; }
.risk-higher     { --pico-card-background-color: #FFF8E1; border-left: 5px solid #FFC107; }
.risk-significant { --pico-card-background-color: #FCE4EC; border-left: 5px solid #E91E63; }

.risk-score {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.risk-label {
    font-size: 1.1rem;
    vertical-align: middle;
}

/* ============================================================
   Report page — flood warning
   ============================================================ */
.flood-warning {
    --pico-card-background-color: #E3F2FD;
    border-left: 5px solid #2196F3;
    border-radius: 12px;
}

/* ============================================================
   Premium CTA
   ============================================================ */
.premium-cta article {
    --pico-card-background-color: var(--brand-warm);
    border: 2px solid var(--brand-amber);
    border-radius: 12px;
}

/* ============================================================
   Error / success messages
   ============================================================ */
.error-message {
    --pico-card-background-color: #FCE4EC;
    border-left: 5px solid #E91E63;
    border-radius: 12px;
}
.success-message {
    --pico-card-background-color: var(--brand-sage-light);
    border-left: 5px solid var(--brand-sage);
    border-radius: 12px;
}

/* ============================================================
   Share bar
   ============================================================ */
.share-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}
.share-bar a {
    font-size: 0.85rem;
}

/* ============================================================
   Tables
   ============================================================ */
table {
    font-size: 0.9em;
}

/* ============================================================
   Section spacing
   ============================================================ */
section {
    margin-bottom: 1.5rem;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--brand-border);
}
.footer-inner {
    max-width: 560px;
}
.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-charcoal);
    margin-bottom: 0.5rem;
}
.footer-inner > p {
    font-size: 0.85rem;
    color: var(--brand-stone);
    line-height: 1.6;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    font-size: 0.85rem;
    color: var(--brand-stone);
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--brand-amber);
}

/* ============================================================
   Wizard (plan)
   ============================================================ */
.wizard-progress {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.step-indicator {
    padding: 0.4rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    background: var(--brand-border);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.step-indicator.active {
    background: var(--brand-amber);
    color: #fff;
}
.step-indicator.completed {
    background: var(--brand-sage-light);
    color: var(--brand-sage);
}
.wizard-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}
.wizard-skip {
    margin-right: auto;
}

/* ============================================================
   Print
   ============================================================ */
@media print {
    nav, .premium-cta, .newsletter-signup, .share-bar, footer, .site-header { display: none; }
    body { font-size: 11pt; }
}
