/* Samme palett og fonter som bryllupsalbumet (bilder.martius.no) */
@font-face { font-family: "Montserrat"; font-weight: 300; font-display: swap; src: url(fonts/montserrat-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url(fonts/montserrat-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant"; font-weight: 500; font-style: italic; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }

:root {
  --paper: #FFFFFF;
  --paper-2: #F6F8F4;
  --ink: #2C342E;
  --muted: #6B756C;
  --sage: #8A9F88;
  --sage-deep: #4F6352;
  --sage-soft: #EEF2EC;
  --line: #E3E7E0;
  --tile: #EEF1EC;
  --radius: 6px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Cormorant", "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141915;
    --paper-2: #1A201B;
    --ink: #ECEDE6;
    --muted: #A2ADA3;
    --sage: #9DB29A;
    --sage-deep: #B9CBB5;
    --sage-soft: #222B24;
    --line: #2B342D;
    --tile: #1E241F;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: radial-gradient(120% 50% at 50% 0%, var(--sage-soft) 0%, transparent 70%), var(--paper);
  background-repeat: no-repeat; background-color: var(--paper);
  color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

.chevron { display: block; width: 46px; height: 21px; margin: 24px auto 18px; }
.chevron path { fill: none; stroke: var(--sage); stroke-width: 2.2; stroke-linecap: round; }
.chevron.small { width: 34px; height: 15px; margin: 0 auto 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- Toppmeny ---------- */
.top { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; padding: calc(env(safe-area-inset-top, 0px) + 18px) 16px 0; }
.top a { font-size: .66rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.top a[aria-current="page"] { color: var(--sage-deep); border-bottom-color: var(--sage); }
@media (hover: hover) { .top a:hover { color: var(--ink); } }

/* ---------- Forside ---------- */
.home { max-width: 560px; margin: 0 auto; padding: 22px 16px 0; text-align: center; }
.portrait { border-radius: var(--radius); overflow: hidden; background: var(--tile); aspect-ratio: 2 / 3;
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.names { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 9vw, 2.8rem);
  line-height: 1.1; margin: 0 0 10px; animation: rise .9s .12s cubic-bezier(.2,.7,.2,1) both; }
.meta { margin: 0; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  animation: rise .9s .2s cubic-bezier(.2,.7,.2,1) both; }
.thanks { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.35rem, 5.4vw, 1.6rem);
  line-height: 1.3; margin: 26px 0 4px; animation: rise .9s .28s cubic-bezier(.2,.7,.2,1) both; }
.lead { margin: 0 auto 26px; max-width: 26rem; color: var(--muted); font-size: .9rem;
  animation: rise .9s .32s cubic-bezier(.2,.7,.2,1) both; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--sage-deep); color: var(--paper);
  padding: 13px 26px; font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-decoration: none;
  animation: rise .9s .34s cubic-bezier(.2,.7,.2,1) both; }
.btn:active { opacity: .85; }

@media (min-width: 900px) {
  .home { max-width: 1040px; display: grid; grid-template-columns: 440px 1fr; gap: 64px; align-items: center;
    padding-top: 48px; text-align: left; }
  .home .chevron { margin-left: 0; }
  .home .lead { margin-left: 0; }
}

/* ---------- Dagene ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 30px 16px 0; }
.page-head { text-align: center; }
.page-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.1; margin: 0 0 8px; }
.page-sub { margin: 0; font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

.day { margin-top: 38px; }
.day-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.day-num { font-size: .72rem; font-weight: 600; color: var(--sage); letter-spacing: .08em; }
.day-title { margin: 0; font-size: .9rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.day-date { margin-left: auto; font-size: .72rem; color: var(--muted); letter-spacing: .06em; }

.timeline { list-style: none; margin: 0; padding: 6px 0 0; }
.timeline li { display: grid; grid-template-columns: 5.6rem 1fr; gap: 14px; padding: 12px 0; position: relative; }
.timeline time { font-size: .78rem; font-weight: 500; color: var(--sage-deep); letter-spacing: .04em; padding-top: 1px; font-variant-numeric: tabular-nums; }
.timeline p { margin: 0; }
.timeline .note { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }

figure { margin: 30px 0 0; }
figure img { border-radius: var(--radius); background: var(--tile); width: 100%; }
figcaption { margin-top: 8px; font-size: .74rem; color: var(--muted); text-align: center; letter-spacing: .02em; }
.fig-map { max-width: 595px; margin-left: auto; margin-right: auto; }


/* ---------- Footer ---------- */
.foot { text-align: center; padding: 56px 16px calc(44px + env(safe-area-inset-bottom, 0px)); color: var(--muted); }
.foot-names { margin: 0; font-size: .76rem; letter-spacing: .26em; text-transform: uppercase; color: var(--ink); font-weight: 500; }
.foot-date { margin: 4px 0 0; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; }
.nw { white-space: nowrap; }

/* ---------- Før bryllupet ---------- */
.before { max-width: 1040px; margin: 72px auto 0; padding: 0 16px; }
.section-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-title { margin: 0; font-size: .82rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }
.section-note { margin-left: auto; font-size: .72rem; color: var(--muted); }
.glimt { columns: 3 140px; column-gap: 6px; }
.glimt a { display: block; margin-bottom: 6px; break-inside: avoid; border-radius: 3px; overflow: hidden; background: var(--tile); cursor: zoom-in; }
.glimt img { width: 100%; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .2s; }
@media (hover: hover) { .glimt a:hover img { transform: scale(1.025); } }
@media (min-width: 700px) { .glimt { columns: 4 180px; column-gap: 8px; } .glimt a { margin-bottom: 8px; } }
.lightbox { border: 0; padding: 0; margin: auto; background: transparent; max-width: 100vw; max-height: 100vh; outline: none; }
.lightbox::backdrop { background: rgba(16,20,17,.94); }
.lightbox img { max-width: 94vw; max-height: 88vh; max-height: 88svh; width: auto; border-radius: 3px; }
.lightbox button { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; width: 44px; height: 44px; border: 0; border-radius: 999px;
  background: rgba(30,37,32,.7); color: #F4F3EE; font-size: 22px; line-height: 1; cursor: pointer; }

/* ---------- Q&A ---------- */
.qa { margin-top: 32px; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 2px;
  font-weight: 500; font-size: .95rem; -webkit-tap-highlight-color: transparent; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; margin-left: auto; flex: none; width: 9px; height: 9px; border-right: 1.6px solid var(--sage); border-bottom: 1.6px solid var(--sage);
  transform: rotate(45deg) translateY(-3px); transition: transform .25s; }
.qa details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.qa .a { padding: 0 2px 18px; color: var(--muted); }
.qa .a p { margin: 0 0 8px; }
.qa .a a { color: var(--sage-deep); text-underline-offset: 3px; }
