/* =========================================================
   Alexandra & Jesper – 10 juli 2027
   Ljust tema · skogsgröna detaljer · handritade inslag
   ========================================================= */

:root {
  --bg:        #faf7f1;  /* varm ljus botten */
  --bg-tint:   #eef0e6;  /* svagt gröntonad sektion */
  --ink:       #2f3a2f;  /* mörk skogston för text */
  --green:     #2e5339;  /* skogsgrön – huvudaccent */
  --green-soft:#5d8265;
  --green-pale:#c9d6c5;
  --gold:      #b98b4e;  /* varm detalj (stjärnor, badges) */
  --card:      #ffffff;
  --shadow:    0 6px 24px rgba(47, 58, 47, .08);
  --radius:    14px;
  --serif:  "Cormorant Garamond", Georgia, serif;
  --hand:   "Caveat", cursive;
  --sans:   "Karla", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
[hidden] { display: none !important; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }
a { color: var(--green); }
.amp { font-family: var(--serif); font-style: italic; }
.muted { color: #75806f; font-size: .9em; }
.center { text-align: center; max-width: 640px; margin-inline: auto; }

.handwritten {
  font-family: var(--hand);
  color: var(--green-soft);
  font-size: 1.6rem;
  line-height: 1.2;
}
.inline-script { font-size: 1.25rem; white-space: nowrap; }

/* ---------- Handritade dekorationer ---------- */
.doodle-divider {
  display: block;
  width: 200px;
  margin: .8rem auto 1.6rem;
  overflow: visible;
}
.doodle-divider path {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: .75;
}
.doodle-divider .doodle-heart { fill: var(--green); stroke: none; opacity: .9; }

/* ---------- Meny ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.4rem;
  background: rgba(250, 247, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(46, 83, 57, .12);
}
.nav__logo {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
  color: var(--green); text-decoration: none; letter-spacing: .05em;
}
.nav__links { display: flex; gap: 1.4rem; list-style: none; }
.nav__links a {
  text-decoration: none; color: var(--ink);
  font-size: .95rem; letter-spacing: .04em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav__links a:hover { color: var(--green); border-bottom-color: var(--green-pale); }

.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav__burger span {
  display: block; width: 24px; height: 2px; margin: 5px 0;
  background: var(--green); border-radius: 2px; transition: transform .25s, opacity .25s;
}

@media (max-width: 760px) {
  .nav__burger { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid rgba(46, 83, 57, .12);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav__links.open { max-height: 340px; }
  .nav__links li { text-align: center; }
  .nav__links a { display: block; padding: .8rem; border-bottom: 0; }
  .nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.open span:nth-child(2) { opacity: 0; }
  .nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 1.2rem 9rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 214, 197, .5), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero__inner { max-width: 760px; }
.hero__pre { font-size: 2rem; margin-bottom: .4rem; }
.hero__names {
  font-size: clamp(2.6rem, 8vw, 5rem);
  color: var(--green);
  font-weight: 500;
}
.hero__date {
  font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 2rem;
}
.hero__mountains {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: 130px;
}
.hero__mountains .m-back  { fill: var(--green-pale); opacity: .6; }
.hero__mountains .m-front { fill: var(--green); opacity: .16; }
.hero__mountains .m-trees path {
  fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; opacity: .55;
}

/* Nedräkning */
.countdown {
  display: flex; justify-content: center; gap: .8rem;
  margin-bottom: 2.2rem; flex-wrap: wrap;
}
.countdown__item {
  background: var(--card);
  border: 1.5px solid var(--green-pale);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 84px; padding: .8rem .6rem;
}
.countdown__item span {
  display: block; font-family: var(--serif);
  font-size: 2rem; font-weight: 600; color: var(--green);
  font-variant-numeric: tabular-nums;
}
.countdown__item small {
  text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; color: #75806f;
}

/* ---------- Knappar ---------- */
.btn {
  display: inline-block;
  padding: .8rem 2rem;
  border-radius: 999px;
  border: 2px solid var(--green);
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .05em;
  text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s, color .2s;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(46, 83, 57, .28); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost:hover { background: var(--green); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Sektioner ---------- */
.section { padding: 5rem 1.2rem; }
.section--tinted { background: var(--bg-tint); }
.section--narrow { max-width: 680px; margin-inline: auto; text-align: center; }
.section__inner { max-width: 1060px; margin-inline: auto; }
.section__inner--narrow { max-width: 620px; }
.section__title {
  text-align: center;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  color: var(--green);
}
.sub-title { text-align: center; font-size: 1.5rem; margin: 3rem 0 1.4rem; color: var(--green); }
.lead { font-size: 1.12rem; }
.lead-script { font-size: 2.2rem; margin-bottom: .6rem; }
.badge {
  font-family: var(--hand); font-size: 1.05rem; color: var(--gold);
  border: 1.5px dashed var(--gold); border-radius: 999px;
  padding: .05rem .7rem; vertical-align: middle; margin-left: .4rem;
}

/* ---------- Vigsel & fest ---------- */
.venue {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  align-items: center; margin-top: 1.5rem;
}
.venue__info h3 { font-size: 1.9rem; color: var(--green); }
.venue__info p { margin-bottom: .8rem; }
.venue__script { font-size: 1.7rem; }
.venue__map {
  height: 320px; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1.5px solid var(--green-pale);
}
@media (max-width: 760px) { .venue { grid-template-columns: 1fr; } }

.timeline {
  list-style: none; max-width: 560px; margin: 0 auto;
  border-left: 2.5px dashed var(--green-pale);
  padding-left: 1.6rem;
}
.timeline li { position: relative; padding-bottom: 1.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: -2.22rem; top: .45rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--green);
}
.timeline .tl-tid {
  font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--green);
  margin-right: .5rem;
}
.timeline .tl-titel { font-weight: 600; }
.timeline p { color: #5c665a; font-size: .95rem; }
.dresscode { text-align: center; margin-top: 2rem; font-size: 1.05rem; }

/* ---------- OSA ---------- */
.osa-pending, .osa-done { text-align: center; padding: 2rem 0; }
.osa-pending__script, .osa-done__script { font-size: 2.4rem; }
.osa-pending p, .osa-done p { margin-bottom: 1.2rem; }

.osa-form {
  background: var(--card);
  border: 1.5px solid var(--green-pale);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: grid; gap: 1.3rem;
  margin-top: 1.5rem;
}
.osa-form label { display: block; font-weight: 600; font-size: .95rem; }
.osa-form input[type="text"], .osa-form textarea {
  width: 100%; margin-top: .4rem;
  padding: .75rem .9rem;
  border: 1.5px solid var(--green-pale); border-radius: 10px;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--bg);
  transition: border-color .2s;
}
.osa-form input:focus, .osa-form textarea:focus {
  outline: none; border-color: var(--green);
}
.osa-form fieldset { border: 0; }
.osa-form legend { font-weight: 600; font-size: .95rem; margin-bottom: .5rem; }
.osa-form .radio {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 400; padding: .35rem 0; cursor: pointer;
}
.radio input { accent-color: var(--green); width: 18px; height: 18px; }
.osa-status { text-align: center; font-size: .95rem; min-height: 1.4em; }
.osa-status.error { color: #a4442f; }

/* ---------- Boende ---------- */
.chip {
  padding: .45rem 1.2rem; border-radius: 999px;
  border: 1.5px solid var(--green); background: transparent;
  color: var(--green); font-family: var(--sans); font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: background .2s, color .2s;
}
.chip:hover { background: var(--green-pale); }
.chip--active { background: var(--green); color: #fff; }

.boende-map {
  height: 420px; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1.5px solid var(--green-pale);
  margin-bottom: 2rem;
}
@media (max-width: 600px) { .boende-map { height: 320px; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--card);
  border: 1.5px solid var(--green-pale);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(47, 58, 47, .14); }
.card--active { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), var(--shadow); }
.card h3 { font-size: 1.35rem; color: var(--green); margin-top: .2rem; }
.card__ort {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #75806f;
}
.card__avstand { font-size: .9rem; font-weight: 600; color: var(--green-soft); }
.card p { font-size: .95rem; flex-grow: 1; }
.card a { font-weight: 600; text-decoration: none; }
.card a:hover { text-decoration: underline; }
.card__tag {
  position: absolute; top: -14px; right: 14px;
  font-family: var(--hand); font-size: 1.15rem; font-weight: 600;
  background: var(--gold); color: #fff;
  padding: .1rem .9rem; border-radius: 999px;
  transform: rotate(3deg);
  box-shadow: 0 3px 10px rgba(185, 139, 78, .4);
}
.card--forslag { border-color: var(--gold); }

/* Handritad kartnål */
.pin svg { overflow: visible; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.leaflet-container { font-family: var(--sans); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { font-family: var(--sans); }
.leaflet-popup-content b { font-family: var(--serif); font-size: 1.05rem; color: var(--green); }

/* ---------- Reseguide ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1.8rem 0; }
.guide-panels { max-width: 760px; margin-inline: auto; }
.guide-panel[hidden] { display: none; }
.guide-intro { text-align: center; font-size: 1.35rem; margin-bottom: 1rem; }
.guide-item {
  background: var(--card);
  border: 1.5px solid var(--green-pale);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin-bottom: .9rem;
}
.guide-item h4 { font-family: var(--serif); font-size: 1.25rem; color: var(--green); }
.guide-item p { font-size: .96rem; }
.guide-item a { font-weight: 600; font-size: .9rem; }

/* ---------- Hitta hit ---------- */
.travel-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem; margin-top: 2rem;
}
.travel-card {
  background: var(--card);
  border: 1.5px solid var(--green-pale);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem; text-align: center;
}
.travel-card .t-ikon { font-size: 2.2rem; display: block; margin-bottom: .5rem; }
.travel-card h3 { font-size: 1.3rem; color: var(--green); margin-bottom: .4rem; }
.travel-card p { font-size: .93rem; text-align: left; }

/* ---------- Bra att veta (dragspel) ---------- */
.accordion { margin-top: 1.5rem; }
.acc-item {
  background: var(--card);
  border: 1.5px solid var(--green-pale);
  border-radius: 12px;
  margin-bottom: .8rem; overflow: hidden;
}
.acc-item summary {
  cursor: pointer; list-style: none;
  padding: 1rem 1.3rem;
  font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--green);
  display: flex; justify-content: space-between; align-items: center;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after { content: "+"; font-size: 1.4rem; transition: transform .2s; }
.acc-item[open] summary::after { transform: rotate(45deg); }
.acc-item .acc-body { padding: 0 1.3rem 1.1rem; font-size: .96rem; }

/* ---------- Sidfot ---------- */
.footer {
  background: var(--green); color: #eef0e6;
  text-align: center; padding: 3.5rem 1.2rem 2.5rem;
}
.footer__trees { width: 130px; margin-bottom: .6rem; }
.footer__trees path {
  fill: none; stroke: #c9d6c5; stroke-width: 2; stroke-linecap: round; opacity: .8;
}
.footer__script { color: #c9d6c5; font-size: 1.9rem; }
.footer__names { font-family: var(--serif); font-size: 1.3rem; margin: .3rem 0 .6rem; }
.footer__contact { font-size: .9rem; opacity: .85; }
.footer a { color: #fff; }

/* ---------- Scroll-animering (bara när JS är aktivt) ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
