:root {
    /* Color Palette */
    --bg-black: #020617; /* Very dark slate */
    --bg-panel: #0f172a; /* Slate 900 */
    --bg-glass: rgba(15, 23, 42, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --brand-cyan: #06b6d4;
    --brand-cyan-hover: #0891b2;
    --brand-cyan-glow: rgba(6, 182, 212, 0.2);
    
    --accent-red: #ef4444;
    --accent-green: #22c55e;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    
    /* Layout */
    --max-width: 1000px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-full: 9999px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-black);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background gradient effect */
.bg-fx {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

a {
    color: var(--brand-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-cyan-hover);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Header & Nav */
header {
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

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

/* Hero Section */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--border-radius-full);
    background: rgba(6, 182, 212, 0.1);
    color: var(--brand-cyan);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero p.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn-primary {
    background: var(--brand-cyan);
    color: var(--bg-black);
    box-shadow: 0 0 20px var(--brand-cyan-glow);
}

.btn-primary:hover {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(6, 182, 212, 0.3);
    color: var(--bg-black);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Feature Grid */
.features {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.3);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--brand-cyan);
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Status / Warning Banner */
.status-banner {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin: 60px auto;
    max-width: 800px;
    text-align: left;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.status-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.status-content h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.status-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.status-content ul {
    margin-top: 12px;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-content li {
    margin-bottom: 4px;
}

/* FAQ Accordion */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--brand-cyan);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(2, 6, 23, 0.3);
}

.faq-item.active .faq-answer {
    padding: 0 24px 24px;
    max-height: 500px; /* arbitrary max height for transition */
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-answer code {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Modal for QR Code */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: #fff;
    margin: 20px auto;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-weight: bold;
}

/* Legal Text Page */
.legal-content {
    max-width: 800px;
    margin: 60px auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 60px 0 40px; }
    .hero h1 { font-size: 2.2rem; }
    .btn-group { flex-direction: column; width: 100%; max-width: 300px; }
    .btn { width: 100%; }
    .status-banner { flex-direction: column; }
    .legal-content { padding: 24px; margin: 40px auto; }
}

/* ==========================================================================
   Home Page Specific Styles
   ========================================================================== */
.page-home .hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-home .screenshots {
    padding: 20px 0 60px;
}

.page-home .screenshots-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.page-home .device-mockup {
    position: relative;
    width: 100%;
    padding: clamp(8px, 2vw, 16px);
    background: #000000; /* Deepest black for bezel */
    border-radius: clamp(24px, 6vw, 48px);
    
    /* Silver/Titanium frame look */
    border: 1px solid #3f3f46;
    box-shadow: 
        inset 0 0 0 2px #000, 
        inset 0 0 0 4px #27272a, /* inner metallic gleam */
        0 0 0 1px #52525b, /* outer sharp edge */
        0 0 0 3px #18181b, /* outer band */
        0 25px 50px -12px rgba(0, 0, 0, 0.75); /* massive shadow */
    display: flex;
    z-index: 1;
}

/* Glass Glare */
.page-home .device-mockup::before {
    content: '';
    position: absolute;
    top: clamp(8px, 2vw, 16px); 
    left: clamp(8px, 2vw, 16px); 
    right: clamp(8px, 2vw, 16px); 
    bottom: clamp(8px, 2vw, 16px);
    border-radius: clamp(16px, 4vw, 32px);
    background: linear-gradient(105deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 20;
}

/* Dynamic Island (Right side) */
.page-home .device-mockup::after {
    content: '';
    position: absolute;
    top: 50%;
    right: clamp(14px, 3.5vw, 28px); /* inset from the right bezel */
    transform: translateY(-50%);
    width: clamp(16px, 4vw, 32px);
    height: clamp(54px, 13.5vw, 108px);
    background: #000;
    background-image: radial-gradient(circle at 50% 25%, #1a1a24 0%, transparent 40%),
                      radial-gradient(circle at 50% 75%, #111118 0%, transparent 35%);
    border-radius: 100px;
    z-index: 10;
    box-shadow: 
        inset 0 0 2px rgba(255, 255, 255, 0.2),
        0 0 8px rgba(0,0,0,0.6); /* subtle drop shadow on the island */
}

.page-home .screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: clamp(16px, 4vw, 32px); /* Curves inside the outer bezel */
    background: #000;
}

.page-home .scenarios {
    padding: 60px 0;
}

.page-home .scenario-card {
    background: rgba(15, 23, 42, 0.4);
    border-left: 3px solid var(--brand-cyan);
    padding: 24px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.page-home .scenario-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.page-home .scenario-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-home .card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--brand-cyan);
}

.page-home .status-section {
    margin: 60px auto;
    max-width: 600px;
    background: linear-gradient(135deg, rgba(15,23,42,0.8), rgba(2,6,23,0.9));
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--border-radius);
    padding: 32px;
    text-align: center;
}

.page-home .status-section h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.page-home .status-section p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.page-home .status-actions {
    margin-top: 24px;
}

.page-home .testflight-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(148, 163, 184, 0.3);
    text-underline-offset: 4px;
}

.page-home .testflight-link:hover {
    color: var(--brand-cyan);
    text-decoration-color: var(--brand-cyan);
}

.qr-placeholder {
    position: relative;
}

.qr-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.qr-placeholder span {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.qr-mobile-guide {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
}

.qr-mobile-guide p {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}
