/* tastemaker: macro=6-gallery-grid nav=N7 hero=H3 feature=F7 proof=none cta=C2 footer=Ft1 head=S1
   mood=warm palette=handpicked-after-3-warm-seeds contrast=matrix-verified
   critique: show-dont-tell 4, philosophy 4, hierarchy 4, specificity 5, restraint 4, variety 4
   Fotokreditering: se assets/img/CREDITS.txt */

/* ==========================================================================
   Apex Barber, Møllergade 12, 5700 Svendborg
   Farver og skrift styres herunder. Se .tastemaker/style-lock.md for reglerne.
   ========================================================================== */

:root {
  /* Farver. Kontrastforholdene er verificeret, se style-lock.md */
  --text:       #1C1B17;
  --bg:         #FBFAF5;
  --surface:    #F1EFE6;
  --primary:    #14654A;  /* dyb grøn */
  --on-primary: #FFFFFF;
  --accent:     #9A6A0E;  /* mørk okker */
  --highlight:  #E8B33C;  /* lys okker. Kun som fyld, altid med --text ovenpå */
  --border:     #E2DFD3;
  --muted:      #5C594E;

  /* Skrift */
  --font-head: "Zain", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Nunito", "Helvetica Neue", Arial, sans-serif;

  /* 4px-skala */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;  --s6: 24px;
  --s8: 32px;  --s12: 48px; --s16: 64px; --s24: 96px; --s32: 128px; --s40: 160px;

  --wrap: 1240px;
  --gutter: 20px;
  --radius: 3px;
}

/* ------------------------------------------------------------------ Reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;              /* gulv: pensionister er en navngiven målgruppe */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.01em;
  margin: 0 0 var(--s4);
  text-wrap: balance;
}

h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 700; }

p { margin: 0 0 var(--s4); }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--primary); color: var(--on-primary);
  padding: var(--s3) var(--s6);
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--gutter);
}

/* Sektionsoverskrift S1: hængende i luften, ingen label, ingen streg */
.sec { padding-block: var(--s24); }
.sec--tight { padding-block: var(--s16); }
.sec--pivotal { padding-block: var(--s32); }
.sec__head { max-width: 660px; margin-bottom: var(--s12); }
.sec__head h2 { max-width: 15em; }
.sec__head p { max-width: 46ch; color: var(--muted); font-size: 1.05rem; }

.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 50ch; }

/* --------------------------------------------------------------- Knapper */
/* Rektangulære, som et butiksskilt. Bevidst ikke pilleformede. */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: var(--s3) var(--s8);
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .01em;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary); color: var(--on-primary);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: #0F4F39; border-color: #0F4F39; }

.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--bg); }

.btn--onGreen { background: var(--highlight); color: var(--text); border-color: var(--highlight); }
.btn--onGreen:hover { background: #F3C666; border-color: #F3C666; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Tekstlink med understregning, brugt hvor en knap ville larme */
.tlink {
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  color: var(--primary); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.tlink:hover { color: var(--text); }

/* ------------------------------------------------- N7: bjælke + navigation */

.promo {
  background: var(--highlight); color: var(--text);
  font-family: var(--font-head); font-weight: 700;
  font-size: 1.05rem; text-align: center;
  padding: var(--s2) var(--gutter);
  transition: transform .25s ease;
}
.promo a { text-decoration: underline; text-underline-offset: 3px; }
.promo[data-hidden="true"] { transform: translateY(-100%); }

.topwrap { position: sticky; top: 0; z-index: 100; }

.masthead {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s6); padding-block: var(--s3);
}

.brand { display: flex; align-items: baseline; gap: var(--s2); text-decoration: none; }
.brand b {
  font-family: var(--font-head); font-weight: 900;
  font-size: 1.7rem; line-height: 1; letter-spacing: -.02em;
}
.brand span {
  font-family: var(--font-body); font-size: .8rem; font-weight: 700;
  color: var(--primary); letter-spacing: .04em;
}

.nav__links { display: flex; align-items: center; gap: var(--s6); }
.nav__links a {
  font-weight: 700; font-size: 1rem; text-decoration: none;
  padding-block: var(--s2);
  border-bottom: 2px solid transparent;
}
.nav__links a:hover { border-bottom-color: var(--text); }
.nav__links a[aria-current="page"] { border-bottom-color: var(--primary); color: var(--primary); }
.nav__links .btn { min-height: 46px; padding-inline: var(--s6); font-size: 1rem; }
.nav__links .btn:hover { border-bottom-color: transparent; }

.nav__toggle {
  display: none;
  min-width: 48px; min-height: 48px;
  align-items: center; gap: var(--s2);
  background: none; border: 2px solid var(--text); border-radius: var(--radius);
  padding-inline: var(--s3);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  color: var(--text); cursor: pointer;
}

@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    border-top: 1px solid var(--border);
    padding-block: var(--s2);
  }
  .nav__links[data-open="true"] { display: flex; }
  .nav__links a {
    padding: var(--s3) 0; font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
  }
  .nav__links .btn { margin-top: var(--s3); }
  .nav { flex-wrap: wrap; }
}

