/* Ulrik & Ailo – konfirmasjon 2026. Klassisk-elegant variant («alt»). */

/* Palett stemt etter portrettene: gyllen solnedgang, beige lin, marineblå dress,
   lyseblå skjorter. */
:root {
  --paper: #f8f1e4;
  --paper2: #f0e6d2;
  --card: #fffcf5;
  --ink: #22304a;
  --ink-soft: #3a4a68;
  --muted: #75706a;
  --gold: #b47a35;
  --gold-soft: #d09c55;
  --sky: #a9c3dd;
  --hairline: #e0d2b8;
  --hairline2: #eadfc9;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', sans-serif;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration-color: rgba(176, 137, 76, .5); }

/* ------------------------------------------------------------------- nav */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px;
  background: rgba(247, 243, 236, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline2);
}
.brand {
  font-family: var(--font-serif); font-weight: 600; font-size: 21px;
  color: var(--ink); text-decoration: none; letter-spacing: 1px;
}
.brand em { color: var(--gold); font-style: italic; }
.navlinks { display: flex; gap: 26px; flex-wrap: wrap; }
.navlinks a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500;
  font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
}
.navlinks a:hover { color: var(--gold); }

/* ------------------------------------------------------------------ hero */
.hero { text-align: center; padding: 84px 20px 30px; }
.kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}
.names {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(52px, 9vw, 96px);
  line-height: 1.05; color: var(--ink);
  margin-bottom: 22px;
}
.names em { font-style: italic; color: var(--gold-soft); font-weight: 400; }
.dateline {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 24px;
}
.dateline .rule { height: 1px; width: min(110px, 18vw); background: var(--hairline); }
.dateline p {
  font-size: 15px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500; white-space: nowrap;
}
.lede {
  max-width: 560px; margin: 0 auto 44px;
  font-size: 17.5px; color: var(--muted);
}

.portraits {
  display: flex; justify-content: center; gap: clamp(20px, 5vw, 56px);
  flex-wrap: wrap; margin-bottom: 46px;
}
.portrait figcaption {
  font-family: var(--font-serif); font-size: 24px; font-weight: 500;
  margin-top: 14px; letter-spacing: 1px;
}
.photo {
  width: min(290px, 42vw);
  background: #fff; padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--hairline2);
  box-shadow: 0 18px 44px rgba(34, 48, 74, .14);
}
.photo img {
  display: block; width: 100%;
  aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 8px;
}
.photo.wide { width: min(680px, 94vw); }
.photo.wide img { aspect-ratio: 4 / 3; }
.photo.tall { width: min(440px, 92vw); }
.photo.tall img { aspect-ratio: 3 / 4; }
.hero-cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 40px;
}

.orn { width: 220px; height: 20px; stroke: var(--gold-soft); fill: var(--gold-soft); opacity: .8; }
.orn line { stroke-width: 1; }

/* --------------------------------------------------------------- knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600;
  font-size: 12.5px; letter-spacing: 2.5px; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 6px;
  padding: 15px 32px;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--ink-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(35, 42, 54, .35); }
.btn-ghost:hover { background: rgba(35, 42, 54, .05); color: var(--ink); }
.btn-small { padding: 10px 20px; font-size: 11.5px; }
.btn-wide { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }

/* -------------------------------------------------------------- seksjoner */
.section { max-width: 960px; margin: 0 auto; padding: 74px 20px 6px; }
.sec-kicker {
  text-align: center; font-size: 12px; font-weight: 600;
  letter-spacing: 3.5px; text-transform: uppercase; color: var(--gold);
  margin-bottom: 12px;
}
.sec-title {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(32px, 5vw, 44px); line-height: 1.15;
  text-align: center; margin-bottom: 12px;
}
.sec-sub {
  text-align: center; color: var(--muted); font-size: 16px;
  max-width: 520px; margin: 0 auto 38px;
}

/* -------------------------------------------------------------- nedtelling */
.count-grid {
  display: flex; justify-content: center; align-items: stretch;
  gap: 0; flex-wrap: wrap; margin: 34px 0 30px;
}
.count-box {
  min-width: 120px; text-align: center; padding: 6px 26px;
  border-left: 1px solid var(--hairline);
}
.count-box:first-child { border-left: none; }
.count-box span {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(40px, 6vw, 58px); line-height: 1.1;
  display: block; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.count-box label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 2.5px;
}
.xpbar {
  max-width: 440px; height: 2px; margin: 0 auto 12px;
  background: var(--hairline2);
}
.xp-fill { height: 100%; width: 2%; background: var(--gold-soft); transition: width 1s; }
.xp-label { text-align: center; font-size: 13.5px; color: var(--muted); font-style: italic; font-family: var(--font-serif); font-size: 17px; }

