/* BJ Wine – offentlig side */
/* Skrifttyper hostes lokalt (ingen kald til Google) */
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  --paper: #f8f3eb;
  --paper-2: #efe6d8;
  --card: #fbf8f3;
  --wine: #561020;
  --wine-deep: #2f0710;
  --wine-mid: #6e1a2d;
  --gold: #c4914b;
  --gold-soft: #dcb77c;
  --gold-text: #85591f;
  --ink: #2a1b1d;
  --muted: #6a5a57;
  --line: #ddd2c2;
  --display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; }
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine-mid); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: 0; margin: 0; color: var(--wine); }
p { margin: 0 0 1em; }
address { font-style: normal; }
ul.plain { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--wine); color: var(--paper); padding: 10px 16px; z-index: 100; border-radius: var(--radius); }
.skip:focus { top: 12px; color: var(--paper); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 24px; }
.brand { font-family: var(--display); font-size: 2.05rem; font-weight: 600; color: var(--wine); text-decoration: none; letter-spacing: 0.01em; line-height: 1; }
.brand:hover { color: var(--wine); }
.nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.25s ease, color 0.2s;
}
.nav a:hover { background-size: 100% 1px; color: var(--wine); }
.nav a[aria-current="page"] { color: var(--wine); background-size: 100% 1px; }
.nav-toggle { display: none; }

/* ---------- Knapper ---------- */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
button.btn { font-family: inherit; line-height: inherit; cursor: pointer; background: transparent; }
.btn--gold { background: var(--gold-soft); color: var(--wine-deep); }
.btn--gold:hover { background: #e8c690; color: var(--wine-deep); }
.btn--ghost { border-color: rgba(248, 243, 235, 0.35); color: var(--paper); }
.btn--ghost:hover { border-color: var(--paper); color: var(--paper); }
.btn--wine { background: var(--wine); color: var(--paper); }
.btn--wine:hover { background: var(--wine-mid); color: var(--paper); }

/* ---------- Hero ---------- */
.hero { background: var(--wine); color: var(--paper); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 96px);
  align-items: end; padding-top: clamp(56px, 8vw, 104px);
}
.hero__copy { padding-bottom: clamp(56px, 8vw, 104px); }
.hero__title { color: var(--paper); font-size: clamp(4.2rem, 11vw, 9rem); font-weight: 400; line-height: 0.92; letter-spacing: -0.01em; }
.hero__since { font-variant-numeric: lining-nums; display: block; margin-top: 0.5em; font-size: clamp(1.5rem, 3vw, 2.3rem); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--gold-soft); }
.hero__lede { max-width: 30em; margin-top: 2em; font-size: 1.15rem; color: rgba(248, 243, 235, 0.86); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }

