/* ==========================================================================
   Local Font Declarations (Only necessary weights: Regular 400 & SemiBold 600)
   ========================================================================== */

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Design System & Font Rules Configuration
   Based on BYD Service Plan Specification
   ========================================================================== */

:root {
    /* Brand & Section Colors */
    --color-dark: #252728;
    --color-white: #ffffff;
    --color-gray-box: #efefef;
    --color-border: rgba(37, 39, 40, 0.1);

    /* Typography Settings */
    --font-family-primary: 'Montserrat', 'Bai Jamjuree', 'Source Han Sans', 'Source Han Sans JP', 'Source Han Sans KR', 'Noto Sans CJK JP', 'Noto Sans CJK KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Specification Font Sizes */
    --font-size-header-on-image: 42pt;       /* Header on header image: Montserrat SemiBold, ffffff, 42pt */
    --font-size-subheader-on-image: 18pt;    /* Subheader on header image: Montserrat SemiBold, ffffff, 18pt */
    --font-size-section-header: 30pt;        /* Section headers (Why choose BYD, How it works, Frequently): 30pt */
    --font-size-box-title: 15pt;             /* Title in grey boxes: 15pt */
    --font-size-faq-question: 12pt;          /* Questions: 12pt */
    --font-size-body-text: 10.5pt;           /* Text in grey boxes, Text 1,2,3,4,5, Answers: 10.5pt */

    /* Layout Constraints */
    --container-max-width: 1440px;
    --container-padding: 0 26px;
}

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-primary);
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

h1 {
    letter-spacing: -0.025em;
}

a{
    color: #1566d8;
}


/* Container */
.container,
.w-1440 {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding-left: 26px;
    padding-right: 26px;
}

/* ==========================================================================
   Navbar Section
   ========================================================================== */

.site-navbar {
    background-color: #252728f2;
    padding: 21px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-logo {
    height: 22px;
    width: auto;
    object-fit: contain;
}

/* ==========================================================================
   Header / Hero Section
   ========================================================================== */

.hero-header {
    position: relative;
    background-image: url('./images/hero-image.jpg');
    background-position: center left;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 95vh;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 2;
    padding-top: clamp(110px, 18vh, 180px);
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

/* Header on header image: Montserrat SemiBold, ffffff, 42pt */
.hero-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: var(--color-white);
    font-size: var(--font-size-header-on-image);
    line-height: 1.15;
    margin-bottom: 22px;
}

/* Subheader on header image: Montserrat, ffffff, 18pt */
.hero-subheader {
    font-family: var(--font-family-primary);
    font-weight: 400;
    color: var(--color-white);
    font-size: var(--font-size-subheader-on-image);
    line-height: 1.45;
    max-width: 430px;
}

/* ==========================================================================
   Find Retailer Card (Glassmorphism)
   ========================================================================== */

.find-retailer-card {
background: #ffffff1a;
    border: 1px solid rgba(153, 153, 153, 0.5);
    box-shadow: 0 4px 4px #00000040;
    backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 20px 22px;
    max-width:522px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}

.retailer-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}


.retailer-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.retailer-card-title {
font-family: var(--font-family-primary);
    font-weight: 600; 
    color: #ffffff;
    font-size: var(--font-size-box-title);
    line-height: 1.35;
    margin-bottom: 0px;
}

.retailer-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.retailer-card-desc {
    font-family: var(--font-family-primary);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.retailer-card-btn {
    border-radius: 50%;
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}


/* ==========================================================================
   Features Section ("Why choose a BYD Service Plan?")
   ========================================================================== */

.features-section {
    background-color: #ffffff;
    padding: 96px 0;
}

/* Header - Why choose BYD.....: Montserrat SemiBold, 252728, 30pt */
.section-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: #252728;
    font-size: var(--font-size-section-header);
    line-height: 1.25;
    text-align: center;
    margin-bottom: 56px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 52px;
    width: 100%;
    margin: 0 auto;
}

/* Grey Boxes: efefef */
.feature-card {
    background-color: #efefef;
    border-radius: 32px;
    padding: 38px 24px;
    display: flex;
    flex-direction: column;
}

/* Title in grey boxes: Montserrat SemiBold, 252728, 15pt */
.feature-card-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: #252728;
    font-size: var(--font-size-box-title);
    line-height: 1.35;
    margin-bottom: 16px;
}

