/* Freja och Victor — public wedding site
   Palette taken from the printed save-the-date. */

:root {
  --rose: #dd99b4;
  --rose-d: #b8728b;
  --ink: #211e1c;
  --ink-soft: #5f5a53;
  --paper: #fffdfa;
  --rule: rgba(201, 133, 156, .32);
  --rule-soft: rgba(33, 30, 28, .1);
  --sage: #9db08a;

  /* Type scale: use these instead of new one-off sizes. */
  --fs-label: .82rem;      /* uppercase labels, small buttons */
  --fs-small: .95rem;      /* secondary text, captions, English lines */
  --fs-body: 1.05rem;      /* body text in panels and cards */
  --fs-eyebrow: clamp(.82rem, 1vw + 7px, 14.5px);
  --fs-lede: clamp(1.05rem, .5vw + .95rem, 1.2rem);
  --fs-title-s: clamp(1.15rem, 2.2vw, 1.45rem);
  --fs-title-m: clamp(1.3rem, 2.4vw, 1.8rem);

  --serif: "Cormorant Garamond", "EB Garamond", "Iowan Old Style",
           "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;

  /* Keep the whole meadow in view on wide screens instead of cropping the
     tops of the flowers; 18vw matches the artwork's visible height. */
  --meadow-h: max(clamp(240px, 40vh, 480px), 25vw);
  --ease: cubic-bezier(.19, .72, .19, 1);
  --shadow: 0 1px 2px rgba(58, 45, 36, .04),
            0 24px 60px -34px rgba(58, 45, 36, .3);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--paper);
  background-image:
    radial-gradient(120% 80% at 50% -10%, #fef9f9 0%, rgba(254, 249, 249, 0) 60%),
    radial-gradient(90% 70% at 100% 110%, #f9faf3 0%, rgba(249, 250, 243, 0) 62%),
    radial-gradient(80% 60% at 0% 100%, #fbf8fb 0%, rgba(251, 248, 251, 0) 60%);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Cotton-stock grain over the paper. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='.05'/%3E%3C/svg%3E");
}

img { max-width: 100%; }

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

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-small);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ── Navigation ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--rule-soft);
  background: rgba(255, 253, 250, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 13px 5vw;
}

.brand {
  flex: 0 0 auto;
  color: var(--rose-d);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  color: var(--ink-soft);
  font-size: var(--fs-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  border-bottom-color: var(--rule);
  color: var(--ink);
}

/* ── The meadow ─────────────────────────────────────────────────────────── */

.meadow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: var(--meadow-h);
  object-fit: cover;
  object-position: 50% 100%;
  pointer-events: none;
  user-select: none;
}

main { position: relative; z-index: 1; }

/* Meadow as a page footer band (st, st3): flows in the page, flowers grow from the footer line. */
.meadow-foot {
  position: relative;
  z-index: 0;
  height: var(--meadow-h);
  margin-top: clamp(24px, 5vw, 60px);
  pointer-events: none;
}


/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 8svh 6vw calc(var(--meadow-h) * .8);
  overflow: hidden;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  --w: min(88vw, 560px);
  width: var(--w);
  font-size: calc(var(--w) / 100);
  animation: settle 1200ms var(--ease) both;
}

.kicker {
  margin: 0;
  font-size: 4.35em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .051em;
  text-transform: uppercase;
  transform: translateX(.0255em);
}

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 7.34% 0 0;
  color: var(--rose);
  font-size: 1em;
  font-weight: 300;
  line-height: .98;
}

.name {
  display: inline-block;
  font-size: 7.19em;
  letter-spacing: .172em;
  text-transform: uppercase;
  transform: translateX(.086em);
}

.amp {
  display: block;
  margin: 1.73% 0 2.79%;
  color: var(--ink);
  font-family: var(--script);
  font-size: 6.13em;
  font-weight: 400;
  line-height: .8;
}

.date {
  margin: 4.84% 0 0;
  color: var(--rose);
  font-size: 6.14em;
  font-weight: 300;
  line-height: 1;
  letter-spacing: .209em;
  transform: translateX(.1045em);
}

.place {
  margin: 6.6% 0 0;
  font-size: max(3.85em, var(--fs-small));
  font-style: italic;
  font-weight: 300;
  line-height: 1;
  letter-spacing: .17em;
  transform: translateX(.085em);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 9%;
}

.hero-link {
  display: inline-block;
  padding-bottom: .18em;
  border-bottom: 1px solid var(--rule);
  color: var(--rose-d);
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  letter-spacing: .3em;
  text-indent: .3em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}
.hero-link:hover, .hero-link:focus-visible {
  border-color: rgba(33, 30, 28, .35);
  color: var(--ink);
}
.hero-link .arrow { display: inline-block; margin-left: .5em; text-indent: 0; }

