:root {
    --bg: #10131a;
    --bg-soft: #161b24;
    --panel: #1e2430;
    --text: #fff7df;
    --muted: #cabf9e;
    --gold: #f6d77c;
    --gold-soft: #fee9ae;
    --blue: #76a9ff;
    --yellow: #ffe15d;
    --line: rgba(255, 247, 223, 0.16);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(246, 215, 124, 0.12), transparent 32rem),
        linear-gradient(180deg, #10131a 0%, #151923 48%, #11151c 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    transition: background 420ms ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(115deg, transparent 0 18%, rgba(255, 225, 93, 0.1) 18% 19%, transparent 19% 40%, rgba(118, 169, 255, 0.09) 40% 41%, transparent 41% 100%),
        linear-gradient(180deg, rgba(246, 215, 124, 0.06), rgba(118, 169, 255, 0.06));
    transition: opacity 420ms ease, filter 420ms ease;
}

body[data-party-moment="day"]::before { opacity: 1; }

body[data-party-moment="night"]::before {
    opacity: 1;
    filter: hue-rotate(35deg) saturate(1.2);
}

body[data-party-moment="dj"]::before {
    opacity: 1;
    filter: hue-rotate(80deg) saturate(1.35);
}

a { color: var(--gold-soft); }
a:hover { color: #ffffff; }
p { margin: 0; }

h1,
h2 {
    line-height: 1.05;
    margin: 0;
    font-weight: 850;
}

h1 {
    max-width: 11ch;
    font-size: 3.15rem;
}

h2 { font-size: 1.9rem; }

.wrap {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.hero {
    min-height: 92vh;
    display: grid;
    align-items: center;
    padding: 2rem 0 3rem;
    border-bottom: 1px solid var(--line);
    transition: background 420ms ease, border-color 420ms ease;
}

body[data-party-moment="day"] .hero {
    background: linear-gradient(180deg, rgba(246, 215, 124, 0.06), transparent 46%);
}

body[data-party-moment="night"] .hero {
    background: linear-gradient(180deg, rgba(118, 169, 255, 0.08), transparent 50%);
    border-color: rgba(118, 169, 255, 0.28);
}

body[data-party-moment="dj"] .hero {
    background: linear-gradient(180deg, rgba(255, 122, 210, 0.08), rgba(118, 169, 255, 0.05) 44%, transparent 70%);
    border-color: rgba(255, 122, 210, 0.24);
}

.hero__grid,
.cards-grid,
.two-col,
.practical-grid,
.split {
    display: grid;
    gap: 1.25rem;
}

.eyebrow,
.card-kicker {
    margin: 0 0 0.75rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.lede {
    max-width: 36rem;
    margin-top: 1.25rem;
    color: var(--gold-soft);
    font-size: 1.15rem;
    font-weight: 650;
}

.hero__quick-vibe {
    width: fit-content;
    margin-top: 1rem;
    border-left: 3px solid var(--blue);
    padding: 0.55rem 0.75rem;
    background: rgba(118, 169, 255, 0.1);
    color: #dbe8ff;
    font-weight: 850;
}

.hero__facts {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.hero__facts p {
    padding-left: 0.85rem;
    border-left: 3px solid var(--yellow);
}

.hero__facts span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-transform: uppercase;
}

.hero__facts strong {
    display: block;
    color: #ffffff;
    font-size: 1.08rem;
}

.hero-fact {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease;
}

.hero-fact:hover strong,
.hero-fact:focus-visible strong {
    color: #fff4bf;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.hero-fact:focus-visible {
    outline: 2px solid rgba(255, 225, 93, 0.8);
    outline-offset: 0.25rem;
}

.vibe-link {
    color: #dbe8ff;
    font-weight: 850;
    text-decoration-color: rgba(118, 169, 255, 0.45);
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.18em;
}

.vibe-link:hover,
.vibe-link:focus-visible {
    color: #ffffff;
    text-decoration-color: var(--yellow);
}

.time-pills,
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pill {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    border: 1px solid rgba(255, 225, 93, 0.75);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    color: #fff4bf;
    background: rgba(255, 225, 93, 0.08);
    font-weight: 800;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.pill:hover,
.pill:focus-visible {
    color: #ffffff;
    border-color: #fff4bf;
    background: rgba(255, 225, 93, 0.14);
}

.pill:focus-visible {
    outline: 2px solid rgba(255, 225, 93, 0.85);
    outline-offset: 0.2rem;
}

.pill[data-active="true"],
.timeline-jump[data-active="true"] {
    color: #15110a;
    border-color: var(--gold);
    background: var(--gold);
}

.timeline-jump[data-active="true"] time,
.timeline-jump[data-active="true"] span {
    color: #15110a;
}

.pill--evening {
    border-color: rgba(118, 169, 255, 0.72);
    background: rgba(118, 169, 255, 0.1);
}

.button {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-weight: 850;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button--primary {
    background: var(--gold);
    color: #15110a;
}

.button--ghost {
    border-color: rgba(255, 247, 223, 0.32);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button--primary:hover,
.button--primary:focus-visible {
    background: #fff4bf;
}

.button--ghost:hover,
.button--ghost:focus-visible {
    border-color: rgba(255, 247, 223, 0.58);
    background: rgba(255, 255, 255, 0.09);
}

.button:active,
.pill:active,
.hero-fact:active {
    transform: translateY(1px);
}

.vibe-panel,
.event-card,
.weather-note,
.rsvp-stub,
.contact-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(30, 36, 48, 0.84);
    box-shadow: var(--shadow);
}

.vibe-panel,
.event-card,
.weather-note,
.rsvp-stub,
.contact-card {
    padding: 1.35rem;
}

.vibe-panel { align-self: end; }
.vibe-panel__label { color: var(--muted); font-weight: 800; }

.moment-line {
    margin-top: 0.8rem;
    border-left: 3px solid var(--blue);
    padding-left: 0.75rem;
    color: #dbe8ff;
    font-weight: 800;
}

.countdown {
    margin: 0.35rem 0 0.5rem;
    color: var(--gold);
    font-size: 4rem;
    font-weight: 900;
    line-height: 0.95;
}

.dj-status,
.guest-counter,
.note,
.two-col p,
.rsvp-stub p,
.weather-note p,
.contact-card p {
    color: var(--muted);
}

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--line);
}

.section--cards,
.section--rsvp {
    background: rgba(255, 255, 255, 0.025);
}

.section--warm {
    background:
        linear-gradient(135deg, rgba(246, 215, 124, 0.1), rgba(118, 169, 255, 0.07)),
        var(--bg-soft);
}

.event-card h2,
.weather-note h2,
.rsvp-stub h2,
.contact-card h2 {
    margin-bottom: 1rem;
}

.event-card--day {
    background: linear-gradient(180deg, rgba(246, 215, 124, 0.16), rgba(30, 36, 48, 0.9));
}

.event-card--night {
    background: linear-gradient(180deg, rgba(118, 169, 255, 0.16), rgba(30, 36, 48, 0.92));
}

.event-card {
    transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease, background 420ms ease;
}

.event-card[id] {
    scroll-margin-top: 1.5rem;
}

.event-card:target {
    border-color: rgba(255, 225, 93, 0.9);
    box-shadow:
        0 0 0 3px rgba(255, 225, 93, 0.18),
        0 24px 70px rgba(0, 0, 0, 0.42);
    animation: target-pop 0.9s ease-out both;
}

[data-moment-target][data-active="true"] {
    border-color: rgba(255, 225, 93, 0.9);
    box-shadow:
        0 0 0 3px rgba(255, 225, 93, 0.12),
        0 24px 70px rgba(0, 0, 0, 0.38);
}

body[data-party-moment="day"] .event-card--day {
    transform: translateY(-2px);
    background:
        linear-gradient(180deg, rgba(255, 225, 93, 0.24), rgba(30, 36, 48, 0.9)),
        rgba(30, 36, 48, 0.84);
}

body[data-party-moment="night"] .event-card--night {
    transform: translateY(-2px);
    background:
        linear-gradient(180deg, rgba(118, 169, 255, 0.26), rgba(30, 36, 48, 0.92)),
        rgba(30, 36, 48, 0.84);
}

body[data-party-moment="dj"] #dj-playlist {
    background:
        linear-gradient(135deg, rgba(255, 122, 210, 0.13), rgba(118, 169, 255, 0.11)),
        var(--bg-soft);
}

.spotify-panel {
    display: grid;
    min-height: 352px;
    place-items: center;
    border: 1px solid rgba(255, 247, 223, 0.2);
    border-radius: 12px;
    padding: 1rem;
    background:
        linear-gradient(135deg, rgba(255, 225, 93, 0.12), rgba(118, 169, 255, 0.1)),
        rgba(15, 20, 25, 0.56);
}

.spotify-panel iframe {
    display: block;
    border: 0;
    border-radius: 12px;
}

.spotify-load {
    min-height: 3.15rem;
    border: 1px solid rgba(255, 225, 93, 0.78);
    border-radius: 999px;
    padding: 0.8rem 1.1rem;
    color: #15110a;
    background: var(--gold);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.spotify-load:hover,
.spotify-load:focus-visible {
    background: #fff4bf;
    transform: translateY(-1px);
}

.spotify-load:active {
    transform: translateY(1px);
}

@keyframes target-pop {
    0% { transform: scale(0.985); }
    45% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .button,
    .hero-fact,
    .pill,
    .timeline-jump,
    .spotify-load {
        transition: none;
    }

    .button:hover,
    .button:focus-visible,
    .button:active,
    .hero-fact:active,
    .pill:active,
    .timeline-jump:hover,
    .timeline-jump:focus-visible,
    .spotify-load:hover,
    .spotify-load:focus-visible,
    .spotify-load:active {
        transform: none;
    }

    .event-card:target {
        animation: none;
    }
}

.plain-list,
.expect-list,
.contact-list {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
}

.plain-list li,
.expect-list li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--muted);
}

.plain-list li + li,
.expect-list li + li { margin-top: 0.55rem; }

.plain-list li::before,
.expect-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: var(--gold);
}

