/* ==========================================================================
   CUPERTINO CHROME DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

/* --- Custom Variables & Tokens --- */
:root {
    /* Color Palette */
    --bg-primary: #F5F5F7;
    --bg-secondary: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --accent: #0071E3;
    --border-color: rgba(0, 0, 0, 0.05);
    --border-hover: rgba(0, 0, 0, 0.12);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Animation & Motion */
    --apple-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-speed: 0.6s;
    --transition-short: 0.3s;
    
    /* Layout */
    --navbar-height: 48px;
    --container-max-width: 1120px;
}

/* --- Base Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* --- Typography Defaults --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-short) var(--apple-ease);
}

img {
    max-width: 100%;
    display: block;
    user-select: none;
}

/* --- Navigation Bar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-cta {
    background-color: var(--accent);
    color: var(--bg-secondary);
    padding: 4px 12px;
    border-radius: 980px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: background-color var(--transition-short) var(--apple-ease), transform var(--transition-short) var(--apple-ease);
}

.nav-cta:hover {
    background-color: #0077ED;
    transform: scale(1.02);
}

/* --- Hero Section --- */
.hero-section {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: var(--navbar-height);
    position: relative;
    background-color: var(--bg-primary);
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-heading {
    font-size: 80px;
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    opacity: 0;
    transform: scale(0.95);
    animation: heroEntrance var(--transition-speed) var(--apple-ease) forwards;
}

.hero-subheading {
    font-size: 21px;
    font-weight: 300;
    color: var(--text-secondary);
    margin-top: 16px;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeUpIn var(--transition-speed) var(--apple-ease) 0.2s forwards;
}

.hero-image-wrapper {
    margin-top: 40px;
    width: 380px;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpIn var(--transition-speed) var(--apple-ease) 0.4s forwards;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
    animation: floatImage 6s ease-in-out infinite alternate;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    opacity: 0;
    animation: fadeIn var(--transition-speed) var(--apple-ease) 0.8s forwards;
}

.scroll-arrow {
    animation: arrowBounce 2s infinite;
}

/* --- Section Container Base --- */
.bento-section, .specs-section {
    padding: 120px 0;
    width: 100%;
    background-color: var(--bg-primary);
}

.section-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 22px;
}

.section-tag {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 48px;
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 60px;
}

/* --- Bento Grid Feature Matrix --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    width: 100%;
}

.bento-card {
    background-color: var(--bg-secondary);
    border-radius: 28px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-speed) var(--apple-ease),
                box-shadow var(--transition-speed) var(--apple-ease),
                border-color var(--transition-speed) var(--apple-ease);
}

/* Bento Card Hover Rule */
.bento-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--border-hover);
}

/* Bento Card Child Content Sliding Transition */
.bento-card .card-content-overlay,
.bento-card .card-content-top {
    transform: translateY(0);
    transition: transform var(--transition-speed) var(--apple-ease);
}

.bento-card:hover .card-content-overlay,
.bento-card:hover .card-content-top {
    transform: translateY(-5px);
}

/* Column Spans */
.span-8 {
    grid-column: span 8;
}

.span-4 {
    grid-column: span 4;
}

/* Card Visual Configurations */
.bento-card .card-bg-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bento-card .card-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) var(--apple-ease);
}

.bento-card:hover .card-bg-image {
    transform: scale(1.03);
}

.card-content-overlay {
    position: relative;
    z-index: 2;
    padding: 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.8) 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.card-content-top {
    padding: 40px 40px 20px 40px;
    z-index: 2;
}

.card-content-bottom {
    padding: 0 40px 40px 40px;
    z-index: 2;
}

.card-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.card-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.card-description {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.45;
    letter-spacing: -0.01em;
}

/* Card Specific Layouts: Chip Card */
#card-chip {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chip-image-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.chip-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.chart-container {
    margin-top: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chart-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.chart-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bar-name {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    width: 80px;
}