/* ------------------------------------------------------------------- info */
.program-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 22px;
}
.program-card {
  background: var(--card);
  border: 1px solid var(--hairline2);
  border-top: 2px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 30px 30px 26px;
  box-shadow: 0 10px 28px rgba(35, 42, 54, .05);
  text-align: center;
}
.program-label {
  font-size: 11.5px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 10px;
}
.program-card h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 27px;
  margin-bottom: 10px;
}
.program-card p { font-size: 15px; color: var(--muted); }
.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.contact-card { grid-column: 1 / -1; }
.contact-row {
  display: flex; flex-wrap: wrap;
  gap: 8px 44px; align-items: baseline;
}
.info-card {
  background: var(--card);
  border: 1px solid var(--hairline2);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.info-card h4 {
  font-family: var(--font-serif); font-weight: 600; font-size: 19px;
  margin-bottom: 6px;
}
.info-card p { font-size: 14.5px; color: var(--muted); }
.info-card .contact { margin-bottom: 0; line-height: 1.55; }
.info-card .contact strong { color: var(--ink); font-weight: 600; }
.info-card .contact a { text-decoration: none; }
.info-card .contact a:hover { text-decoration: underline; }
.info-card .contact .mail { font-size: 13px; overflow-wrap: anywhere; }
.info-card .contact-note { font-size: 13.5px; }
.tbd {
  display: inline-block;
  background: rgba(194, 160, 101, .13); color: #8d6c34;
  border: 1px solid rgba(176, 137, 76, .3);
  padding: 0 9px; border-radius: 999px;
  font-weight: 500; font-size: .93em;
}

/* ----------------------------------------------------------------- skjema */
.panel {
  background: var(--card);
  border: 1px solid var(--hairline2);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(35, 42, 54, .06);
  padding: 34px;
}
.attend-choice { border: none; margin-bottom: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.attend-choice legend {
  font-size: 12px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.radio {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 12px 20px;
  cursor: pointer; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.radio:has(input:checked) {
  border-color: var(--ink);
  background: rgba(169, 195, 221, .18);
  box-shadow: 0 0 0 1px var(--ink) inset;
}
.radio input { accent-color: var(--ink); width: 16px; height: 16px; }
.field-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.field label { font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.field small { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  font-family: var(--font-sans); font-size: 15.5px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 8px;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--ink-soft);
  box-shadow: 0 0 0 3px rgba(169, 195, 221, .35);
}
::placeholder { color: #a9a495; }
.block-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 21px;
  margin: 16px 0 12px;
}
.block-title small { font-family: var(--font-sans); color: var(--muted); font-weight: 400; font-size: 13px; }
.guest-row {
  display: grid; grid-template-columns: 1.2fr .7fr 1.4fr auto;
  gap: 10px; margin-bottom: 10px;
}
.g-remove {
  background: transparent; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 8px;
  cursor: pointer; font-size: 15px; padding: 0 14px;
  transition: color .15s, border-color .15s;
}
.g-remove:hover { color: #b4553f; border-color: #b4553f; }
#add-guest { margin: 6px 0 20px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin-bottom: 12px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.privacy-note {
  font-size: 13px; color: var(--muted);
  border-left: 2px solid var(--gold-soft);
  padding-left: 13px; margin: 18px 0 14px;
}
.success { text-align: center; }
.success h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 34px;
  color: var(--ink); margin-bottom: 10px;
}
.success p { margin-bottom: 20px; color: var(--muted); }

/* ------------------------------------------------------------------ lobby */
.lobby { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; }
.guest-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--hairline2);
  border-radius: 999px; padding: 7px 18px 7px 8px;
  font-weight: 500; font-size: 14.5px;
  box-shadow: 0 4px 14px rgba(35, 42, 54, .05);
}
.mono {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-weight: 600; font-size: 13px;
  color: #fff;
  background: var(--gold-soft) !important;
}
.empty { text-align: center; color: var(--muted); width: 100%; font-style: italic; }

/* ------------------------------------------------------------------- vegg */
.wall-form { margin-bottom: 22px; padding: 22px; }
.wall-grid {
  grid-template-columns: minmax(140px, .6fr) minmax(200px, 1.6fr) auto;
  align-items: end; margin-bottom: 0;
}
.wall { display: grid; gap: 13px; }
.wall-post {
  background: var(--card);
  border: 1px solid var(--hairline2);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.wall-post.host {
  border-left: 3px solid var(--gold-soft);
  background: #fbf7ee;
}
.wall-post header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.wall-post strong { font-family: var(--font-serif); font-size: 18px; font-weight: 600; }
.host-badge {
  font-size: 10.5px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  background: rgba(194, 160, 101, .15); color: var(--gold);
  border: 1px solid rgba(176, 137, 76, .3);
  padding: 2px 10px; border-radius: 999px;
}
.wall-post time { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.wall-post p { font-size: 14.5px; color: var(--ink-soft); }

/* --------------------------------------------------------------- konfetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
.confetti i { position: absolute; top: -20px; border-radius: 1px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

/* ----------------------------------------------------------------- footer */
footer {
  text-align: center; padding: 80px 18px 54px; margin-top: 64px;
  border-top: 1px solid var(--hairline2);
  background: var(--paper2);
}
footer .orn { margin-bottom: 18px; }
.foot-title {
  font-family: var(--font-serif); font-weight: 500; font-size: 30px;
  margin-bottom: 8px;
}
footer p { color: var(--muted); font-size: 14.5px; }
.foot-small { margin-top: 8px; font-size: 13.5px; }

/* ------------------------------------------------------------------ mobil */
@media (max-width: 620px) {
  .brand { display: none; }
  .topnav { padding: 12px 10px; }
  .info-grid { grid-template-columns: 1fr; }
  .navlinks { width: 100%; justify-content: center; gap: 13px; }
  .navlinks a { font-size: 10.5px; letter-spacing: .8px; }
  .guest-row { grid-template-columns: 1fr .8fr auto; }
  .guest-row .g-allergy { grid-column: 1 / -1; }
  .wall-grid { grid-template-columns: 1fr; }
  .navlinks { gap: 14px; }
  .navlinks a { font-size: 11px; }
  .dateline p { font-size: 12.5px; letter-spacing: 1.5px; white-space: normal; }
  .count-box { min-width: 40vw; padding: 6px 10px; border-left: none; }
  .section { padding-top: 58px; }
  .panel { padding: 24px 18px; }
}
