/* ============================================
   RELIEF — Global Stylesheet
   migraine.live production CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,300;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;0,9..144,800;1,9..144,300;1,9..144,500&display=swap');

:root {
    --coral: #FF7676;
    --coral-dark: #e05e5e;
    --dark: #0a0f1a;
    --dark-card: #111827;
    --dark-surface: #0f1629;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-w: 1200px;
    --radius: 1.5rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--dark);
    color: var(--slate-300);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral); text-decoration: none; transition: color .2s; }
a:hover { color: #ff9a9a; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ---- NAV ---- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,15,26,.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
    height: 72px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.nav-logo img { width: 36px; height: 36px; border-radius: 10px; }
.nav-logo span { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: white; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--slate-400); font-size: .875rem; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: white; }
.nav-cta {
    background: var(--coral); color: white; padding: .7rem 1.6rem;
    border-radius: 100px; font-weight: 700; font-size: .85rem;
    text-decoration: none; transition: transform .15s, filter .15s;
    box-shadow: 0 4px 20px rgba(255,118,118,.25);
}
.nav-cta:hover { filter: brightness(1.1); transform: scale(1.03); color: white; }

.nav-hamburger { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ---- LANG SWITCHER ---- */
.lang-switcher {
    position: relative; display: inline-block;
}
.lang-btn {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    color: var(--slate-300); padding: .45rem .9rem; border-radius: 8px;
    font-size: .8rem; cursor: pointer; display: flex; align-items: center; gap: .4rem;
    font-family: var(--font-body);
}
.lang-dropdown {
    display: none; position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--dark-card); border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px; padding: .5rem 0; min-width: 180px; z-index: 200;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.lang-dropdown.open { display: block; }
.lang-dropdown a {
    display: block; padding: .6rem 1.2rem; color: var(--slate-300);
    font-size: .85rem; text-decoration: none;
}
.lang-dropdown a:hover { background: rgba(255,255,255,.05); color: white; }

/* ---- HERO ---- */
.hero {
    padding: 10rem 0 6rem; text-align: center; position: relative;
}
.hero::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 600px; height: 400px; background: radial-gradient(circle, rgba(255,118,118,.08), transparent 70%);
    pointer-events: none; z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,118,118,.08); border: 1px solid rgba(255,118,118,.15);
    padding: .4rem 1rem; border-radius: 100px;
    font-size: .7rem; font-weight: 700; color: var(--coral);
    text-transform: uppercase; letter-spacing: .15em; margin-bottom: 2rem;
}
.hero h1 {
    font-family: var(--font-display); font-size: clamp(2.5rem, 6vw, 5rem);
    color: white; line-height: 1.1; margin-bottom: 1.5rem; font-weight: 700;
    letter-spacing: -.02em;
}
.hero h1 em { color: var(--coral); font-style: italic; font-weight: 300; }
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.3rem); color: var(--slate-400);
    max-width: 600px; margin: 0 auto 3rem; font-weight: 300; line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-appstore img { height: 56px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); }
.btn-secondary {
    padding: .9rem 2rem; background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,118,118,.2); border-radius: 14px;
    color: var(--coral); font-weight: 700; font-size: .9rem;
    display: flex; align-items: center; gap: .5rem;
    transition: background .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,.08); color: var(--coral); }

/* ---- SECTIONS ---- */
.section { padding: 6rem 0; }
.section-alt { background: rgba(2,6,23,.5); }
.section-label {
    font-size: .65rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .3em; color: var(--coral); margin-bottom: 1rem;
}
.section-title {
    font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem);
    color: white; line-height: 1.15; margin-bottom: 1rem; font-weight: 700;
}
.section-desc {
    font-size: 1.1rem; color: var(--slate-400); max-width: 600px;
    line-height: 1.8; font-weight: 300;
}