.timeline {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-jump {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1rem;
    align-items: baseline;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.timeline-jump:hover,
.timeline-jump:focus-visible {
    border-color: rgba(255, 247, 223, 0.22);
    background: rgba(255, 255, 255, 0.045);
    color: #ffffff;
    transform: translateX(2px);
}

.timeline li {
    position: relative;
    display: grid;
    gap: 0.3rem;
    padding: 0 0 1rem 1.5rem;
    border-left: 2px solid rgba(246, 215, 124, 0.32);
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -0.47rem;
    top: 0.12rem;
    width: 0.82rem;
    height: 0.82rem;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 4px rgba(255, 225, 93, 0.12);
}

.timeline time {
    color: var(--gold);
    font-weight: 900;
}

.timeline span { color: var(--muted); }

.info-list {
    display: grid;
    gap: 1rem;
    margin: 1.35rem 0 0;
}

.info-list div {
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.info-list dt {
    color: var(--gold);
    font-weight: 900;
}

.info-list dd {
    margin: 0.15rem 0 0;
    color: var(--muted);
}

.rsvp-stub .button { margin-top: 1.25rem; }

.rsvp-form {
    display: grid;
    gap: 1rem;
}

.rsvp-form__row {
    display: grid;
    gap: 0.4rem;
}

.rsvp-form label,
.rsvp-form legend {
    color: #ffffff;
    font-weight: 850;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
    width: 100%;
    border: 1px solid rgba(255, 247, 223, 0.26);
    border-radius: 8px;
    padding: 0.78rem 0.85rem;
    color: #ffffff;
    background: rgba(16, 19, 26, 0.72);
    font: inherit;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus,
.rsvp-form select:focus {
    border-color: var(--gold);
    outline: 2px solid rgba(246, 215, 124, 0.24);
    outline-offset: 2px;
}

.rsvp-form__hint {
    color: var(--muted);
    font-size: 0.88rem;
}

.rsvp-form__choice {
    margin: 0;
    border: 0;
    padding: 0;
}

.rsvp-form__choice-options {
    display: grid;
    gap: 0.6rem;
}

.rsvp-form__choice-card {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(255, 247, 223, 0.24);
    border-radius: 8px;
    padding: 0.72rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
}

.rsvp-form__choice-card:has(input:checked) {
    border-color: rgba(246, 215, 124, 0.86);
    background: rgba(246, 215, 124, 0.14);
}

.rsvp-form__choice-card input {
    width: auto;
    min-width: 1.05rem;
}

.rsvp-form__errors {
    border: 1px solid rgba(255, 95, 95, 0.42);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(115, 22, 22, 0.24);
}

.rsvp-form__errors ul {
    margin: 0.6rem 0 0;
    padding-left: 1.25rem;
}

.rsvp-form__honeypot {
    position: absolute;
    left: -10000px;
}

.planning-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
}

.planning-filters label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--gold-soft);
    font-weight: 800;
}

.planning-filters input,
.planning-filters select {
    accent-color: var(--gold);
}

.planning-section {
    margin: 1.5rem 0 0.75rem;
    color: var(--gold);
}

.planning-task {
    margin-bottom: 0.85rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.045);
}

