/* ---- Rippijuhlat: kutsukortin tyyli (kerma + rosé + kulta) ---- */

:root {
    --bg:         #fbf6f1;
    --bg-2:       #fceee9;
    --paper:      #fffaf6;
    --ink:        #2d2424;
    --ink-soft:   #5a4d47;
    --rose:       #c8889b;
    --rose-dark:  #a76679;
    --rose-soft:  #f3d9e0;
    --rose-bg:    #fce8ec;
    --gold:       #b08d4f;
    --gold-soft:  #d9bd84;
    --line:       #ecdfd2;
    --muted:      #8a7e75;
    --shadow:     0 18px 60px rgba(168, 102, 121, .10);
    --shadow-sm:  0 6px 24px rgba(168, 102, 121, .08);
    --radius:     18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Jost', system-ui, sans-serif;
    font-weight: 300;
    color: var(--ink);
    background:
        radial-gradient(60% 50% at 100% 0%, var(--rose-bg) 0%, transparent 60%),
        radial-gradient(50% 40% at 0% 100%, #f8ece4 0%, transparent 60%),
        var(--bg);
    line-height: 1.65;
    min-height: 100vh;
}

/* ====================================================================
   PÄÄOTSIKKO + NAVIGAATIO
==================================================================== */
.site-head { text-align: center; padding: 56px 20px 12px; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .42em;
    font-size: .68rem;
    color: var(--gold);
    margin: 0 0 8px;
}

.site-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.1rem, 5.5vw, 3rem);
    line-height: 1.08;
    margin: 0;
    color: var(--ink);
    letter-spacing: .02em;
}

.site-nav {
    margin-top: 26px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.site-nav a {
    text-decoration: none;
    color: var(--ink);
    font-size: .82rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 9px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 246, .7);
    backdrop-filter: blur(4px);
    transition: all .22s ease;
}
.site-nav a:hover { border-color: var(--rose); color: var(--rose-dark); }
.site-nav a.is-active {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
}

/* ====================================================================
   SISÄLTÖKEHIKKO
==================================================================== */
.wrap { max-width: 720px; margin: 0 auto; padding: 12px 20px 40px; }
.wrap-narrow { max-width: 460px; padding-top: 60px; }

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px 34px;
    margin-bottom: 22px;
    position: relative;
}
.card h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 18px;
    text-align: center;
    letter-spacing: .02em;
}
.card h3 + .muted { text-align: center; margin-top: -8px; }
.card h4 { margin: 0 0 8px; font-weight: 500; letter-spacing: .02em; }

/* ====================================================================
   HERO – kutsukortin ilme
==================================================================== */
.invite {
    text-align: center;
    padding: 14px 28px 44px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}
.invite::before {
    content: "";
    position: absolute;
    top: -120px; right: -120px;
    width: 360px; height: 360px;
    background: radial-gradient(closest-side, var(--rose-soft) 0%, transparent 70%);
    pointer-events: none;
    opacity: .85;
}
.invite > * { position: relative; }

.ornament { display: inline-block; margin: 30px auto 14px; color: var(--gold); }
.ornament svg { display: block; }

.invite .lead-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.6rem, 9vw, 4.2rem);
    letter-spacing: .14em;
    margin: 6px 0 0;
    line-height: 1;
    color: var(--ink);
}
.invite .lead-event {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 3.4vw, 1.6rem);
    letter-spacing: .56em;
    text-indent: .56em;
    text-transform: uppercase;
    color: var(--rose);
    margin: 14px 0 0;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--gold);
    margin: 26px auto;
}
.divider::before, .divider::after {
    content: "";
    width: 90px; height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}
.divider .heart { color: var(--gold); }

.invite-date {
    text-transform: uppercase;
    letter-spacing: .32em;
    font-size: .78rem;
    color: var(--ink-soft);
    margin: 4px 0 6px;
}
.invite-day {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    color: var(--rose);
    margin: 0 0 6px;
    letter-spacing: .04em;
}

.invite-info {
    display: grid;
    gap: 14px;
    margin: 22px auto 4px;
    max-width: 380px;
    text-align: left;
}
.invite-info .row {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 16px;
}
.invite-info .row svg { color: var(--gold); }
.invite-info .lbl {
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: .72rem;
    color: var(--gold);
    display: block;
    margin-bottom: 2px;
}
.invite-info .val { color: var(--ink); font-size: .98rem; }

.invite-intro {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    max-width: 30ch;
    margin: 0 auto;
    color: var(--ink-soft);
    line-height: 1.5;
}

.signature {
    font-family: 'Allura', 'Cormorant Garamond', cursive;
    font-size: clamp(2.4rem, 7vw, 3.2rem);
    color: var(--rose);
    margin: 6px 0 4px;
    line-height: 1;
}
.parents {
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: .78rem;
    color: var(--ink);
    margin: 0 0 4px;
}

.deadline {
    display: inline-block;
    margin-top: 26px;
    padding: 9px 20px;
    border-radius: 999px;
    background: var(--rose-bg);
    color: var(--rose-dark);
    font-size: .86rem;
    letter-spacing: .02em;
}

