/* =============================================
   Self: Read to Rise — Shared Styles
   Common styles used across all pages.
   ============================================= */

/* ── Design Tokens ── */
:root {
    --primary: #E77E23;
    --primary-light: #F5A623;
    --background: #F9F8F5;
    --background-warm: #F5F2ED;
    --text: #7A736B;
    --text-dark: #4A453F;
    --success: #2D7D4F;
    --cream: #FFFEF9;
    --shadow: rgba(122, 115, 107, 0.08);
    --shadow-strong: rgba(122, 115, 107, 0.15);
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: -webkit-fill-available; scroll-behavior: smooth; overflow-x: hidden; scrollbar-gutter: stable; }

/* Scroll margin for anchor links with fixed nav */
section[id] { scroll-margin-top: 100px; }

/* ── Accessibility ── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .page-fade-in { animation: none !important; opacity: 1 !important; }
}

/* ── Base ── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 1;
}

/* ── Typography ── */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-dark);
    font-weight: 500;
}

/* ── Navigation (Floating Pill) ── */
nav {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1200px;
    padding: 0.6rem 1.5rem;
    padding-top: calc(0.6rem + env(safe-area-inset-top, 0px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.logo img { height: 28px; }

.nav-back {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-back:hover { color: var(--primary); }

/* ── Primary Button ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(145deg, rgba(231, 126, 35, 0.95) 0%, rgba(231, 126, 35, 0.85) 100%);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    color: white;
    padding: 1rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 8px 32px rgba(231, 126, 35, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
}
.btn-primary:hover {
    background: linear-gradient(145deg, rgba(245, 166, 35, 0.95) 0%, rgba(245, 166, 35, 0.85) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(231, 126, 35, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary svg { width: 18px; height: 18px; }

/* ── Footer ── */
footer {
    padding: 5rem 2rem 2rem;
    background: var(--background);
    border-top: 1px solid rgba(122, 115, 107, 0.1);
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1rem; display: inline-block; }
.footer-brand p {
    font-size: 0.9rem;
    color: var(--text);
    max-width: 280px;
    line-height: 1.7;
}
.footer-links h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    font-weight: 500;
}
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(122, 115, 107, 0.1);
    font-size: 0.85rem;
    color: var(--text);
}
.social-links { display: flex; gap: 1rem; }
.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(122, 115, 107, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.social-links a:hover { background: var(--primary); color: white; }

/* ── Page Load Animation ── */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-fade-in {
    animation: pageFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Launch Countdown (shared across subpages) ── */
.launch-countdown { width: 100%; max-width: 500px; margin: 0 auto; text-align: center; }
.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(145deg, rgba(231, 126, 35, 0.12) 0%, rgba(231, 126, 35, 0.06) 100%);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    padding: 1rem 1.75rem;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    border: 1.5px solid rgba(231, 126, 35, 0.2);
    box-shadow: 0 8px 32px rgba(231, 126, 35, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: countdownPulse 3s ease-in-out infinite;
}
@keyframes countdownPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(231, 126, 35, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
    50% { box-shadow: 0 8px 40px rgba(231, 126, 35, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}

/* ── Responsive ── */

/* Tablet Landscape / Small Desktop (1024px - 1200px) */
@media (min-width: 1024px) and (max-width: 1200px) {
    nav { padding: 0.55rem 1.25rem; max-width: 1100px; }
    .logo img { height: 26px; }
    .footer-top { gap: 2rem; }
}

/* Tablet Portrait (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
    nav { padding: 0.6rem 1.25rem; border-radius: 50px; }
    .logo img { height: 26px; }
    .footer-top { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1.5rem; }
    .footer-brand p { max-width: 200px; }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    nav {
        padding: 0.6rem 1.25rem;
        border-radius: 50px;
    }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    nav { padding: 0.5rem 1rem; width: calc(100% - 1.5rem); }
    .logo img { height: 24px; }
    .footer-top { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
    .footer-brand p { margin: 0 auto; max-width: 280px; }
    .footer-links { margin-bottom: 0.5rem; }
}