.planning-task--idea {
    border-left-color: var(--yellow);
}

.planning-task--done {
    opacity: 0.68;
}

.planning-task--done .planning-task__title {
    text-decoration: line-through;
}

.planning-task--cancelled {
    opacity: 0.55;
    border-left-color: var(--muted);
}

.planning-task--cancelled .planning-task__title {
    text-decoration: line-through;
}

.planning-task--pastdue {
    border-color: rgba(255, 95, 95, 0.62);
    border-left-color: #ff6b6b;
    background: rgba(115, 22, 22, 0.22);
}

.planning-task__title {
    margin: 0 0 0.2rem;
    color: #ffffff;
    font-size: 1.25rem;
}

.planning-task__when,
.planning-task__owner,
.planning-task__done-at,
.planning-task__alert {
    margin-top: 0.25rem;
    color: var(--muted);
}

.planning-task__alert {
    color: #ffb4b4;
    font-weight: 900;
}

.planning-task__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.planning-task__notes {
    margin-top: 0.65rem;
}

.contact-list {
    display: grid;
    gap: 0.7rem;
}

.contact-list a {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    color: var(--gold-soft);
    font-size: 1.08rem;
    font-weight: 850;
    text-decoration: none;
}

.contact-list a:hover { text-decoration: underline; }