.bar-track {
    flex: 1;
    height: 6px;
    background-color: rgba(29, 29, 31, 0.05);
    border-radius: 980px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 980px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.legacy-fill {
    background-color: var(--text-secondary);
}

.chroma-fill {
    background-color: var(--accent);
}

/* Card Specific Layouts: Battery Card */
.battery-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex: 1;
    margin-bottom: 20px;
}

.battery-gauge-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke-dasharray: 314.159; /* 2 * PI * r (50) */
    stroke-dashoffset: 314.159;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.battery-percent-display {
    position: absolute;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.battery-number {
    font-size: 32px;
    font-weight: 200;
    letter-spacing: -0.03em;
}

.battery-symbol {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
}

.battery-status-text {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.status-bold {
    color: var(--text-primary);
    font-weight: 600;
}

/* --- Tech Specs Accordion --- */
.spec-container {
    max-width: 800px;
}

.specs-accordion {
    width: 100%;
    margin-top: 40px;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-trigger {
    width: 100%;
    padding: 32px 0;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    outline: none;
}

.accordion-title-text {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: color var(--transition-short) var(--apple-ease);
}

.accordion-trigger:hover .accordion-title-text {
    color: var(--accent);
}

.accordion-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(29, 29, 31, 0.03);
    color: var(--text-primary);
    transition: transform var(--transition-short) var(--apple-ease),
                background-color var(--transition-short) var(--apple-ease),
                color var(--transition-short) var(--apple-ease);
}

.accordion-trigger:hover .accordion-icon-wrapper {
    background-color: var(--accent);
    color: var(--bg-secondary);
}

.accordion-icon {
    transition: transform var(--transition-short) var(--apple-ease);
}

/* Open Accordion State styling */
.accordion-item.active .accordion-icon-wrapper {
    transform: rotate(45deg);
    background-color: var(--text-primary);
    color: var(--bg-secondary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) var(--apple-ease);
}

.accordion-inner {
    padding: 0 0 32px 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.spec-detail-col h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.spec-detail-col p {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.5;
}

/* --- Premium Footer --- */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px 0;
    width: 100%;
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 22px;
}

.footer-cta-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.footer-pretitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.01em;
    display: block;
    margin-bottom: 12px;
}

.footer-cta-title {
    font-size: 40px;
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.footer-cta-desc {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 32px;
}

.footer-cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn {
    padding: 12px 28px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: background-color var(--transition-short) var(--apple-ease),
                color var(--transition-short) var(--apple-ease),
                transform var(--transition-short) var(--apple-ease);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-secondary);
}

.btn-primary:hover {
    background-color: #0077ED;
    transform: scale(1.02);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(29, 29, 31, 0.05);
    border-color: rgba(29, 29, 31, 0.1);
    transform: scale(1.02);
}

.footer-divider {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 40px;
}

.footer-notes {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.footer-bottom-links {
    display: flex;
    gap: 18px;
}

.footer-bottom-links a:hover {
    color: var(--text-primary);
}

/* --- Animation Keyframes --- */
@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes floatImage {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-15px);
    }
}

@keyframes arrowBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Tablet Layout (up to 1024px) */
@media (max-width: 1024px) {
    .section-container {
        padding: 0 40px;
    }
    
    .hero-heading {
        font-size: 64px;
    }
    
    .bento-grid {
        gap: 16px;
    }
    
    .span-8 {
        grid-column: span 12; /* Stack grid layout */
    }
    
    .span-4 {
        grid-column: span 6; /* 2-column fallback */
    }
    
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile Layout (up to 768px) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide link lists, simplify for mobile */
    }
    
    .section-container {
        padding: 0 24px;
    }
    
    .hero-heading {
        font-size: 42px;
        line-height: 1.1;
    }
    
    .hero-subheading {
        font-size: 17px;
    }
    
    .hero-image-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .span-4, .span-8 {
        grid-column: span 12; /* Full stack */
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .card-content-overlay {
        padding: 24px;
    }
    
    .card-content-top {
        padding: 24px 24px 12px 24px;
    }
    
    .card-content-bottom {
        padding: 0 24px 24px 24px;
    }
}
