/* 50.tomasandre.se -- mobile-first.
   Base = mobile. Enhancements via min-width media queries upward. */

:root {
    --gold: #c9a23f;
    --gold-soft: #e3c97a;
    --teal: #1f3b44;
    --teal-deep: #14272d;
    --ink: #20262a;
    --paper: #faf7f1;
    --paper-2: #f2ece0;
    --muted: #6c6356;
    --line: rgba(32, 38, 42, 0.12);
    --radius: 14px;
    --maxw: 640px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* ---------- Hero (mobile-first) ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 2rem 1.25rem 2.5rem;
    background: var(--teal-deep) url('/static/images/hero.png') center / cover no-repeat;
}
.hero--short { min-height: 60svh; }
/* Mobil-först: bilden har motiv (glas) till höger/nederkant.
   Starkare, jämnare overlay så titel + countdown alltid är läsbara.
   Fäst bakgrunden mot toppen så glasen hamnar lägre/utanför textzonen. */
.hero {
    background-position: center bottom;
}
.hero__overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(20,39,45,0.62) 0%, rgba(20,39,45,0.42) 45%, rgba(20,39,45,0.80) 100%),
        radial-gradient(120% 80% at 50% 28%, rgba(20,39,45,0.25) 0%, rgba(20,39,45,0) 60%);
}
.hero__inner { position: relative; width: 100%; max-width: var(--maxw); }

/* Språkväljare uppe i hörnet */
.hero__lang {
    position: absolute; top: .8rem; right: .8rem; z-index: 3;
}
.hero__lang select {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,0.14); color: #fff;
    border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
    padding: .4rem 1.8rem .4rem .9rem; font: inherit; font-size: .85rem;
    cursor: pointer; backdrop-filter: blur(4px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23fff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8rem center;
}
.hero__lang select option { color: #20262a; }

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--gold-soft);
}
.hero__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.6rem, 11vw, 4.5rem);
    line-height: 1.02;
    margin: 0 0 0.6rem;
    text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.hero__fifty {
    display: inline-block;
    font-size: clamp(5rem, 26vw, 9rem);
    color: var(--gold-soft);
    line-height: 0.9;
}
.hero__date { font-size: 1.1rem; font-weight: 600; margin: 0.4rem 0 0.1rem; }
.hero__city { font-size: 0.95rem; opacity: 0.85; margin: 0 0 1.6rem; letter-spacing: 0.04em; }

/* ---------- Countdown ---------- */
.countdown {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 1.8rem;
    max-width: 360px;
}
.countdown__unit {
    flex: 1;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 0.6rem 0.2rem;
    backdrop-filter: blur(4px);
}
.countdown__num {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1;
    color: #fff;
}
.countdown__label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ---------- Buttons (touch-friendly) ---------- */
.btn {
    display: inline-block;
    min-height: 48px;
    line-height: 1.2;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
    background: var(--gold);
    color: #1a1300;
    box-shadow: 0 6px 18px rgba(201,162,63,0.35);
}
.btn--primary:hover { background: var(--gold-soft); }
.btn--ghost {
    background: transparent;
    border-color: currentColor;
    color: var(--teal);
}
.hero .btn--ghost { color: #fff; }
.btn--full { width: 100%; }
.hero__cta { margin-top: 0.4rem; padding-left: 2.6rem; padding-right: 2.6rem; }

/* ---------- Sections ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section {
    padding: 2.6rem 0;
    border-bottom: 1px solid var(--line);
}
.section:last-child { border-bottom: 0; }
.section__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.9rem;
    margin: 0 0 1rem;
    color: var(--teal);
}
.muted { color: var(--muted); }

.greeting {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--teal);
    margin: 0;
}
.greeting__sign {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin: 0.8rem 0 0;
}

/* Facts */
.section--facts { display: flex; flex-direction: column; gap: 1.2rem; }
.fact { display: flex; flex-direction: column; }
.fact__label {
    text-transform: uppercase; letter-spacing: 0.18em;
    font-size: 0.7rem; font-weight: 600; color: var(--gold);
}
.fact__value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem; font-weight: 600; color: var(--teal);
    line-height: 1.1; margin-top: 0.15rem;
}
.fact__sub { font-size: 0.9rem; color: var(--muted); margin-top: 0.15rem; }
.section--facts .btn { align-self: flex-start; }

/* ---------- OSA form ---------- */
.osa__intro { margin-top: -0.4rem; margin-bottom: 1.4rem; }
.osa-form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field__label {
    font-weight: 600; font-size: 0.9rem; color: var(--teal);
}
.field__opt { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
    width: 100%;
    font: inherit;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    min-height: 48px;
}
.field textarea { min-height: 70px; resize: vertical; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,63,0.18);
}
.field--radio { border: 0; padding: 0; margin: 0; }
.field--radio legend { padding: 0; }
.radio {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0; font-size: 1rem; cursor: pointer;
}
.radio input, .field--check input { width: 20px; height: 20px; accent-color: var(--gold); }
.field--check { flex-direction: row; align-items: center; gap: 0.6rem; }

/* ---------- Tidsrad i fakta ---------- */
.fact__time {
    font-size: .98rem; font-weight: 600; color: var(--gold);
    margin-top: .1rem;
}

/* ---------- Kodgrind: popup-modal ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 50;
         align-items: center; justify-content: center; padding: 1.2rem; }
.modal[data-show] { display: flex; }
.modal__backdrop { position: absolute; inset: 0;
    background: rgba(15,26,30,0.72); backdrop-filter: blur(3px); }
.modal__card {
    position: relative; width: 100%; max-width: 420px;
    background: var(--paper); border-radius: 18px; padding: 1.6rem 1.3rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__x {
    position: absolute; top: .5rem; right: .7rem;
    background: none; border: 0; font-size: 1.8rem; line-height: 1;
    color: var(--muted); cursor: pointer; padding: .2rem .4rem; min-height: auto;
}
.modal__title {
    font-family: 'Cormorant Garamond', serif; font-weight: 600;
    font-size: 1.7rem; color: var(--teal); margin: 0 0 .5rem;
}
.gate-form { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.1rem; }
.gate-form input[type="text"] {
    width: 100%; font: inherit; font-size: 1.2rem; letter-spacing: .15em;
    text-align: center; text-transform: uppercase;
    padding: .9rem; border: 1.5px solid var(--line); border-radius: 12px;
    background: #fff; min-height: 52px;
}
.gate-form input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,63,0.18);
}
.gate-error {
    background: #fbeaea; border: 1px solid #e6c2c2; color: #8a2a2a;
    padding: .8rem 1rem; border-radius: 10px; font-size: .92rem; margin: .8rem 0 0;
}
.gate-error .muted { color: #8a2a2a; opacity: .8; }

/* ---------- Footer ---------- */
.site-footer {
    text-align: center;
    padding: 1.6rem 1rem 2.4rem;
    color: var(--muted);
    font-size: 0.78rem;
    background: var(--paper-2);
}
.site-footer p { margin: 0; }

/* ---------- Tablet / desktop enhancements ---------- */
@media (min-width: 700px) {
    .hero__date { font-size: 1.3rem; }
    .countdown { gap: 0.75rem; max-width: 420px; }
    .countdown__num { font-size: 2.2rem; }
    .section { padding: 3.4rem 0; }
    .section--facts {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 2.5rem;
    }
    .section--facts .fact { flex: 1; min-width: 180px; }
    .section--facts .btn { flex-basis: 100%; }
    .greeting { font-size: 1.55rem; }
}

@media (min-width: 980px) {
    :root { --maxw: 720px; }
    .hero__inner { max-width: 760px; }
}

@media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
}
