:root {
    /* Lys blå + lyserød palette (Go-love) */
    --bg: #fdfaff;
    --bg-2: #f2fbff;
    --text: #2c3440;
    --muted: #5a6b78;
    --primary: #f58db3; /* lyserød */
    --primary-600: #e26697;
    --secondary: #89d6ff; /* lys blå */
    --accent: #ffd6e7; /* blød rosé */
    --ring: #cceeff; /* lyst blå skær */
    --surface: #ffffff;
    --shadow: 0 10px 30px rgba(44, 52, 64, 0.12);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    user-select: none;
}

body {
    margin: 0;
    color: var(--text);
    /* Repeatable, subtle dot pattern background */
    background-color: var(--bg);
    background-image: radial-gradient(circle at 0 0, rgba(0, 0, 0, 0.03) 2px, transparent 2.5px),
    radial-gradient(circle at 10px 10px, rgba(0, 0, 0, 0.03) 2px, transparent 2.5px),
    linear-gradient(180deg, transparent, transparent 100%);
    background-size: 20px 20px, 20px 20px, auto;
    background-attachment: fixed;
    font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
    font-size: 16px;
}

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

button {
    cursor: pointer;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: 0 15px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Nav */
nav.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
}

.brand .logo {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ring);
    box-shadow: var(--shadow);
}

.menu {
    display: flex;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
}

.menu a:hover {
    color: var(--primary-600);
}

#navToggle {
    display: none;
}

@media (max-width: 1000px) {
    #navToggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.75);
        font-size: 1.5rem;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .menu {
        position: fixed;
        inset: 60px 12px auto 12px;
        flex-direction: column;
        padding: 14px;
        background: var(--surface);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        transform-origin: top right;
        transform: scale(0.98);
        opacity: 0;
        pointer-events: none;
        transition: 200ms ease;
    }

    .menu[data-open="true"] {
        transform: scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 380px) {
    .brand {
        font-size: 14px;
    }

    .nav-inner {
        padding: 8px 0;
    }

    #navToggle {
        width: 36px;
        height: 36px;
    }
}

/* Hero */
.hero {
    padding: 40px 0 30px;
    text-align: center;
}

.hero .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 100px;
    background: var(--ring);
    color: #a84463;
    font-weight: 700;
    letter-spacing: .02em;
    font-size: 14px;
}

.hero h1 {
    font-size: clamp(32px, 6vw, 64px);
    margin: 14px 0 10px;
    line-height: 1.1;
}

.hero p.sub {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--muted);
    margin: 0 0 24px;
}

.hero .cta {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.button.primary {
    background: linear-gradient(180deg, var(--primary), var(--primary-600));
    color: white;
    border: none;
}

.button.secondary {
    background: var(--surface);
}

.button.danger {
    background: linear-gradient(180deg, #ff7a9b, #e26697);
    color: #fff;
    border: none;
}

/* Sections */
section {
    padding: 30px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(24px, 4vw, 28px);
    margin: 0 0 20px;
}

.grid {
    display: grid;
    gap: 18px;
}

.cards {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.card {
    grid-column: span 6;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 820px) {
    .card {
        grid-column: span 12;
    }
}

.timeline {
    position: relative;
    margin: 10px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ring);
    border-radius: 3px;
}

.timeline .event {
    position: relative;
    margin-left: 48px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.timeline .event::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 14px;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--ring);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
    grid-column: span 4;
}

@media (max-width: 820px) {
    .gallery img {
        grid-column: span 6;
        height: 160px;
    }
}

@media (max-width: 580px) {
    .gallery img {
        grid-column: span 12;
        height: 200px;
    }
}

/* RSVP */
.form {
    display: grid;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 15px;
}

.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--surface);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
    font-size: 16px;
}

label {
    font-weight: 700;
}

small.help {
    color: var(--muted);
    font-size: 14px;
}

.notice {
    display: none;
    padding: 12px 14px;
    background: #e9fff2;
    color: #276749;
    border: 1px solid #c6f6d5;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 14px;
}

.notice[data-show="true"] {
    display: block;
}

/* Footer */
footer {
    margin: 40px 0 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(2px);
    transition: all .5s ease;
}

.reveal[data-in="true"] {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Floating hearts */
.heart {
    position: fixed;
    pointer-events: none;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    background: var(--primary);
    opacity: .7;
    animation: floatUp 2.6s ease-out forwards;
}

.heart::before, .heart::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
}

/* Light blue variant */
.heart[data-variant="blue"],
.heart[data-variant="blue"]::before,
.heart[data-variant="blue"]::after {
    background: #6ec1ff; /* light blue */
}

.heart::before {
    left: -7px;
}

.heart::after {
    top: -7px;
}

@keyframes floatUp {
    from {
        transform: translateY(0) scale(1) rotate(45deg);
        opacity: .8;
    }
    to {
        transform: translateY(-160px) scale(1.2) rotate(45deg);
        opacity: 0;
    }
}

/* Invitation fold card */
.invite {
    position: relative;
    width: min(640px, 90%);
    perspective: 1200px;
    margin: 0 auto;
}

.invite .cover {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-600));
    color: #fff;
    font-weight: 700;
    letter-spacing: .03em;
    box-shadow: var(--shadow);
    transform-origin: top;
    transform: rotateX(0deg);
    transition: transform .7s ease;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

.invite .inner {
    margin-top: -10px;
    padding: 16px;
    background: var(--surface);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.invite[aria-expanded="true"] .cover {
    transform: rotateX(-100deg);
}

/* Tables - invitation */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-size: 14px;
}

.table th, .table td {
    padding: 10px;
}

.table thead th {
    text-align: left;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.table tbody tr {
    text-align: left;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: background-color .15s ease;
}

.table tbody tr:hover {
    background: color-mix(in srgb, var(--surface) 80%, var(--ring));
}

.table tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}

.table tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}

.table tbody td:nth-child(3) {
    text-align: right;
    white-space: nowrap;
}

.table .button + .button {
    margin-left: 6px;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

.status.pending {
    background: #fff5d1;
    color: #946200;
}

.status.accepted {
    background: #e8fff1;
    color: #18794e;
}

.status.declined {
    background: #ffe9ec;
    color: #9b1c31;
}

@media (max-width: 680px) {
    .container {
        width: min(100%, 96%);
        padding: 0 12px;
    }

    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th:nth-child(3), .table td:nth-child(3) {
        text-align: right;
        min-width: 120px;
    }

    .button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .container {
        width: 100%;
        padding: 0 10px;
    }

    .button {
        padding: 8px 10px;
        font-size: 12px;
    }

    .status {
        padding: 3px 6px;
        font-size: 11px;
    }

    .table th, .table td {
        padding: 8px;
    }
}

/* Consent popup */
.cookie-popup {
    position: fixed;
    left: 10px;
    bottom: 10px;
    z-index: 60;
    max-width: min(300px, 92%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 12px;
    display: none;
}

.cookie-popup[data-show="true"] {
    display: block;
}

.cookie-popup p {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--muted);
}

.cookie-popup .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-popup .actions .button {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
    width: 100%;
}

.cookie-popup .small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 8px;
}

.infopage {
    user-select: text;
}