/* ------------------------------------------- H3: fotografisk åbningsbillede */

.fold__photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  object-fit: cover;
  object-position: center 40%;
}

.fold__text { padding-block: var(--s12) var(--s8); }
.fold h1 { margin-bottom: var(--s6); }
.fold__lede { font-size: clamp(1.15rem, 2vw, 1.45rem); max-width: 40ch; color: var(--muted); }
.fold .btn-row { margin-top: var(--s8); }

/* Praktisk stribe lige under folden: adresse, tider, walk-in */
.facts {
  border-top: 2px solid var(--text);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.facts > div {
  padding: var(--s6) var(--s6) var(--s6) 0;
  border-right: 1px solid var(--border);
}
.facts > div:last-child { border-right: 0; }
.facts dt {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  color: var(--primary); margin-bottom: var(--s1);
}
.facts dd {
  margin: 0; font-family: var(--font-head); font-weight: 800;
  font-size: 1.5rem; line-height: 1.1; letter-spacing: -.01em;
}
.facts dd small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: var(--muted); letter-spacing: 0; margin-top: var(--s1); }

@media (max-width: 720px) {
  .fold__photo { aspect-ratio: 4 / 3; }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--border); padding-right: 0; }
  .facts > div:last-child { border-bottom: 0; }
}

/* ------------------------------------------------- Positionering, type-ledet */

.stance { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s16); align-items: center; }
.stance__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.stance h2 { margin-bottom: var(--s6); }
.stance p { font-size: 1.15rem; max-width: 42ch; }
.stance p + p { margin-top: var(--s4); }

@media (max-width: 860px) {
  .stance { grid-template-columns: 1fr; gap: var(--s8); }
}

/* --------------------------------------------- F7: butiksgulv af ydelser */

.shopfloor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.svc {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0 0 var(--s6);
  display: flex; flex-direction: column;
}

@media (max-width: 800px)  { .shopfloor { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .shopfloor { grid-template-columns: 1fr; } }
.svc img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; margin-bottom: var(--s6); }
.svc__body { padding-inline: var(--s6); display: flex; flex-direction: column; flex: 1; }
.svc h3 { margin-bottom: var(--s2); }
.svc p { font-size: .98rem; color: var(--muted); margin-bottom: var(--s6); }
.svc__foot {
  margin-top: auto;
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  border-top: 2px solid var(--text); padding-top: var(--s3);
}
.svc__price {
  font-family: var(--font-head); font-weight: 900;
  font-size: 2rem; line-height: 1; letter-spacing: -.02em;
}
.svc__price small { font-size: .5em; font-weight: 700; }

/* ------------------------------------------------ Tilbudstavle (ikke kort) */

.board {
  background: var(--primary); color: var(--on-primary);
  padding: var(--s16) var(--s12);
}
.board h2 { color: var(--on-primary); max-width: 16ch; }
.board__intro { color: #CFE0D8; max-width: 46ch; font-size: 1.05rem; margin-bottom: var(--s12); }

.deals { list-style: none; margin: 0; padding: 0; }
.deals li {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  gap: var(--s4) var(--s8);
  align-items: baseline;
  padding-block: var(--s6);
  border-top: 1px solid rgba(255,255,255,.28);
}
.deals li:last-child { border-bottom: 1px solid rgba(255,255,255,.28); }
.deals b {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1;
  letter-spacing: -.02em;
  color: var(--highlight);
}
.deals span { font-size: 1.05rem; }
.deals strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; margin-bottom: var(--s1); }
.deals em { display: block; font-style: normal; font-size: .92rem; color: #CFE0D8; margin-top: var(--s1); }

.board__note { margin-top: var(--s8); color: #CFE0D8; font-size: .95rem; }

@media (max-width: 640px) {
  .board { padding: var(--s12) var(--s6); }
  .deals li { grid-template-columns: 1fr; gap: var(--s2); }
}

/* ------------------------------------------------------- Praktisk afsnit */

.practical { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s16); align-items: start; }
.practical__photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.qa { margin: 0; }
.qa div + div { margin-top: var(--s8); padding-top: var(--s8); border-top: 1px solid var(--border); }
.qa dt { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; margin-bottom: var(--s2); }
.qa dd { margin: 0; color: var(--muted); max-width: 68ch; }

@media (max-width: 860px) { .practical { grid-template-columns: 1fr; gap: var(--s8); } }

/* ----------------------------------------------- C2: udsagn + én handling */

.close { text-align: left; padding-block: var(--s32); border-top: 2px solid var(--text); }
.close h2 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: 14ch; margin-bottom: var(--s8); }
.close p { color: var(--muted); max-width: 44ch; margin-bottom: var(--s8); font-size: 1.15rem; }

/* ----------------------------------------------------- Ft1: fodmasthead */