@keyframes settle {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Section furniture ──────────────────────────────────────────────────── */

.section {
  position: relative;
  padding: clamp(64px, 9vw, 112px) 5vw;
  scroll-margin-top: 72px;
}
.section--tight { padding-top: clamp(34px, 5vw, 58px); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}
.narrow { max-width: 760px; }

.eyebrow {
  margin: 0 0 1.1em;
  color: var(--rose-d);
  font-size: var(--fs-eyebrow);
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
}

.section h2,
.page-title {
  margin: 0 0 .35em;
  font-size: clamp(1.7rem, 3.4vw + 1rem, 2.8rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: .01em;
}

.card { color: inherit; text-decoration: none; }
a.card { display: block; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
a.card:hover, a.card:focus-visible {
  border-color: rgba(201, 133, 156, .75);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -28px rgba(58, 45, 36, .5);
  outline: none;
}
a.card:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.lede {
  max-width: 58ch;
  margin: 0 0 1.1em;
  color: var(--ink-soft);
  font-size: var(--fs-lede);
  font-style: italic;
  line-height: 1.5;
}
.lede--en { color: rgba(95, 90, 83, .88); }
.lede strong { color: var(--ink); font-style: normal; font-weight: 400; }
.lede:last-child { margin-bottom: 0; }

/* ── Welcome ────────────────────────────────────────────────────────────── */

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(30px, 7vw, 88px);
}

.welcome-copy p { max-width: 54ch; }

.portrait {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 390px);
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 6% -5% -5% 7%;
  z-index: -1;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(221, 153, 180, .18), rgba(157, 176, 138, .16));
}
.portrait-clip {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: var(--shadow);
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait figcaption {
  margin-top: .85em;
  color: var(--rose-d);
  font-size: var(--fs-small);
  font-style: italic;
  text-align: center;
}

/* ── Facts ──────────────────────────────────────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 36px);
  margin: clamp(30px, 6vw, 58px) 0 0;
}
.fact {
  padding-top: 15px;
  border-top: 1px solid var(--rule);
}
.fact dt {
  margin: 0 0 .45em;
  color: var(--rose-d);
  font-size: var(--fs-label);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.fact dd {
  margin: 0;
  font-size: var(--fs-lede);
  line-height: 1.35;
}

/* ── Day cards ──────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(26px, 4vw, 42px);
}
.card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fffafb);
  box-shadow: var(--shadow);
}
.card .tag {
  display: block;
  margin-bottom: .8em;
  color: var(--rose-d);
  font-size: var(--fs-label);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.card h3 {
  margin: 0 0 .4em;
  font-size: var(--fs-title-s);
  font-weight: 400;
  line-height: 1.2;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-body);
  font-style: italic;
  line-height: 1.45;
}

.note {
  margin: clamp(22px, 4vw, 34px) 0 0;
  padding: 15px 18px;
  border-left: 2px solid rgba(157, 176, 138, .8);
  border-radius: 0 10px 10px 0;
  background: rgba(243, 246, 236, .48);
  color: var(--ink-soft);
  font-size: var(--fs-small);
  font-style: italic;
  line-height: 1.5;
}
.note a { color: var(--rose-d); }
.note a:hover, .note a:focus-visible { color: var(--ink); }

/* ── Practical information tabs ─────────────────────────────────────────── */

.info-tabs {
  display: grid;
  grid-template-columns: minmax(200px, .82fr) minmax(0, 1.18fr);
  gap: clamp(18px, 3vw, 30px);
  margin-top: clamp(24px, 4vw, 38px);
  align-items: start;
}

.info-tablist {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.info-tab {
  appearance: none;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.info-tab:hover {
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
}
.info-tab[aria-selected="true"] {
  border-color: var(--rule);
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  box-shadow: 0 12px 28px -24px rgba(58, 45, 36, .55);
}
.info-tab .tab-en {
  display: block;
  margin-top: .18em;
  color: var(--ink-soft);
  font-size: var(--fs-small);
  font-style: italic;
  letter-spacing: .02em;
}
.info-tab[aria-selected="true"] .tab-en { color: var(--rose-d); }

.info-panel {
  padding: clamp(22px, 3.2vw, 32px);
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fffafb);
  box-shadow: var(--shadow);
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.55;
}
.info-panel:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.info-panel p { margin: 0 0 .75em; }
.info-panel p:last-child { margin-bottom: 0; }
.info-panel .en { color: rgba(95, 90, 83, .9); font-style: italic; }
.info-panel .map-link { color: var(--rose-d); }
.info-panel .map-link:hover,
.info-panel .map-link:focus-visible { color: var(--ink); }

/* Sleeping on Alexandra — circular photo above the text. */
.info-panel[hidden] { display: none; }

.info-panel--photo { display: block; }

.alexandra-photo {
  width: min(70%, 264px);
  aspect-ratio: 1;
  margin: 0 auto 1.4em;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 50%;
  box-shadow: 0 16px 32px -26px rgba(58, 45, 36, .55);
}

.alexandra-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.alexandra-copy p:last-child { margin-bottom: 0; }

/* Airplane above the travel panel text. */
.resa-plane {
  width: min(58%, 210px);
  margin: 0 auto 1.2em;
}
.resa-plane img {
  display: block;
  width: 100%;
  height: auto;
}

.icon-credit {
  margin: 1em 0 0;
  color: rgba(95, 90, 83, .8);
  font-size: var(--fs-small);
  font-style: italic;
  line-height: 1.4;
}
.icon-credit a { color: var(--rose-d); }
.icon-credit a:hover,
.icon-credit a:focus-visible { color: var(--ink); }

/* ── RSVP ───────────────────────────────────────────────────────────────── */

.rsvp-section {
  padding-bottom: calc(var(--meadow-h) * .55 + 70px);
}

.rsvp-card {
  margin-top: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.rsvp-card iframe {
  display: block;
  width: 100%;
  height: 2150px;
  border: 0;
}

.rsvp-fallback {
  margin: 1.1em 0 0;
  color: var(--ink-soft);
  font-size: var(--fs-small);
  font-style: italic;
}
.rsvp-fallback a { color: var(--rose-d); }

/* ── Private gallery teaser ─────────────────────────────────────────────── */

.private-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px dashed var(--rule);
  border-radius: 16px;
  background: rgba(243, 246, 236, .38);
}
.private-card h2 {
  margin: 0 0 .35em;
  font-size: var(--fs-title-m);
  font-weight: 300;
  line-height: 1.15;
}
.private-card p {
  max-width: 58ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-body);
  font-style: italic;
  line-height: 1.5;
}
.private-card .button {
  flex: 0 0 auto;
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--rose-d);
  font-size: var(--fs-label);
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
}
.private-card .button:hover,
.private-card .button:focus-visible {
  border-color: rgba(201, 133, 156, .75);
  color: var(--ink);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer.site-footer {
  position: relative;
  z-index: 1;
  padding: 42px 5vw 54px;
  border-top: 1px solid var(--rule-soft);
  background: rgba(255, 253, 250, .72);
  text-align: center;
}
footer.site-footer p {
  margin: .45em 0;
  color: rgba(33, 30, 28, .62);
  font-size: var(--fs-small);
  font-style: italic;
}
footer.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 1.2em 0 .6em;
}
footer.site-footer nav a {
  color: var(--rose-d);
  font-size: var(--fs-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
}
footer.site-footer nav a:hover,
footer.site-footer nav a:focus-visible { color: var(--ink); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .welcome { grid-template-columns: 1fr; }
  .portrait { width: min(82%, 350px); order: -1; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .fact { padding: 14px 0; }
  .cards { grid-template-columns: 1fr; }
  .info-tabs { grid-template-columns: 1fr; gap: 14px; }
  .info-tablist {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .info-tab {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 15px;
    border-color: var(--rule);
    border-radius: 999px;
    white-space: nowrap;
    font-size: var(--fs-small);
  }
  .info-tab .tab-en { display: none; }
  .info-tab[aria-selected="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
}

@media (max-width: 620px) {
  .alexandra-photo {
    width: min(82%, 240px);
  }
  .resa-plane {
    width: min(74%, 220px);
  }
}

/* Narrow desktop / tablet windows: taller band, anchored to the right so the tall corner
   flowers show instead of the low middle of the meadow. */
@media (min-width: 621px) and (max-width: 1100px) {
  :root { --meadow-h: clamp(300px, 46vh, 460px); }
  .meadow { object-position: 94% 100%; }
}

@media (max-width: 620px) {
  :root { --meadow-h: clamp(230px, 38vh, 360px); }
  .meadow { object-position: 96% 100%; }
  .section { scroll-margin-top: 92px; }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px 14px;
    padding: 10px 5vw;
  }
  .brand { width: 100%; text-align: center; letter-spacing: .18em; }
  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    gap: 6px 16px;
  }
  .nav-links a { letter-spacing: .12em; }
  .hero { min-height: 100svh; padding: 5svh 5vw calc(var(--meadow-h) * .62); }
  .hero-inner { --w: 92vw; }
  .rsvp-card iframe { height: 2900px; }
  .private-card .button { width: 100%; text-align: center; }
}

/* ── Print ──────────────────────────────────────────────────────────────── */

@media print {
  @page { size: A4 portrait; margin: 0; }
  .meadow, body::after, .site-header, .rsvp-section, .private-section,
  .site-footer, .hero-links, .note { display: none; }
  body { background: #fff; }
  .hero { min-height: 297mm; padding: 0; }
  .hero-inner { --w: 210mm; font-size: 2.1mm; }
  .section { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-inner { animation: none; }
}
