:root {
  --arch: 9999px 9999px 0 0; /* rundad överkant, rak nederkant */
  --ivory: #fbf9f5;
  --paper: #ffffff;
  --mist: #eef3f8;
  --sky: #dce6f0;
  --dusty: #7a98b8;
  --blue: #3e6390;
  --navy: #1e3553;
  --ink: #2b3440;
  --muted: #6b7482;
  --line: #d6dfe9;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 4px;
  --shadow: 0 10px 40px -18px rgba(30, 53, 83, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--navy); line-height: 1.15; margin: 0; }
[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dusty);
  margin: 0 0 0.9rem;
  font-weight: 400;
}

/* Ornament */
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 1.4rem auto; }
.ornament span { width: 64px; height: 1px; background: currentColor; opacity: 0.45; }
.ornament i { width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); opacity: 0.8; }

/* Knappar */
.btn {
  display: inline-block;
  font: 400 0.8rem/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  border: 1px solid var(--navy);
  background: transparent;
  padding: 1.05rem 2.3rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.btn:hover { background: var(--navy); color: #fff; }
.btn-solid { background: var(--navy); color: #fff; }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px); height: 64px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(251, 249, 245, 0.94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.brand { white-space: nowrap; font-family: var(--serif); font-size: 1.5rem; color: var(--navy); text-decoration: none; letter-spacing: 0.05em; }
.nav-links { display: flex; gap: clamp(14px, 2vw, 30px); align-items: center; }
.nav-links a {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--navy); text-decoration: none; padding: 6px 0; position: relative; white-space: nowrap;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--dusty); transform: scaleX(0); transition: transform 0.3s;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links .nav-cta { border: 1px solid var(--navy); padding: 8px 18px; border-radius: var(--radius); }
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { background: var(--navy); color: #fff; }
.nav-right { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang-switch button {
  all: unset; cursor: pointer; font-size: 0.68rem; letter-spacing: 0.14em; padding: 6px 9px; color: var(--navy);
  transition: background 0.2s, color 0.2s;
}
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button:hover { background: var(--mist); }
.lang-switch button[aria-pressed='true'] { background: var(--navy); color: #fff; }
.lang-switch button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 1px; background: var(--navy); margin: 6px 0; transition: transform 0.3s, opacity 0.3s; }

/* Hero */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 110px 16px 70px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(122, 152, 184, 0.18), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(62, 99, 144, 0.14), transparent 55%),
    var(--ivory);
}
.hero::before {
  content: ''; position: absolute; inset: clamp(14px, 3vw, 32px);
  border: 1px solid var(--line); pointer-events: none;
}
.hero.has-image { color: #fff; background-size: cover; background-position: center; }
.hero.has-image::before { border-color: rgba(255, 255, 255, 0.35); }
.hero.has-image h1, .hero.has-image .eyebrow, .hero.has-image .hero-date, .hero.has-image .hero-place { color: #fff; }
.hero.has-image .btn { color: #fff; border-color: #fff; }
.hero.has-image .btn:hover { background: #fff; color: var(--navy); }
.hero.has-image .countdown div { border-color: rgba(255,255,255,0.45); }
.hero.has-image .countdown small { color: rgba(255,255,255,0.8); }
.hero-inner { position: relative; max-width: 760px; color: var(--dusty); }
.hero h1 { font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 400; letter-spacing: 0.01em; line-height: 1; }
.hero h1 .amp { display: block; font-size: 0.75em; margin-bottom: -0.15em; font-style: italic; color: var(--dusty); font-weight: 400; line-height: 1; }
.hero.has-image h1 .amp { color: var(--sky); }
.hero-date { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--navy); margin: 0; }
.hero-place { letter-spacing: 0.24em; text-transform: uppercase; font-size: 0.78rem; color: var(--blue); margin: 0.4rem 0 0; }
.hero-text { font-family: var(--serif); font-style: italic; font-size: 1.3rem; max-width: 520px; margin: 1.6rem auto 0; color: inherit; }
.hero:not(.has-image) .hero-text { color: var(--muted); }
.countdown { display: flex; justify-content: center; gap: clamp(8px, 2vw, 18px); margin: 2.2rem 0 2.4rem; }
.countdown:empty { display: none; }
.countdown div {
  min-width: 74px; padding: 12px 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.countdown b { display: block; font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1; color: inherit; }
.hero:not(.has-image) .countdown b { color: var(--navy); }
.countdown small { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* Sektioner */
.section { padding: clamp(72px, 11vw, 130px) 16px; }
.section.alt { background: var(--mist); }
.container { max-width: 1100px; margin: 0 auto; }
.container.narrow { max-width: 720px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section-head h2 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 400; }
.section-head h2::after {
  content: ''; display: block; width: 7px; height: 7px; margin: 1.2rem auto 0;
  border: 1px solid var(--dusty); transform: rotate(45deg);
}
.lead { color: var(--muted); margin: 1.2rem 0 0; }
.rich p { margin: 0 0 1em; }
.rich p:last-child { margin-bottom: 0; }

/* Tidslinje */
.timeline { position: relative; max-width: 940px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: linear-gradient(var(--line), var(--dusty), var(--line));
}
.chapter { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; position: relative; margin-bottom: 72px; }
.chapter:last-child { margin-bottom: 0; }
.chapter::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px;
  background: var(--ivory); border: 1px solid var(--blue); transform: translate(-50%, -50%) rotate(45deg);
}
.chapter:nth-child(even) .chapter-media { order: 2; }
.chapter-media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: var(--arch); box-shadow: var(--shadow); }
.chapter.no-image .chapter-media { display: flex; justify-content: flex-end; }
.chapter.no-image:nth-child(even) .chapter-media { justify-content: flex-start; }
.chapter-date { font-family: var(--serif); font-style: italic; color: var(--dusty); font-size: 1.4rem; }
.chapter h3 { font-size: 2rem; margin: 0.2rem 0 0.8rem; }
.chapter-body p { color: var(--ink); }
.chapter.no-image .chapter-media .chapter-date { font-size: 3rem; }

/* Event (vigsel/fest) */
.event { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.event.reverse .event-media { order: 2; }
.event-media { position: relative; }
.event-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--arch); box-shadow: var(--shadow); }
.event-media::after {
  content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--dusty);
  border-radius: var(--arch); z-index: -1;
}
.event-media { z-index: 0; }
.event-placeholder {
  aspect-ratio: 4 / 5; border-radius: var(--arch); background: linear-gradient(160deg, var(--sky), var(--mist));
  display: grid; place-items: center; color: var(--blue); font-family: var(--serif); font-size: 1.4rem; font-style: italic;
}
.event-body .section-head { text-align: left; margin: 0 0 2rem; }
.event-body .section-head h2::after { display: none; }
.event-facts { display: grid; gap: 1.1rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.event-facts li { display: flex; gap: 14px; align-items: flex-start; }
.event-facts svg { flex: none; width: 22px; height: 22px; stroke: var(--blue); margin-top: 3px; }
.event-facts strong { display: block; font-weight: 500; color: var(--navy); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.schedule { border-top: 1px solid var(--line); margin: 2rem 0; padding: 0; list-style: none; }
.schedule li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.schedule time { font-family: var(--serif); font-size: 1.25rem; color: var(--blue); font-weight: 600; line-height: 1.4; }
.map { margin-top: clamp(40px, 6vw, 64px); }
.map iframe { width: 100%; height: 380px; border: 0; border-radius: var(--radius); filter: saturate(0.75) hue-rotate(-8deg); box-shadow: var(--shadow); }
.map-link { display: inline-block; margin-top: 0.8rem; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; }

/* Praktisk info */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.info-card {
  background: var(--paper); padding: 36px 30px; border-radius: var(--radius);
  text-align: center; border-top: 2px solid var(--blue); box-shadow: 0 1px 0 var(--line);
}
.info-card .icon {
  width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--mist); color: var(--blue);
}
.info-card .icon svg { width: 26px; height: 26px; stroke: currentColor; }
.info-card h3 { font-size: 1.55rem; margin-bottom: 0.7rem; }
.info-card p { color: var(--muted); font-size: 0.98rem; }

/* Personer */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 28px; justify-content: center; }
.people:has(> :only-child) { grid-template-columns: minmax(230px, 340px); }
.person { text-align: center; }
.person-photo {
  width: min(220px, 70%); aspect-ratio: 1; margin: 0 auto 22px; border-radius: 50%; overflow: hidden;
  outline: 1px solid var(--dusty); outline-offset: 7px; background: var(--sky);
  display: grid; place-items: center;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo .initials { font-family: var(--serif); font-size: 3rem; color: var(--blue); }
.person h3 { font-size: 1.7rem; }
.person .role { font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dusty); margin: 0.3rem 0 0.8rem; }
.person p { color: var(--muted); font-size: 0.98rem; margin: 0 0 0.6em; }
.person .contact { font-size: 0.9rem; color: var(--blue); }

/* OSA */
.rsvp-section {
  background:
    linear-gradient(rgba(30, 53, 83, 0.92), rgba(30, 53, 83, 0.92)),
    radial-gradient(ellipse at top, var(--blue), var(--navy));
  color: #e8eef5;
}
.rsvp-section .section-head h2 { color: #fff; }
.rsvp-section .section-head h2::after { border-color: var(--sky); }
.rsvp-section .eyebrow { color: var(--sky); }
.rsvp-section .lead { color: #c9d6e4; }
.deadline { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: #fff; margin: 0.8rem 0 0; }
.rsvp-card {
  background: var(--paper); color: var(--ink); padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  display: grid; gap: 22px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 6px; }
.field > span, .choice legend {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy); font-weight: 400;
}
input, textarea, select {
  font: inherit; font-weight: 300; color: var(--ink); width: 100%;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ivory);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(62, 99, 144, 0.15); }
input[type='radio'], input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; flex: none; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.choice legend { margin-bottom: 10px; padding: 0; }
.choice label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; flex: 1 1 200px;
  transition: border-color 0.2s, background 0.2s;
}
.choice label:has(input:checked) { border-color: var(--blue); background: var(--mist); }
.if-attending { display: grid; gap: 22px; }
.if-attending .field:first-child > span { font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--blue); }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.partner { display: grid; gap: 22px; padding: 22px; background: var(--mist); border-radius: var(--radius); }
.partner .choice label { background: var(--paper); }
.partner .choice label:has(input:checked) { background: var(--sky); }
.partner input, .partner textarea { background: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #a33a3a; background: #fbeeee; padding: 12px 16px; border-radius: var(--radius); margin: 0; }
.rsvp-card .btn { justify-self: center; min-width: 220px; }
.rsvp-done { text-align: center; color: var(--blue); }
.rsvp-done h3 { font-size: 2.2rem; }
.rsvp-done p { color: var(--muted); margin: 0; }

/* Footer */
.footer { text-align: center; padding: 60px 16px; color: var(--dusty); }
.footer p { margin: 0; font-family: var(--serif); font-size: 1.8rem; color: var(--navy); }
.footer .footer-date { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); margin-top: 0.4rem; }

/* Animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Mobil */
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--ivory); padding: 8px 0 20px; box-shadow: 0 12px 24px -12px rgba(30, 53, 83, 0.25);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
  }
  .nav-links a { padding: 14px; }
  .nav-links .nav-cta { margin-top: 8px; }
  .nav.open { background: var(--ivory); }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 920px) {
  .event, .chapter { grid-template-columns: 1fr; }
  .event.reverse .event-media, .chapter:nth-child(even) .chapter-media { order: 0; }
  .event-media::after { inset: 12px -10px -12px 10px; }
  .timeline::before, .chapter::before { display: none; }
  .chapter { gap: 24px; margin-bottom: 56px; }
  .chapter.no-image .chapter-media, .chapter.no-image:nth-child(even) .chapter-media { justify-content: flex-start; }
  .chapter.no-image .chapter-media .chapter-date { font-size: 2.2rem; }
  .chapter-media img { aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .countdown div { min-width: 62px; }
  .countdown b { font-size: 1.6rem; }
  .map iframe { height: 300px; }
  .event-media img, .event-placeholder { aspect-ratio: 4 / 3; }
}

/* Text om tal under brudfölje & toastmasters */
.people-note { max-width: 620px; margin: clamp(40px, 6vw, 60px) auto 0; text-align: center; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.2rem; }
.people-note:empty { display: none; }