.footer {
    padding: 2rem 0 3rem;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .wrap { width: min(1120px, calc(100% - 3rem)); }

    .hero__grid {
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
        align-items: end;
    }

    .hero { min-height: 88vh; }

    h1 { font-size: 6.8rem; }

    h2 { font-size: 2.85rem; }

    .lede { font-size: 1.45rem; }

    .countdown { font-size: 5.75rem; }

    .cards-grid,
    .two-col,
    .practical-grid,
    .split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 1.5rem;
    }

    .event-card,
    .weather-note,
    .rsvp-stub,
    .contact-card {
        padding: 1.75rem;
    }

    .rsvp-form__choice-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .wrap { width: min(100% - 1.25rem, 1120px); }

    .button,
    .pill { width: 100%; }
}

/* ------- Gäster table (admin) ------- */
/* A fixed-height "window": the table scrolls inside; the toolbar
   stays pinned at the bottom of the form so Spara is always visible. */
.gaster-form {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gaster-scroll {
    overflow: auto;
    flex: 1;
    max-height: calc(100vh - 22rem);
    min-height: 18rem;
}

.gaster-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text);
    font-size: 0.9rem;
}

.gaster-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-soft);
    color: var(--gold-soft);
    text-align: left;
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    z-index: 2;
}

.gaster-table tbody td {
    padding: 0.4rem 0.6rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--line);
}

.gaster-table tbody tr:hover {
    background: rgba(255, 247, 223, 0.04);
}

.gaster-table input[type="text"],
.gaster-table input[type="email"],
.gaster-table input[type="tel"],
.gaster-table input[type="number"],
.gaster-table select {
    background: rgba(16, 19, 26, 0.7);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.3rem 0.45rem;
    font: inherit;
    font-size: 0.88rem;
}

.gaster-table input:focus,
.gaster-table select:focus {
    outline: 2px solid rgba(246, 215, 124, 0.32);
    outline-offset: 1px;
    border-color: var(--gold);
}

.gaster-table input[type="checkbox"] {
    transform: scale(1.15);
    accent-color: var(--gold);
}

.gaster-toolbar {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.gaster-toolbar .small {
    color: var(--muted);
    margin-right: auto;
}

/* Mark rows by status so the eye can scan them */
.admin-table__row--day    td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.admin-table__row--night  td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.admin-table__row--all    td:first-child { box-shadow: inset 3px 0 0 #b48bff; }
.admin-table__row--nej    td:first-child { box-shadow: inset 3px 0 0 #d97070; opacity: 0.7; }
.admin-table__row--pending td:first-child { box-shadow: inset 3px 0 0 #6a7280; }

/* ------- Statistik cards ------- */
.stats-card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
}

.stats-card .card-kicker {
    color: var(--muted);
}
