/* ------------------------------------------------------------
   Blåtur 2027 – felles tema
   Palett: beige · sort · hvit.
   Fonter: Archason (overskrifter, tall; Italiana som reserve) + Manrope (tekst).
   Fontene ligger i /fonts og lastes herfra – ingen Google-kobling.
   ------------------------------------------------------------ */

/* Archason (kjøpt webfont, MyFonts/Rockboys Studio): legg filen i /fonts/archason.woff2
   så tas den i bruk automatisk. Inntil da brukes Italiana, som ligger stilmessig nær. */
@font-face { font-family: "Archason"; font-weight: 400; font-display: swap;
  src: url(/fonts/archason.woff2) format("woff2"); }
@font-face { font-family: "Italiana"; font-weight: 400; font-display: swap;
  src: url(/fonts/italiana-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 300; font-display: swap; src: url(/fonts/manrope-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(/fonts/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(/fonts/manrope-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #f3eee6;        /* beige bakgrunn */
  --bg-soft: #e8e1d4;   /* dypere beige, valgt tilstand */
  --white: #ffffff;
  --ink: #1c1a17;
  --ink-soft: #4f4a43;
  --line: rgba(28, 26, 23, 0.18);

  --serif: "Archason", "Italiana", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { min-height: 100vh; padding: 28px 24px 80px; }

.topbar { max-width: 520px; margin: 0 auto 72px; }
.wordmark { font-family: var(--serif); font-size: 19px; color: var(--ink); }
.wordmark em { font-style: normal; }

.page { width: 100%; }
.page > * { max-width: 520px; margin-left: auto; margin-right: auto; }
.page.wide > * { max-width: 880px; }
.page.wide ~ .topbar, .wide-top { max-width: 880px; }

/* Typografi */
h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  margin: 0;
}
h1 { font-size: clamp(52px, 9vw, 76px); line-height: 1; letter-spacing: 0.01em; }
h2 { font-size: clamp(36px, 6vw, 50px); line-height: 1.05; }
h1 em, h2 em { font-style: normal; }

.hero { margin-bottom: 56px; }
.hero h1 { margin-bottom: 18px; }
.intro { margin: 0; color: var(--ink-soft); max-width: 40ch; font-size: 16px; }
.muted { color: var(--ink-soft); font-size: 14px; }

.kicker, legend, .field > span, th {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.kicker { margin: 0 0 14px; }

/* Felt */
.field { display: block; }
.field > span { display: block; margin-bottom: 2px; }

input[type="text"],
input[type="password"] {
  width: 100%;
  font: inherit;
  font-family: var(--serif);
  font-size: 20px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  transition: border-color .3s;
}
input:focus { outline: none; }
input[type="text"]:focus,
input[type="password"]:focus { border-bottom-color: var(--ink); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 48px; }
@media (max-width: 440px) { .row { grid-template-columns: 1fr; gap: 24px; } }

fieldset { border: 0; padding: 0; margin: 0 0 32px; }
legend { padding: 0; margin-bottom: 14px; }

/* Datobokser */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 440px) { .options { grid-template-columns: 1fr; } }

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--white);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.option:hover { transform: translateY(-2px); }

/* Tynn sort ramme som "tegnes" rundt kortet, og en skygge som løfter det */
.option::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--ink);
  opacity: 0;
  transform: scale(.985);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
  pointer-events: none;
}
.option:has(input:checked)::before { opacity: 1; transform: scale(1); }
.option:has(input:checked) { box-shadow: 0 14px 30px -18px rgba(28, 26, 23, .35); }

.option input { position: absolute; opacity: 0; width: 0; height: 0; }

.option-days {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 8vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.option-month {
  font-family: var(--serif);
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.1;
  margin: 2px 0 16px;
}
.option-dates { font-size: 13px; color: var(--ink-soft); padding-right: 56px; }

/* Sirkel oppe til høyre: tom → fylt sort med hvit hake */
.option-check {
  position: absolute;
  top: 20px; right: 20px;
  width: 24px; height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .35s var(--ease);
}
.option-check svg { opacity: 0; transform: scale(.4); transition: opacity .25s var(--ease), transform .35s var(--ease); }
.option:has(input:checked) .option-check { background: var(--ink); border-color: var(--ink); transform: scale(1.08); }
.option:has(input:checked) .option-check svg { opacity: 1; transform: scale(1); }

/* Liten "Valgt"-etikett som glir inn nederst til høyre */
.option-tag {
  position: absolute;
  right: 20px; bottom: 20px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.option:has(input:checked) .option-tag { opacity: 1; transform: translateY(0); }

.option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.hint { margin: -8px 0 14px; font-size: 13px; color: var(--ink-soft); }
.picked {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink);
  min-height: 1.4em;
  opacity: 0;
  transition: opacity .3s;
}
.picked.show { opacity: 1; }

/* Notis */
.note { margin: 0 0 36px; color: var(--ink-soft); font-size: 14px; }

/* Knapp: pilleform, lys flate glir inn ved hover, pilen flytter seg */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  padding: 18px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  transition: color .4s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--white);
  transform: translateX(-102%);
  transition: transform .5s var(--ease);
  z-index: -1;
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: translateX(0); }
.btn-arrow { display: inline-block; font-family: var(--serif); font-size: 20px; line-height: 1; transition: transform .5s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(8px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:disabled::before { transform: translateX(-102%); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); margin-top: 28px; }
.btn-ghost::before { background: var(--white); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.deadline { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }

.error { margin: 0 0 20px; font-size: 14px; color: var(--ink); }

.confirmation h2 { margin-bottom: 18px; }
.confirmation p { margin: 0 0 10px; }
.confirmation .muted { margin-top: 20px; }

/* ---------- Admin ---------- */
table { width: 100%; border-collapse: collapse; font-size: 15px; font-weight: 400; }
th, td { text-align: left; padding: 16px 10px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 44px 0 36px; }
.stat { padding: 24px 26px; background: var(--white); border-radius: var(--radius); }
.stat .num { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: .9; }
.stat .lbl { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .btn { width: auto; padding: 11px 20px; gap: 10px; }
.toolbar .btn-ghost { margin: 0; }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--white);
  font-size: 13px;
}
#login { max-width: 360px; }

/* "Ingen av datoene passer" */
.link-btn {
  display: inline-block;
  width: auto;
  margin-top: 16px;
  padding: 0 0 2px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: opacity .2s;
}
.link-btn:hover { opacity: .6; }

/* ---------- To steg: navn først, deretter datoer ---------- */
.nowrap { white-space: nowrap; }

.hero, .hero h1, .names, .field > span, .names input {
  transition: font-size .5s var(--ease), margin .5s var(--ease), padding .5s var(--ease), opacity .4s var(--ease);
}

/* Steg 1 – stor invitasjon og store navnefelt */
[data-step="1"] .hero { margin-bottom: 44px; }
[data-step="1"] .hero h1 { font-size: clamp(44px, 7.5vw, 66px); line-height: 1.05; margin-bottom: 18px; }
[data-step="1"] .names { display: grid; gap: 24px; margin-bottom: 36px; }
[data-step="1"] .names input { font-size: 30px; padding: 12px 0; border-bottom-color: var(--ink); }
[data-step="1"] .step2 { display: none; }

/* Steg 2 – alt rykker opp og blir kompakt */
[data-step="2"] .step1-only { display: none; }
[data-step="2"] .hero { margin-bottom: 28px; }
[data-step="2"] .hero h1 { font-size: 26px; line-height: 1.2; margin: 0; }
[data-step="2"] .names { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 48px; }
@media (max-width: 440px) { [data-step="2"] .names { grid-template-columns: 1fr; gap: 24px; } }
[data-step="2"] .names input { font-size: 20px; padding: 8px 0; }
[data-step="2"] .step2 { animation: rise .6s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
