/* UK Household Savings — Styles */

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    --ink: #1a1a1a;
    --graphite: #4a4a4a;
    --stone: #8a8a8a;
    --mist: #f5f5f0;
    --paper: #ffffff;
    --sage: #2d6a4f;
    --sage-light: #40916c;
    --sage-wash: #d8f3dc;
    --ember: #e07a5f;
    --rule: #e5e5e0;
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--mist);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    line-height: 1.2;
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

::selection {
    background-color: var(--sage-wash);
    color: var(--ink);
}

/* Focus states */
:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--rule);
}

::-webkit-scrollbar-thumb {
    background: var(--sage-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sage);
}

/* ===================================
   SECTION 1 — NAV
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav.scrolled {
    background-color: var(--paper);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: 'Fraunces', serif;
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--ink);
    border-left: 4px solid var(--sage);
    padding-left: 18px;
    transition: color 0.2s ease;
}

.nav-logo a:hover {
    color: var(--sage);
}

.nav-logo-img {
    height: 60px;
    width: auto;
    display: block;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    mix-blend-mode: multiply;
}

.nav-logo-text {
    display: inline-block;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--graphite);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--sage);
}

.nav-cta {
    background-color: var(--sage);
    color: var(--paper) !important;
    padding: 8px 20px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.nav-cta:hover {
    background-color: var(--sage-light);
}

.nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Mobile logo adjustments */
@media (max-width: 480px) {
    .nav-inner {
        padding: 20px 24px;
    }

    .nav-logo a {
        font-size: 1.2rem;
        gap: 12px;
        padding-left: 12px;
    }

    .nav-logo-img {
        height: 48px;
    }
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .nav-hamburger {
        display: none;
    }
}

/* Mobile menu open state */
.nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    padding: 20px 24px;
    border-bottom: 1px solid var(--rule);
    gap: 16px;
}

/* Nav active link state */
.nav-links a.active {
    color: var(--sage);
}

/* ===================================
   SECTION 2 — HERO
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mist);
    padding: 140px 24px 80px;
}

.hero-content {
    max-width: 680px;
    text-align: center;
}

.hero-eyebrow {
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--stone);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.hero-heading {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 24px;
}

.hero-subheading {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--graphite);
    line-height: 1.65;
    max-width: 540px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: inline-block;
    background-color: var(--sage);
    color: var(--paper);
    padding: 16px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
    background-color: var(--sage-light);
    transform: translateY(-1px);
}

.hero-caption {
    font-size: 0.8rem;
    color: var(--stone);
    margin-top: 16px;
    margin-bottom: 80px;
}

.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 32px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}

.hero-stat:last-child {
    border-bottom: none;
}

.hero-stat-highlight {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--sage);
}

.hero-stat-text {
    font-size: 0.9rem;
    color: var(--graphite);
}

@media (min-width: 768px) {
    .hero {
        padding-top: 200px;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: center;
        gap: 0;
    }

    .hero-stat {
        flex: 1;
        padding: 0 24px;
        border-bottom: none;
        border-right: 1px solid var(--rule);
    }

    .hero-stat:last-child {
        border-right: none;
    }
}

/* ===================================
   SECTION 3 — HOW IT WORKS
   =================================== */
.how-it-works {
    background-color: var(--paper);
    padding: 120px 24px;
}

.section-container {
    max-width: 960px;
    margin: 0 auto;
}

.section-container-narrow {
    max-width: 720px;
}

.section-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--sage);
    margin-bottom: 16px;
}

.section-heading {
    font-size: 2.2rem;
    color: var(--ink);
    margin-bottom: 48px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step-item {
    display: flex;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid var(--rule);
}

.step-item:last-child {
    border-bottom: none;
}

.step-number {
    font-family: 'Fraunces', serif;
    font-size: 3rem;
    font-weight: 600;
    color: var(--sage-wash);
    line-height: 1;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 8px;
}

.step-description {
    font-size: 0.95rem;
    color: var(--graphite);
    max-width: 520px;
}

@media (min-width: 768px) {
    .step-item {
        gap: 40px;
    }
}

/* ===================================
   SECTION 4 — WHAT WE COVER
   =================================== */
.what-we-cover {
    background-color: var(--mist);
    padding: 120px 24px;
}

.what-we-cover .section-container {
    max-width: 1100px;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-card {
    background-color: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 32px;
    transition: border-color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 8px 8px 0 0;
}

.service-card[data-service="energy"]::before {
    background-color: #2d6a4f;
}

.service-card[data-service="broadband"]::before {
    background-color: #457b9d;
}

.service-card[data-service="mobile"]::before {
    background-color: #e07a5f;
}

.service-card[data-service="insurance"]::before {
    background-color: #6c757d;
}

.service-card:hover {
    border-color: var(--sage);
    transform: translateY(-2px);
}

.service-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 12px;
}

.service-description {
    font-size: 0.9rem;
    color: var(--graphite);
    margin-bottom: 24px;
    line-height: 1.65;
}

.service-saving {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-amount {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--sage);
}

.service-label {
    font-size: 0.75rem;
    color: var(--stone);
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   SECTION 5 — CALCULATOR
   =================================== */
.calculator {
    background-color: var(--paper);
    padding: 120px 24px;
}

.section-subtext {
    font-size: 1rem;
    color: var(--graphite);
    margin-bottom: 48px;
    text-align: center;
}

.calc-wrapper {
    max-width: 640px;
    margin: 0 auto;
}

.calc-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: var(--rule);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.progress-bar.active,
.progress-bar.completed {
    background-color: var(--sage);
}

.calc-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-loading {
    font-style: italic;
    color: var(--stone);
    text-align: center;
}

/* Provider dropdown styling */
.calc-container select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23666' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
}

.calc-container select:hover {
    border-color: var(--sage);
}

.calc-container select:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

/* ===================================
   SECTION 6 — SOCIAL PROOF
   =================================== */
.social-proof {
    background-color: var(--mist);
    padding: 80px 24px;
    text-align: center;
}

.social-heading {
    font-size: 1.4rem;
    color: var(--ink);
    margin-bottom: 16px;
}

.social-text {
    font-size: 0.95rem;
    color: var(--graphite);
    margin-bottom: 24px;
    line-height: 1.65;
}

.social-link {
    color: var(--sage);
    font-weight: 500;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--sage-light);
}

/* ===================================
   SECTION 7 — FAQ
   =================================== */
.faq {
    background-color: var(--paper);
    padding: 120px 24px;
}

.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid var(--rule);
}

.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    cursor: pointer;
    transition: color 0.2s ease;
}

.faq-q:hover {
    color: var(--sage);
}

.faq-icon {
    color: var(--sage);
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-a {
    max-height: 500px;
}

.faq-a p {
    color: var(--graphite);
    padding-bottom: 20px;
    line-height: 1.65;
}

/* ===================================
   SECTION 8 — FINAL CTA
   =================================== */
.final-cta {
    background-color: var(--sage);
    padding: 100px 24px;
    text-align: center;
}

.final-cta-heading {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: var(--paper);
    margin-bottom: 16px;
}

.final-cta-subtext {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

.final-cta-button {
    display: inline-block;
    background-color: var(--paper);
    color: var(--sage);
    padding: 16px 36px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.final-cta-button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===================================
   SECTION 9 — FOOTER
   =================================== */
.footer {
    background-color: var(--ink);
    padding: 40px 24px;
    color: var(--stone);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 0.85rem;
}

.footer-left p {
    margin: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-right a {
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: var(--paper);
}

.footer-divider {
    opacity: 0.5;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
