/* ══════════════════════════════════════════════
   CORNER BARBERS — Design System
   ══════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────── */
:root {
  --ink:        #0c0b0a;
  --ink-2:      #161513;
  --ink-3:      #1e1c19;
  --ink-4:      #252320;
  --gold:       #b8842a;
  --gold-2:     #d4a854;
  --gold-dim:   rgba(184,132,42,.12);
  --cream:      #ede8df;
  --cream-2:    #c4bdb3;
  --stone:      #aaa39c;
  --line:       rgba(255,255,255,.07);
  --line-gold:  rgba(184,132,42,.2);

  --space-xs:  .5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 11rem;
  --section-space: clamp(4.5rem, 8vw, 7rem);

  --radius-sm: 3px;
  --radius:    6px;

  --ease: cubic-bezier(.25,.46,.45,.94);
  --ease-out: cubic-bezier(0,0,.2,1);
}

/* ── RESET ───────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 6rem;
  overflow-x: clip;
  /* Safari viser root-canvasen bag den flydende bundlinje og ved overscroll. */
  background: var(--ink-2);
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }
a, button { touch-action: manipulation; }
ul { list-style: none; }
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  top: max(.75rem, env(safe-area-inset-top));
  left: .75rem;
  z-index: 1000;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: .7rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  border-radius: var(--radius-sm);
  background: var(--gold-2);
  color: var(--ink);
  font-weight: 700;
}

/* ── TYPOGRAPHY ──────────────────────────────── */
.display {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -.01em;
}
.display-bold {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.0;
}
.label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.label::before {
  content: '—';
  margin-right: .5rem;
  opacity: .6;
}

/* ── LAYOUT ──────────────────────────────────── */
.wrap       { width: min(1200px, 90vw); margin-inline: auto; }
.wrap-tight { width: min(820px, 90vw); margin-inline: auto; }

/* ── DIVIDERS ────────────────────────────────── */
.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
.rule-gold {
  border: none;
  border-top: 1px solid var(--line-gold);
  margin: 0;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
  white-space: nowrap;
}
.btn svg {
  width: 1em; height: 1em;
  stroke: currentColor; stroke-width: 1.8; fill: none;
  flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round;
}
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 6px 24px -6px rgba(184,132,42,.5);
}
.btn-gold:hover {
  background: var(--gold-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -6px rgba(184,132,42,.55);
}
.btn-outline {
  border: 1px solid var(--line-gold);
  color: var(--gold);
  background: transparent;
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--cream-2);
  background: transparent;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,.18);
  color: var(--cream);
}