/* ====================================================================
   LOMAKE
==================================================================== */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field > span, .legend {
    font-size: .82rem;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.field em { color: var(--rose); font-style: normal; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], textarea {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    width: 100%;
    transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(200, 136, 155, .15);
}
textarea { resize: vertical; }

fieldset.field { border: 0; margin: 0; padding: 0; }
.radio {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 300;
    padding: 4px 0;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
    color: var(--ink);
}
.radio input { accent-color: var(--rose); width: 18px; height: 18px; }

/* ====================================================================
   NAPIT
==================================================================== */
.btn {
    display: inline-block;
    font: inherit;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 13px 30px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .82rem;
    transition: all .2s ease;
}
.btn-sm { padding: 9px 20px; font-size: .76rem; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose-dark); }

/* ====================================================================
   ILMOITUKSET
==================================================================== */
.flash {
    background: var(--rose-bg);
    border: 1px solid var(--rose-soft);
    color: var(--rose-dark);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}
.errors {
    background: #fbeee9;
    border: 1px solid #e9cabb;
    color: #9a4a2c;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
}
.errors p { margin: 4px 0; }

/* ====================================================================
   LAHJALISTA
==================================================================== */
.gift-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gift {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px 26px;
    flex-wrap: wrap;
}
.gift.is-reserved { opacity: .8; }
.gift-main { flex: 1 1 240px; }
.gift-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 500;
    margin: 0 0 6px;
    color: var(--ink);
}
.gift-desc { margin: 0 0 6px; color: var(--muted); }
.gift-link { color: var(--gold); text-decoration: none; font-size: .88rem; letter-spacing: .04em; }
.gift-link:hover { text-decoration: underline; }
.gift-side { flex: 0 0 auto; text-align: right; min-width: 150px; }
.gift-by { margin: 8px 0 0; font-size: .94rem; color: var(--ink); }

.badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.badge-promised { background: #f3ecd9; color: var(--gold); }
.badge-bought   { background: var(--rose-bg); color: var(--rose-dark); }

details.reserve > summary, details.release > summary {
    cursor: pointer;
    list-style: none;
}
details.reserve > summary::-webkit-details-marker,
details.release > summary::-webkit-details-marker { display: none; }
details.release > summary {
    color: var(--muted);
    font-size: .78rem;
    margin-top: 10px;
    text-decoration: underline;
}
.reserve-form, details.release form {
    margin-top: 14px;
    text-align: left;
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

/* ====================================================================
   HALLINTA
==================================================================== */
.admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 32px 0 8px;
}
.admin-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: 2.1rem;
    color: var(--ink);
    margin: 0;
    letter-spacing: .04em;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 18px 0 22px;
}
.stat {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
}
.stat-num {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4rem;
    color: var(--rose);
    line-height: 1;
}
.stat-lbl {
    font-size: .72rem;
    color: var(--ink-soft);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.diet-list { margin: 0; padding-left: 18px; }
.diet-list li { margin: 6px 0; }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.table th {
    font-weight: 400;
    color: var(--ink-soft);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .16em;
}
.row-declined { color: var(--muted); }

/* ====================================================================
   APULUOKAT & FOOTER
==================================================================== */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 26px; }

.site-foot {
    text-align: center;
    padding: 30px 20px 50px;
    color: var(--muted);
    font-size: .85rem;
    letter-spacing: .04em;
}

/* ====================================================================
   PAIKKA-LINKKI (Google Maps)
==================================================================== */
.place-link {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px dashed var(--gold-soft);
    padding-bottom: 1px;
    transition: color .15s ease, border-color .15s ease;
    display: inline-block;
}
.place-link:hover { color: var(--rose-dark); border-color: var(--rose); }
.place-arrow {
    color: var(--gold);
    margin-left: 4px;
    font-size: .9em;
    opacity: .8;
}

/* ====================================================================
   VIHJETEKSTI LOMAKKEEN LABEL-RIVILLÄ
==================================================================== */
.field > span .hint, .legend .hint, .hint {
    text-transform: none;
    letter-spacing: 0;
    font-size: .76rem;
    color: var(--muted);
    font-weight: 300;
    margin-left: 6px;
}
.guest-list .hint { display: block; margin: -2px 0 8px 0; }

/* ====================================================================
   SEURALAISLISTA (avec)
==================================================================== */
.guest-list { display: grid; gap: 10px; }
#guests { display: grid; gap: 10px; }

.guest-row {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 12px 12px 14px;
    display: grid;
    gap: 10px;
}
.guest-row-top {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}
.child-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--ink-soft);
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.child-check input { accent-color: var(--rose); width: 16px; height: 16px; }

.guest-remove {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all .15s ease;
}
.guest-remove:hover { color: var(--rose-dark); border-color: var(--rose); }

#add-guest { justify-self: start; margin-top: 4px; }

/* ====================================================================
   HALLINTA: per-vieras-näkymä
==================================================================== */
.people { display: grid; gap: 6px; min-width: 220px; }
.person { display: grid; gap: 1px; padding: 4px 0; }
.person + .person { border-top: 1px dashed var(--line); padding-top: 6px; }
.person-name { font-weight: 400; }
.person-diet { font-size: .82rem; color: var(--ink-soft); }
.tag-child {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--rose-bg);
    color: var(--rose-dark);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ====================================================================
   RESPONSIIVISUUS
==================================================================== */
@media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .gift-side { text-align: left; min-width: 0; width: 100%; }
    .card, .invite { padding: 26px 22px; }
    .invite-info { max-width: 100%; }
    .divider::before, .divider::after { width: 50px; }
    .invite .lead-event { letter-spacing: .4em; text-indent: .4em; }
}