/* ---- CARDS GRID ---- */
.card-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.card {
    background: var(--dark-card); border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius); padding: 2rem; transition: border-color .3s, transform .3s;
}
.card:hover { border-color: rgba(255,118,118,.2); transform: translateY(-4px); }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 1.2rem;
}
.card h3 { color: white; font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.card p { font-size: .9rem; color: var(--slate-400); line-height: 1.7; }

/* ---- ARTICLE PROSE ---- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h1 {
    font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem);
    color: white; line-height: 1.15; margin-bottom: 2rem; font-weight: 700;
}
.prose h2 {
    font-family: var(--font-display); font-size: 1.6rem; color: white;
    margin-top: 3rem; margin-bottom: 1rem; font-weight: 600;
    padding-left: 1rem; border-left: 4px solid var(--coral);
}
.prose h3 { font-size: 1.25rem; color: var(--slate-100); margin-top: 2rem; margin-bottom: .75rem; font-weight: 600; }
.prose p { margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.9; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: .75rem; font-size: 1rem; }
.prose strong { color: white; }
.prose blockquote {
    background: rgba(255,118,118,.04); border-left: 6px solid var(--coral);
    padding: 1.5rem 2rem; border-radius: 0 1rem 1rem 0;
    margin: 2rem 0; font-style: italic; color: var(--slate-100);
}
.prose .ref-box {
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.5rem; padding: 2rem; margin-top: 3rem;
}
.prose .ref-box h4 { color: var(--slate-400); font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 1rem; }
.prose .ref-box li { font-size: .8rem; color: var(--slate-500); margin-bottom: .5rem; }

.author-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    padding: .4rem 1rem; border-radius: 100px; font-size: .75rem;
    color: var(--slate-400); margin-bottom: 2rem;
}

.back-link {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--slate-500); font-size: .8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: 3rem;
}
.back-link:hover { color: white; }

/* ---- CTA BOX ---- */
.cta-box {
    background: var(--dark-card); border: 1px solid rgba(255,118,118,.15);
    border-radius: 2rem; padding: 4rem 2rem; text-align: center;
    margin-top: 5rem; position: relative; overflow: hidden;
}
.cta-box::before {
    content: ''; position: absolute; top: -80px; left: -80px;
    width: 200px; height: 200px; background: rgba(255,118,118,.06);
    border-radius: 50%; filter: blur(60px);
}
.cta-box h3 {
    font-family: var(--font-display); font-size: 2rem; color: white;
    margin-bottom: 1rem; position: relative;
}
.cta-box p { color: var(--slate-400); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; position: relative; }
.cta-download {
    display: inline-flex; align-items: center; gap: 1rem;
    background: white; color: var(--dark); padding: 1rem 2.5rem;
    border-radius: 1rem; font-weight: 800; font-size: 1.1rem;
    transition: transform .15s; position: relative;
}
.cta-download:hover { transform: scale(1.03); color: var(--dark); }
.cta-download .cta-small { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; opacity: .5; display: block; font-weight: 600; }

/* ---- MIDAS CALCULATOR ---- */
.midas-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.midas-info { padding-top: 1rem; }
.midas-form-card {
    background: white; color: var(--dark); border-radius: 2rem;
    padding: 2.5rem; box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
.midas-q { margin-bottom: 1.5rem; }
.midas-q label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .5rem; color: var(--dark); }
.midas-q .q-help { font-size: .8rem; color: var(--slate-500); margin-bottom: .5rem; }
.midas-q input[type="number"] {
    width: 100%; padding: .8rem 1rem; border: 2px solid #e2e8f0;
    border-radius: 12px; font-size: 1.1rem; font-family: var(--font-body);
    transition: border-color .2s; background: #f8fafc;
}
.midas-q input:focus { outline: none; border-color: var(--coral); }
.midas-btn {
    width: 100%; padding: 1rem; background: var(--dark); color: white;
    border: none; border-radius: 14px; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; font-family: var(--font-body); transition: background .2s;
}
.midas-btn:hover { background: #1e293b; }

.midas-result {
    display: none; background: #f0fdf4; border: 2px solid #86efac;
    border-radius: 1rem; padding: 2rem; margin-top: 1.5rem; text-align: center;
}
.midas-result.grade-i { background: #f0fdf4; border-color: #86efac; }
.midas-result.grade-ii { background: #fefce8; border-color: #fde047; }
.midas-result.grade-iii { background: #fff7ed; border-color: #fdba74; }
.midas-result.grade-iv { background: #fef2f2; border-color: #fca5a5; }
.midas-score-num { font-size: 3rem; font-weight: 800; color: var(--dark); }
.midas-grade-label { font-size: 1.2rem; font-weight: 700; margin: .5rem 0; }
.midas-grade-desc { font-size: .9rem; color: var(--slate-600); }

/* ---- FOOTER ---- */
.site-footer {
    border-top: 1px solid rgba(255,255,255,.05);
    padding: 5rem 0 3rem; background: #020617;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-brand p { color: var(--slate-500); font-size: .95rem; margin-top: 1rem; max-width: 320px; line-height: 1.7; }
.footer-col h5 { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .2em; color: var(--slate-500); margin-bottom: 1.2rem; }
.footer-col a { display: block; color: var(--slate-400); font-size: .9rem; margin-bottom: .75rem; text-decoration: none; }
.footer-col a:hover { color: white; }
.footer-bottom {
    margin-top: 4rem; padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.05);
    text-align: center; font-size: .7rem; color: var(--slate-600);
    text-transform: uppercase; letter-spacing: .1em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .midas-container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .nav-links { display: none; }
    .nav-hamburger { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: 72px; left: 0; right: 0;
        background: rgba(10,15,26,.97); padding: 2rem;
        border-bottom: 1px solid rgba(255,255,255,.05);
    }
}
@media (max-width: 600px) {
    .card-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
}