/* Buen: indgangen til kælderen. Billedet står direkte på hero-bunden. */
.arch-wrap { position: relative; width: min(100%, 420px); justify-self: end; }
.arch-wrap::before {
  content: ""; position: absolute; inset: -14px -14px 0; border: 1px solid rgba(220, 183, 124, 0.5); border-bottom: 0;
  border-radius: 999px 999px 0 0; pointer-events: none;
}
.arch { margin: 0; aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; overflow: hidden; background: var(--wine-deep); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .arch { animation: arch-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .arch-wrap::before { animation: fade-in 0.9s ease 0.7s both; }
}
@keyframes arch-rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Katalog ---------- */
.catalog { padding-block: clamp(56px, 8vw, 104px); }
.catalog__head { display: flex; align-items: baseline; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.catalog__head h2 { font-size: clamp(2.6rem, 5vw, 3.9rem); font-weight: 500; }
.catalog__head p { color: var(--muted); margin: 0; max-width: 34em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips a { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; text-decoration: none; color: var(--ink); transition: border-color 0.2s, background-color 0.2s; }
.chips a:hover { border-color: var(--gold); background: var(--card); }

.category { margin-top: 56px; }
.category__title { display: flex; align-items: baseline; gap: 20px; font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: 28px; }
.category__title::after { content: ""; order: 3; flex: 1; height: 1px; background: var(--line); align-self: center; }
.category__count { order: 2; font-family: var(--body); font-size: 0.9rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px; }

.wine { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.25s; }
.wine:hover { border-color: var(--gold); }
.wine__media { aspect-ratio: 3 / 4; overflow: hidden; background: #d9d3cb; }
.wine__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.wine:hover .wine__media img { transform: scale(1.035); }
.wine__body { padding: 20px 22px 24px; }
.wine__heading { font-size: 1.45rem; margin-bottom: 8px; }
.wine__title { all: unset; cursor: pointer; font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.15; color: var(--wine); letter-spacing: 0; }
.wine__title::after { content: ""; position: absolute; inset: 0; }
.wine__title:focus-visible::after { outline: 2px solid var(--gold-text); outline-offset: -4px; }
.wine__text { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty { color: var(--muted); padding-block: 32px; }

/* ---------- Dialog ---------- */
.dialog { width: min(920px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: var(--radius); background: var(--card); color: var(--ink); overflow: auto; }
.dialog::backdrop { background: rgba(47, 7, 16, 0.62); }
.dialog[open] { animation: dialog-in 0.22s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dialog__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; }
.dialog__img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; background: #d9d3cb; }
.dialog__body { padding: clamp(24px, 4vw, 48px); align-self: center; }
.dialog__title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.dialog__text { color: var(--ink); margin: 0; }
.dialog__line { display: block; }
.dialog__line--bullet { display: flex; gap: 0.6em; margin-top: 0.2em; }
.dialog__dot { flex: none; }
.dialog__line--gap { height: 0.7em; }
.dialog__close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(251, 248, 243, 0.9); color: var(--wine); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background-color 0.2s; }
.dialog__close:hover { background: var(--paper-2); }

/* ---------- Undersider ---------- */
.page-head { padding-block: clamp(56px, 8vw, 104px) clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(3.2rem, 8vw, 6rem); font-weight: 400; letter-spacing: -0.005em; }
.page-head__lede { margin-top: 20px; max-width: 32em; font-size: 1.2rem; color: var(--muted); }
.section { padding-block: 24px clamp(64px, 9vw, 112px); }
.split { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; }
.prose { max-width: 38em; }
.prose h2 { font-size: 2.1rem; margin: 1.6em 0 0.5em; }
.prose h2:first-child { margin-top: 0; }
.photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: #d9d3cb; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

.steps { list-style: none; counter-reset: step; margin: 0 0 1.5em; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; font-family: var(--display); color: var(--wine); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 6px; width: 1px; background: var(--line); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.panel h2 { font-size: 1.8rem; margin-bottom: 18px; }
.facts { margin: 0 0 24px; }
.facts div { padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: 0.85rem; color: var(--gold-text); font-weight: 600; }
.facts dd { margin: 2px 0 0; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 12px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wine-deep); color: rgba(248, 243, 235, 0.8); font-size: 0.95rem; }
.site-footer a { color: var(--paper); text-decoration-color: rgba(248, 243, 235, 0.35); transition: text-decoration-color 0.2s; }
.site-footer a:hover { color: var(--paper); text-decoration-color: var(--gold-soft); }
.site-footer__inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.site-footer__brand { font-family: var(--display); font-size: 2rem; font-weight: 600; color: var(--paper); margin-bottom: 8px; }
.site-footer__text { margin: 0; }
.site-footer__h { font-family: var(--body); font-size: 0.9rem; font-weight: 600; color: var(--gold-soft); letter-spacing: 0; margin-bottom: 10px; }
.site-footer li span { display: inline-block; min-width: 9.5em; }
.site-footer__legal { border-top: 1px solid rgba(248, 243, 235, 0.14); padding-block: 20px 28px; font-size: 0.85rem; color: rgba(248, 243, 235, 0.55); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.site-footer__legal p { margin: 0; }
.site-footer__cvr { margin: 10px 0 0; color: rgba(248, 243, 235, 0.6); font-size: 0.9rem; }

/* ---------- Responsivt ---------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; padding-top: 48px; }
  .hero__copy { padding-bottom: 8px; }
  .arch-wrap { justify-self: center; width: min(100%, 340px); margin-top: 24px; }
  .split, .split--even { grid-template-columns: 1fr; }
  .photo { aspect-ratio: 4 / 3; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .dialog__grid { grid-template-columns: 1fr; }
  .dialog__img { aspect-ratio: 4 / 3; max-height: 300px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; }
  .nav-toggle__bars, .nav-toggle__bars::before { display: block; width: 22px; height: 1.5px; background: var(--wine); content: ""; position: relative; transition: transform 0.2s; }
  .nav-toggle__bars::before { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(-7px) rotate(-90deg); top: 7px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; background: none; font-size: 1.05rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .wine__body { padding: 16px; }
  .wine__title, .wine__heading { font-size: 1.12rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Topbar + sticky header (som Lyn Logistik) ---------- */
.topbar { background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.topbar__inner { display: flex; justify-content: flex-end; gap: 24px; padding-block: 6px; }
.topbar a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.topbar a:hover { color: var(--wine); }
.site-header { position: sticky; top: 0; transition: box-shadow 0.25s; }
.site-header.is-scrolled { box-shadow: 0 1px 14px rgba(47, 7, 16, 0.1); }

/* ---------- Nøgletal under hero (som Johansen og Søn) ---------- */
.facts-strip { background: var(--wine-deep); color: var(--paper); }
.facts-strip__inner { display: grid; grid-template-columns: repeat(3, 1fr); margin-block: 0; }
.facts-strip__inner > div { padding: 22px 0 22px 24px; border-left: 1px solid rgba(220, 183, 124, 0.3); }
.facts-strip__inner > div:first-child { border-left: 0; padding-left: 0; }
.facts-strip dt { font-size: 0.85rem; color: var(--gold-soft); }
.facts-strip dd { margin: 0; font-variant-numeric: lining-nums; font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 400; line-height: 1.2; }

/* ---------- CTA-bånd ---------- */
.cta { background: var(--paper-2); border-top: 1px solid var(--line); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: clamp(36px, 5vw, 56px); }
.cta h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.cta p { margin: 6px 0 0; color: var(--muted); }
.cta .btn--gold { background: var(--wine); color: var(--paper); }
.cta .btn--gold:hover { background: var(--wine-mid); color: var(--paper); }

/* ---------- Kontaktoplysninger ---------- */
.contact-list { margin: 0 0 28px; }
.contact-list > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 0.9rem; font-weight: 600; color: var(--gold-text); padding-top: 3px; }
.contact-list dd { margin: 0; font-size: 1.15rem; line-height: 1.5; }
.contact-list address { font-style: normal; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--outline { border-color: var(--wine); color: var(--wine); }
.btn--outline:hover, button.btn--outline:hover { background: var(--wine); color: var(--paper); }

@media (max-width: 720px) {
  .topbar__inner { justify-content: space-between; gap: 12px; font-size: 0.8rem; }
  .facts-strip__inner > div { padding-left: 14px; }
}

/* Lining-tal til årgange og tider (Cormorant bruger ellers gamle tal) */
.wine__title, .dialog__title, .category__title, .brand, .site-footer__brand { font-variant-numeric: lining-nums; }

/* Footeren sidder altid i bunden, også på korte sider */
main { flex: 1 0 auto; }
.site-footer { margin-top: auto; flex-shrink: 0; }

/* ---------- Pris på kort og i pop-up ---------- */
.wine__body { flex: 1; display: flex; flex-direction: column; }
.wine__pricebar { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.wine__price { margin: 0; font-weight: 600; font-size: 1.02rem; color: var(--wine); }
.wine__note { margin: 0 0 0 auto; text-align: right; font-size: 0.85rem; line-height: 1.35; color: var(--muted); font-variant-numeric: lining-nums; }
.wine__price--ask { font-weight: 400; font-size: 0.9rem; color: var(--muted); }
.dialog__pricebar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 16px; }
.dialog__note { margin: 0; font-size: 0.95rem; color: var(--muted); font-variant-numeric: lining-nums; }
.dialog__price { margin: 0; font-family: var(--display); font-size: 1.9rem; font-weight: 500; line-height: 1; color: var(--wine); font-variant-numeric: lining-nums; }
.dialog__price.is-ask { font-family: var(--body); font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.dialog__notes { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Aldersgrænse og køb ---------- */
.age { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 0.95rem; }
.age__badge { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--wine); border-radius: 50%; font-size: 0.78rem; font-weight: 600; color: var(--wine); }
.order-note { margin: 0 0 14px; font-size: 0.95rem; color: var(--muted); }
.highlight { background: var(--gold-soft); color: var(--wine-deep); padding: 1px 7px; border-radius: 3px; font-weight: 600; text-decoration: none; transition: background-color 0.2s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
a.highlight:hover { background: #e8c690; color: var(--wine-deep); }
.notice { grid-column: 1 / -1; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); }
.notice h2 { font-size: 1.8rem; margin-bottom: 10px; }
.notice .order-note { color: var(--ink); font-size: 1.02rem; margin-bottom: 18px; }
.notice .age { margin-bottom: 0; }

/* ---------- "Se flere vine": fold ud med fade ---------- */
.more-bar { display: flex; justify-content: center; margin-top: 36px; }
html:not(.js) .more-bar { display: none; }

.js .more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.5s ease; }
.js .more.is-open { grid-template-rows: 1fr; opacity: 1; }
.js .more__inner { overflow: hidden; min-height: 0; }
.category--cont { margin-top: 28px; }

/* Nederste række i forhåndsvisningen: den nederste halvdel toner helt væk (også kantlinjen).
   Udtoningen er en maske, hvis start (--fa) og slutning (--fb) glider nedad og ud af kortet,
   når listen folder ud. Toppen af kortene forbliver tydelig hele vejen. */
@property --fa { syntax: "<percentage>"; inherits: false; initial-value: 24%; }
@property --fb { syntax: "<percentage>"; inherits: false; initial-value: 76%; }
.js .wine.is-faded {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 var(--fa), transparent var(--fb));
  mask-image: linear-gradient(to bottom, #000 0%, #000 var(--fa), transparent var(--fb));
  transition: border-color 0.25s, --fa 0.8s ease, --fb 0.8s ease;
}
.js .catalog-list.is-open .wine.is-faded { --fa: 100%; --fb: 135%; }

/* Knappen trækkes op i den udtonede halvdel, så der ikke opstår et tomt hul */
.js .more-bar { position: relative; z-index: 3; transition: margin-top 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .catalog-list:not(.is-open) .more-bar { margin-top: -125px; }
button.btn.more-btn { background: var(--paper); }
button.btn.more-btn:hover { background: var(--wine); color: var(--paper); }
@media (max-width: 720px) { .js .catalog-list:not(.is-open) .more-bar { margin-top: -100px; } }

/* Note under åbningstider */
.hours-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.hours-note a { color: var(--wine); }
.site-footer__note { margin: 12px 0 0; font-size: 0.9rem; color: rgba(248, 243, 235, 0.65); }