/* Text in Grey boxes: Montserrat Regular, 252728, 10.5pt */
.feature-card-text {
    font-family: var(--font-family-primary);
    font-weight: 400;
    color: #252728;
    font-size: var(--font-size-body-text);
    line-height: 1.55;
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */

.how-it-works-section {
    background-color: #ffffff;
    padding: 80px 0 100px;
}

.how-it-works-container {
    display: grid;
    grid-template-columns: 46% 54%;
    gap: 56px;
    align-items: center;
}

.how-it-works-content {
    max-width: 520px;
}

/* Header -How it works: Monserrat SemiBold, 252728, 30pt */
.how-it-works-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: #252728;
    font-size: var(--font-size-section-header);
    line-height: 1.25;
    margin-bottom: 56px;
}

.how-it-works-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.how-it-works-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Text - 1,2,3,4,5: Monserrat Regular, 252728, 10.5pt */
.step-number {
    font-family: var(--font-family-primary);
    font-weight: 400;
    color: #252728;
    font-size: var(--font-size-body-text);
    line-height: 1.6;
    min-width: 16px;
    flex-shrink: 0;
}

.step-text {
    font-family: var(--font-family-primary);
    font-weight: 400;
    color: #252728;
    font-size: var(--font-size-body-text);
    line-height: 1.6;
}

.how-it-works-media {
    width: 100%;
}

.how-it-works-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   Frequently Asked Questions Section
   ========================================================================== */

.faq-section {
    background-color: #ffffff;
    padding: 80px 0 120px;
}

/* Header -Frequently....: Monserrat SemiBold, 252728, 30pt */
.faq-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: #252728;
    font-size: var(--font-size-section-header);
    line-height: 1.25;
    margin-bottom: 56px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* Question Boxes: efefef */
.faq-item {
    background-color: #efefef;
    border-radius: 14px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.faq-question {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 14px;
    cursor: pointer;
    user-select: none;
    /* Questions: Montserrat SemiBold, 252728, 12pt */
    font-family: var(--font-family-primary);
    font-weight: 600;
    color: #252728;
    font-size: var(--font-size-faq-question);
    line-height: 1.4;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-item[open] .faq-question {
    padding-bottom: 12px;
}

.faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    stroke: #62686B;
}

.faq-item .icon-open {
    display: none;
}

.faq-item .icon-closed {
    display: block;
}

.faq-item[open] .icon-open {
    display: block;
}

.faq-item[open] .icon-closed {
    display: none;
}

/* Answers: Monserrat Regular, 252728, 10.5pt */
.faq-answer {
    padding: 0 14px 24px 14px;
    font-family: var(--font-family-primary);
    font-weight: 400;
    color: #252728;
    font-size: var(--font-size-body-text);
    line-height: 1.6;
    max-width: 960px;
}


.footer-section{
padding: 80px 0px;
background-color: #252728;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --container-padding: 0 32px;
    }

    .hero-header {
        min-height: 580px;
    }

    .hero-content {
        max-width: 500px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .how-it-works-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .how-it-works-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 0 24px;
        --font-size-header-on-image: 32pt;
        --font-size-subheader-on-image: 15pt;
        --font-size-section-header: 22pt;
    }

    .site-navbar {
        padding: 18px 0;
    }

    .navbar-logo {
        height: 24px;
    }

    .hero-header {
        min-height: 540px;
    }

    .hero-container {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero-title {
        margin-bottom: 16px;
    }

    .find-retailer-card {
        margin-top: 32px;
    }

    .features-section {
        padding: 64px 0;
    }

    .section-title {
        margin-bottom: 36px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 28px 24px;
    }

    .how-it-works-section {
        padding: 40px 0;
    }

    .how-it-works-title {
        margin-bottom: 24px;
    }

    .how-it-works-list {
        gap: 16px;
    }

    .faq-section {
        padding: 40px 0 80px;
    }

    .faq-title {
        margin-bottom: 24px;
    }

    .faq-question {
        padding: 18px 20px;
    }

    .faq-answer {
        padding: 0 20px 20px 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 0 20px;
        --font-size-header-on-image: 26pt;
        --font-size-subheader-on-image: 13pt;
    }

    .hero-header {
        min-height: 520px;
    }   

    .find-retailer-card {
        padding: 16px 18px;
    }

    .retailer-card-desc {
        max-width: 220px;
        font-size: 11.5px;
    }
}
