/* CSS Design System for The DPA Project - Apple Research Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Colors - Apple ML Style */
    --bg-color: #F5F5F7;
    /* Light gray background */
    --surface-color: #FFFFFF;
    /* Pure white content blocks */
    --text-primary: #1D1D1F;
    /* Near black */
    --text-secondary: #86868B;
    /* Medium gray */
    --text-tertiary: #6E6E73;
    --border-color: #D2D2D7;
    /* Subtle separators */
    --accent-color: #1D1D1F;
    /* Black for primary actions */
    --accent-hover: #333333;
    --link-blue: #0066CC;
    /* Standard Apple link blue */

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    /* Generous padding like the reference */
    --spacing-xxl: 80px;
    --container-width: 980px;
    /* Standard Apple container max-width */
    --text-width: 680px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 17px;
    /* Apple standard body size */
    --font-size-sm: 14px;
    --font-size-lg: 19px;
    --font-size-h1: 56px;
    /* Large, bold headers */
    --font-size-h2: 40px;
    --font-size-h3: 24px;

    /* Components */
    --card-radius: 0px;
    /* Reference shows remarkably sharp/minimal cards. */
    --btn-radius: 980px;
    /* Pill shape */
    --transition-fast: 0.2s ease;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.47059;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    /* Bolder headers */
    letter-spacing: -0.025em;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-h1);
    line-height: 1.07143;
    max-width: 800px;
    margin-bottom: var(--spacing-lg);
}

h2 {
    font-size: var(--font-size-h2);
    line-height: 1.1;
    margin-top: var(--spacing-xxl);
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: var(--font-size-h3);
    line-height: 1.16667;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 400;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xl) 0;
    /* No border separators in this style, whitespace does the work */
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    /* Slightly larger pill */
    border-radius: var(--btn-radius);
    font-size: 17px;
    font-weight: 600;
    /* Medium/Semibold */
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    /* Thicker borders */
    text-align: center;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--text-primary);
    color: white;
}

.card {
    background: var(--surface-color);
    /* No border, relying on contrast with gray bg */
    padding: var(--spacing-xl);
    /* Large padding: 40px */
    border-radius: var(--card-radius);
    margin-bottom: var(--spacing-lg);
    /* Optional: Add a very subtle top border line inside card like the reference? 
     Use specific HRs for that. */
}

.card h3 {
    margin-top: 0;
}

/* Nav - Dark Apple Style */
.navbar {
    background-color: #1D1D1F;
    /* Dark dark gray */
    padding: 0;
    height: 52px;
    /* Fixed height standard */
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

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

.nav-brand {
    font-weight: 600;
    font-size: 19px;
    color: #F5F5F7 !important;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links a {
    color: #D2D2D7;
    /* Light gray text */
    font-size: 12px;
    /* Smaller nav text standard */
    font-weight: 400;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #FFFFFF;
}

/* Footer */
.footer {
    padding: var(--spacing-xxl) 0;
    background-color: var(--bg-color);
    /* Matches body */
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
}

.footer-text p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    line-height: 1.33337;
}

/* ... existing styles ... */

/* Forms - Apple Style */
.form-container {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-label {
    display: block;
    font-size: 19px;
    /* Large, legible questions */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.form-subtext {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: -8px;
    margin-bottom: var(--spacing-sm);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-color);
    /* Light gray input bg on white card */
    border: 1px solid transparent;
    /* No border by default */
    border-radius: 12px;
    /* Soft radius for inputs */
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    background-color: #FFFFFF;
    border-color: var(--link-blue);
    /* Focus state */
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Radio & Checkbox Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.radio-option:hover {
    background-color: var(--bg-color);
}

.radio-input {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #D2D2D7;
    border-radius: 50%;
    margin-top: 2px;
    position: relative;
    flex-shrink: 0;
}

.radio-input:checked {
    border-color: var(--link-blue);
    background-color: var(--link-blue);
}

.radio-input:checked::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.radio-label-text {
    font-size: 17px;
    line-height: 1.4;
}

/* Boolean/Scale wrappers */
.scale-group {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ... existing styles ... */

/* Mobile Navigation */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 200;
    width: 24px;
    height: 24px;
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #D2D2D7;
    transition: all 0.3s ease-in-out;
    position: absolute;
}

.hamburger-line:nth-child(1) {
    top: 6px;
}

.hamburger-line:nth-child(2) {
    top: 12px;
}

/* Active Hamburger State (X) */
.hamburger.active .hamburger-line:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
    background-color: #FFFFFF;
}

.hamburger.active .hamburger-line:nth-child(2) {
    top: 9px;
    transform: rotate(-45deg);
    background-color: #FFFFFF;
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #1D1D1F;
    /* Matches visual nav */
    z-index: 150;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 0;
    opacity: 0;
}

.mobile-menu.active {
    height: 100vh;
    padding-top: 80px;
    opacity: 1;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 0 var(--spacing-xl);
}

.mobile-menu a {
    font-size: 24px;
    font-weight: 600;
    color: #F5F5F7;
    padding: 16px 0;
    border-bottom: 1px solid #333336;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-menu.active a {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delay for links */
.mobile-menu.active a:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.active a:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-menu.active a:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-menu.active a:nth-child(4) {
    transition-delay: 0.25s;
}

.mobile-menu.active a:nth-child(5) {
    transition-delay: 0.3s;
}

.mobile-menu.active a:nth-child(6) {
    transition-delay: 0.35s;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide desktop nav */
    }

    .hamburger {
        display: block;
        /* Show hamburger */
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 32px;
    }

    .hero-subtext {
        font-size: 19px;
    }

    .card {
        padding: 30px;
    }
}

.footer-links a,
.footer-links span {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Specific - Home */
.hero {
    padding: 100px 0 60px;
}

.hero h1 {
    letter-spacing: -0.015em;
}

.hero-subtext {
    font-size: 21px;
    /* Intro text usually larger */
    line-height: 1.3810;
    color: var(--text-primary);
    max-width: 700px;
    margin-bottom: var(--spacing-xl);
}

.trust-line {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
    display: block;
    font-weight: 500;
}

.cta-group {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* Grid for cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    /* Gap is space BETWEEN white blocks */
    margin-top: var(--spacing-lg);
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
    }

    .hero-subtext {
        font-size: 19px;
    }

    .btn {
        width: 100%;
    }

    /* Nav mobile handling (simplified) */
    .nav-links {
        display: none;
        /* In a real app, hamburger menu */
    }
}

/* Updates Feed & Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: var(--spacing-xl);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-muted {
    color: var(--text-tertiary);
}

/* The Apple Research "Article" look for Updates */
.update-post {
    background: var(--surface-color);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    /* No border bottom, use cards instead */
}

.update-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Separator Line inside cards (HR) */
hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-lg) 0;
}