.foot { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--s16) var(--s8); }
.foot__top { display: flex; flex-wrap: wrap; gap: var(--s8) var(--s16); justify-content: space-between; align-items: flex-start; }
.foot__brand b { font-family: var(--font-head); font-weight: 900; font-size: 2.2rem; line-height: 1; display: block; }
.foot__brand p { margin-top: var(--s2); color: var(--muted); max-width: 30ch; }
.foot__cols { display: flex; flex-wrap: wrap; gap: var(--s16); }
.foot address { font-style: normal; line-height: 1.8; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.foot__bottom {
  margin-top: var(--s16); padding-top: var(--s4);
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s8); justify-content: space-between;
  font-size: .9rem; color: var(--muted);
}
.foot__hours { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------- Undersider */

.pagetop { padding-block: var(--s16) var(--s8); border-bottom: 1px solid var(--border); }
.pagetop h1 { font-size: clamp(2.6rem, 7vw, 5rem); margin-bottom: var(--s4); }
.crumb { font-size: .92rem; color: var(--muted); margin-bottom: var(--s6); }
.crumb a { text-decoration: underline; text-underline-offset: 3px; }

.prose { max-width: 60ch; }
.prose p { font-size: 1.12rem; }
.prose h2 { margin-top: var(--s16); }

/* Åbningstider */
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding-block: var(--s3); border-bottom: 1px solid var(--border); text-align: left; }
.hours th { font-weight: 400; color: var(--muted); }
.hours td { text-align: right; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; }
.hours tr[data-today] th { color: var(--primary); font-weight: 700; }
.hours tr[data-today] td { color: var(--primary); }

.map { border: 0; width: 100%; min-height: 440px; display: block; border: 1px solid var(--border); }

/* Formular */
.form { display: grid; gap: var(--s6); max-width: 560px; }
.field { display: grid; gap: var(--s2); }
.field label { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem;
  padding: var(--s3) var(--s4);
  border: 2px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text); width: 100%;
  min-height: 52px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); outline: none;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.note { font-size: .92rem; color: var(--muted); }

/* Booking-demo: klikbart flow, se assets/js/site.js. Erstattes af et rigtigt
   bookingsystem senere, se kommentaren i booking.html. */
.booking { display: grid; gap: var(--s12); max-width: 720px; margin-bottom: var(--s16); }
.booking[hidden] { display: none; }
.booking__step h3 { margin-bottom: var(--s4); }
.booking__label {
  display: flex; align-items: center; gap: var(--s3);
  font-size: 1.2rem;
}
.booking__label span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%; background: var(--primary); color: var(--on-primary);
  font-family: var(--font-head); font-weight: 800; font-size: 1rem;
}

.booking__services { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.pick {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: var(--s3) var(--s4); background: #fff; cursor: pointer;
}
.pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pick__name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.pick__price { color: var(--muted); font-size: .92rem; }
.pick:has(input:checked) { border-color: var(--primary); background: #EFF6F3; }
.pick:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }

.booking__days { display: flex; flex-wrap: wrap; gap: var(--s2); }
.daypick {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 64px; border: 2px solid var(--border); border-radius: var(--radius);
  padding: var(--s2) var(--s3); background: #fff; cursor: pointer;
  font-family: var(--font-body); font-size: .85rem; color: var(--muted);
}
.daypick strong { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--text); }
.daypick[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.daypick[aria-pressed="true"] strong { color: var(--on-primary); }
.daypick:disabled { opacity: .4; cursor: not-allowed; }

.booking__times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s2); }
.timepick {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: var(--s2); background: #fff; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
}
.timepick[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.timepick:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; background: var(--surface); }

.booking__error { color: var(--accent); font-weight: 700; }

.booking__confirm {
  max-width: 560px; margin-bottom: var(--s16);
  border: 2px solid var(--primary); border-radius: var(--radius);
  background: #EFF6F3; padding: var(--s8);
}
.booking__confirm h3 { color: var(--primary); }
.booking__confirm p { font-size: 1.1rem; margin-bottom: var(--s6); }

.steps { counter-reset: n; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: n; display: grid; grid-template-columns: auto 1fr; gap: var(--s6); padding-block: var(--s6); border-bottom: 1px solid var(--border); }
.steps li::before {
  content: counter(n);
  font-family: var(--font-head); font-weight: 900; font-size: 2rem; line-height: 1;
  color: var(--accent);
}
.steps h3 { margin-bottom: var(--s1); }
.steps p { color: var(--muted); margin: 0; }

/* Prisliste på undersider */
.pricelist { width: 100%; border-collapse: collapse; }
.pricelist th { text-align: left; font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--muted); padding-bottom: var(--s2); border-bottom: 2px solid var(--text); }
.pricelist th:last-child { text-align: right; }
.pricelist td { padding-block: var(--s4); border-bottom: 1px solid var(--border); }
.pricelist td:last-child { text-align: right; font-family: var(--font-head); font-weight: 900; font-size: 1.5rem; }
.pricelist tbody tr td:first-child { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }

/* Galleri på om-siden */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); }
.strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

/* ------------------------------------------------------- Reduceret bevægelse */
/* GSAP håndterer sine egne reveals via gsap.matchMedia. Her slås resten fra:
   tilbudsbjælkens skub og knappernes farveskift. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .promo { transition: none; }
  .promo[data-hidden="true"] { transform: none; }
}