/* ── NAVIGATION ──────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.8rem 0;
  transition: padding .45s var(--ease), background .45s var(--ease), border-color .45s var(--ease);
  border-bottom: 1px solid transparent;
  /* Altid læsbar nav — mørk gradient fra top */
  background: linear-gradient(to bottom, rgba(12,11,10,.72) 0%, rgba(12,11,10,.0) 100%);
}
.site-nav.scrolled {
  padding: 1rem 0;
  background: rgba(12,11,10,.97);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img {
  height: 32px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.8rem;
}
.nav-links a {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-2);
  transition: color .25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -.25rem; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--cream); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
  color: var(--cream);
}
.nav-burger span {
  display: block;
  width: 20px; height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--ink-2);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .45s var(--ease-out), opacity .3s var(--ease-out), visibility 0s linear .45s;
  padding: max(6rem, env(safe-area-inset-top)) max(2rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(2rem, env(safe-area-inset-left));
  overscroll-behavior: contain;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-mobile.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.nav-mobile a {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  color: var(--cream);
  transition: color .25s;
  letter-spacing: .03em;
}
.nav-mobile a:hover { color: var(--gold); }

@media (max-width: 860px) {
  .nav-links,
  .site-nav .btn { display: none; }
  .nav-burger { display: flex; }
}

/* ── COOKIE BANNER ───────────────────────────── */
.cookie-banner {
  position: fixed;
  inset: 0;
  z-index: 500;
  width: 100%;
  min-height: 100dvh;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  display: none;
  place-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgb(5 5 5 / .3);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.cookie-banner.show { display: grid; }
.cookie-panel {
  width: min(560px, 100%);
  max-height: calc(100dvh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.35rem, 4vw, 2rem);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background: var(--ink-3);
  box-shadow: 0 1.75rem 5rem rgb(0 0 0 / .58);
}
.cookie-banner.show .cookie-panel { animation: cookie-enter .35s cubic-bezier(.16, 1, .3, 1) both; }
.cookie-title {
  margin-bottom: .65rem;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
}
.cookie-banner p {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--cream-2);
}
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1.5rem;
}
.cookie-actions button {
  width: 100%;
  min-height: 3rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: .04em;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.cookie-accept {
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--gold);
}
.cookie-accept:hover { background: var(--gold-2); border-color: var(--gold-2); transform: translateY(-1px); }
.cookie-decline {
  background: var(--cream);
  border: 1px solid var(--cream);
  color: var(--ink);
}
.cookie-decline:hover { background: #fff; border-color: #fff; transform: translateY(-1px); }
@keyframes cookie-enter {
  from { transform: translateY(14px) scale(.985); }
  to { transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .cookie-banner { padding-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right)); }
  .cookie-panel { padding: 1.25rem; }
  .cookie-actions { gap: .6rem; }
  .cookie-actions button { font-size: .74rem; }
}

/* ── FOOTER ──────────────────────────────────── */
.site-footer {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.footer-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 1.5rem 0 1.25rem;
  text-align: center;
}
.footer-main > * { min-width: 0; }
.footer-brand img { height: 24px; margin-bottom: .65rem; }
.footer-brand .nav-wordmark { margin-bottom: .65rem !important; }
.footer-brand p {
  font-size: .8rem;
  color: var(--stone);
  line-height: 1.5;
  max-width: 280px;
  margin-inline: auto;
}
.footer-col-title {
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: .7rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1rem;
}
.footer-links li + li { margin-top: 0; }
.footer-links a {
  font-size: .82rem;
  color: var(--cream-2);
  transition: color .25s;
}
.footer-links a:hover { color: var(--gold); }
.footer-contact {
  font-size: .82rem;
  color: var(--cream-2);
  line-height: 1.6;
}
.footer-contact a { color: var(--gold); transition: opacity .25s; }
.footer-contact a:hover { opacity: .8; }
.footer-main + .rule { display: none; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: .8rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
}
.footer-meta {
  justify-self: start;
  font-size: .72rem;
  color: var(--stone);
  letter-spacing: .01em;
}
.social-links { display: flex; gap: .5rem; justify-self: center; }
.footer-utility-links { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.apexo-credit { justify-self: end; color: var(--cream-2); font-size: .7rem; text-underline-offset: .25rem; }
.social-link {
  width: 1.75rem; height: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--stone);
  transition: border-color .25s, color .25s, background-color .25s;
}
.social-link svg {
  width: .85em; height: .85em;
  stroke: currentColor; stroke-width: 1.8; fill: none;
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 720px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    padding: 1.15rem 0 1rem;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand p { max-width: 440px; }
  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .65rem 1rem;
    padding: .7rem 0;
    text-align: left;
  }
  .footer-meta { grid-column: 1; grid-row: 1; }
  .apexo-credit { grid-column: 2; grid-row: 1; justify-self: end; }
  .social-links,
  .footer-utility-links { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

@media (max-width: 420px) {
  .footer-main { gap: .85rem; }
  .footer-brand p { font-size: .76rem; }
  .footer-links { gap: .35rem .75rem; }
  .footer-contact { font-size: .78rem; }
  .footer-meta { font-size: .64rem; }
  .apexo-credit { font-size: .66rem; }
}

/* Indhold skal altid være synligt, også uden JavaScript og i fuldside-captures. */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-mobile { transition-delay: 0s !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
