/* ============================================================
   Anna ♥ — varm & elegant med lekfulla detaljer
   Mobil-först (iPhone), skalar upp fint på dator.
   ============================================================ */

:root {
  --cream:      #fff8f1;
  --cream-2:    #fdeee2;
  --ink:        #3a2b2e;
  --ink-soft:   #6b585a;
  --rose:       #c9786b;
  --rose-deep:  #a85a4e;
  --rose-soft:  #ecc4ba;
  --sea:        #2f7d8c;
  --sea-deep:   #173f49;
  --gold:       #c2a14a;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Nunito", system-ui, sans-serif;
  --hand:  "Caveat", cursive;

  --maxw: 640px;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(58, 43, 46, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(2.6rem, 11vw, 4.4rem); }
h2 { font-size: clamp(2rem, 8vw, 3rem); }

p { margin: 0 0 1.1em; }

a { color: var(--rose-deep); }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rose-deep);
  margin-bottom: 0.8em;
}
.kicker.light { color: var(--rose-soft); }

.accent-name { color: var(--rose); font-style: italic; }

.handwritten {
  font-family: var(--hand);
  font-size: clamp(1.5rem, 6vw, 2rem);
  color: var(--rose-deep);
  line-height: 1.2;
}
.handwritten.light { color: var(--rose-soft); }

.lead { font-size: 1.18rem; color: var(--ink-soft); }
.lead.light { color: rgba(255, 248, 241, 0.92); }
.center { text-align: center; }

.hidden { display: none !important; }

/* ---------- Knappar ---------- */
.btn {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: 999px;
  padding: 0.85em 1.8em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 8px 24px rgba(201, 120, 107, 0.4);
}
.btn-primary:hover { background: var(--rose-deep); }
.btn-primary:disabled {
  background: var(--rose-soft);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding-left: 0.6em;
  padding-right: 0.6em;
}

.btn-yes {
  background: #fff;
  color: var(--sea-deep);
  font-size: 1.2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}
.btn-yes:hover { transform: translateY(-2px); }

.btn-no {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.92rem;
  font-weight: 600;
}

/* ============================================================
   ÖPPEN DEL (intro, scrollas)
   ============================================================ */
.intro { display: block; }

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.4rem;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--cream-2) 0%, var(--cream) 60%);
}
.hero-inner { max-width: var(--maxw); }
.hero h1 { margin-top: 0.2em; }

.scroll-hint {
  margin-top: 3rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}
.scroll-hint .arrow {
  width: 1px; height: 36px;
  margin: 0.6rem auto 0;
  background: var(--ink-soft);
  position: relative;
  animation: bob 1.8s ease-in-out infinite;
}
.scroll-hint .arrow::after {
  content: ""; position: absolute; bottom: 0; left: -3px;
  width: 7px; height: 7px;
  border-right: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
  transform: rotate(45deg);
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.letter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.6rem 1rem;
  font-size: 1.18rem;
}
.letter-block { margin-bottom: 1.6rem; }

.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  line-height: 1.3;
  color: var(--rose-deep);
  text-align: center;
  margin: 2.6rem 0;
  padding: 0 0.5rem;
}

.continue-wrap { text-align: center; margin: 2.4rem 0 1rem; }
.hint-small { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.8rem; }

.intro-footer { text-align: center; padding: 2rem 0 3rem; }
.intro-footer .heart { color: var(--rose-soft); font-size: 1.4rem; }

/* ---------- Bilder / platshållare ---------- */
.photo {
  margin: 1.8rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.photo img { display: block; width: 100%; height: auto; }
.photo.wide { margin-left: 0; margin-right: 0; }

.photo-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--rose-deep);
  background:
    linear-gradient(135deg, var(--cream-2), var(--rose-soft));
}
.photo-placeholder.sea {
  color: #fff;
  background: linear-gradient(135deg, var(--sea), var(--sea-deep));
}

/* ============================================================
   KLICKA-VIDARE-DEL (skärmar)
   ============================================================ */
.app { min-height: 100svh; }

.screen { display: none; min-height: 100svh; padding: 3.2rem 1.4rem; }
.screen.active { display: flex; align-items: center; justify-content: center; }

.screen-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  animation: fadeUp 0.5s ease both;
}
.screen-inner.narrow { max-width: 460px; text-align: center; }
.screen-inner.center { text-align: center; }

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

/* Sea-skärmar (resa + avslut) */
.screen-sea {
  background: linear-gradient(160deg, var(--sea) 0%, var(--sea-deep) 100%);
  color: #fff;
}
.screen-sea h2.light, .light { color: #fff; }

/* ---------- Passerkod ---------- */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.4rem;
}
.gate-form input,
#dining-date {
  font-family: var(--sans);
  font-size: 1.1rem;
  padding: 0.85em 1em;
  border: 2px solid var(--rose-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  width: 100%;
}
.gate-form input:focus,
#dining-date:focus { outline: none; border-color: var(--rose); }

.error-msg { color: var(--rose-deep); margin-top: 1rem; font-weight: 600; }

/* ---------- Restaurang-kort ---------- */
.cards {
  display: grid;
  gap: 1rem;
  margin: 1.8rem 0;
}
.card {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: stretch;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.15s;
}
.card:active { transform: scale(0.99); }
.card input { position: absolute; opacity: 0; pointer-events: none; }
.card:has(input:checked) { border-color: var(--rose); }

.card-photo {
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cream-2), var(--rose-soft));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hand); color: var(--rose-deep);
  min-height: 96px;
}
.card-body { display: flex; flex-direction: column; gap: 0.25rem; text-align: left; }
.card-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.card-desc { font-size: 0.95rem; color: var(--ink-soft); }
.card-link { font-size: 0.9rem; font-weight: 700; margin-top: 0.2rem; }

.card-check {
  position: absolute;
  top: 0.7rem; right: 0.8rem;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--rose);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.card:has(input:checked) .card-check { opacity: 1; transform: scale(1); }

/* ---------- Nav ---------- */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
}
.nav-row:has(.btn:only-child) { justify-content: center; }

/* ---------- Resan: ja/nej ---------- */
.trip-choice {
  position: relative;
  min-height: 160px;
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
#trip-no {
  position: relative;
  transition: transform 0.18s ease;
  will-change: transform;
}

.big-heart {
  font-size: 4rem;
  color: #fff;
  animation: beat 1.4s ease-in-out infinite;
  margin-bottom: 0.4rem;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  40% { transform: scale(1); }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   STÖRRE SKÄRMAR (dator)
   ============================================================ */
@media (min-width: 720px) {
  .letter { padding-top: 4.5rem; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card { grid-template-columns: 110px 1fr; }
  .photo.wide { border-radius: 24px; }
}
