/* ============================================================
   På Håret i Karlstad — shared stylesheet
   warm cream paper · deep ink · logo yellow as highlighter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500;1,6..72,600;1,6..72,700&family=Caveat:wght@400;500;600;700&display=swap');

:root {
  /* paper + ink */
  --paper:        #f3ead7;
  --paper-2:      #ebdfc4;
  --paper-3:      #e3d4b1;
  --ink:          #1c1812;
  --ink-2:        #3a3128;
  --ink-soft:     #6a5d4d;
  --ink-faint:    #a99a82;

  /* the logo yellow, refined */
  --yellow:       #f5d022;
  --yellow-deep:  #d9a900;   /* decorative only: borders, tape, shadows */
  --yellow-soft:  #fbe676;
  /* darker gold for yellow TEXT on paper: meets WCAG AA contrast
     while reading as the same brand gold (4.5:1 on paper, 4.27:1 on paper-3) */
  --gold-text:    #7e5a00;

  --chestnut:     #6b3a1d;
  --rust:         #a04a23;

  /* type */
  --serif:  'Newsreader', 'EB Garamond', Georgia, serif;
  --hand:   'Caveat', 'Comic Sans MS', cursive;

  --rule: 1px solid rgba(28,24,18,0.18);
  --rule-strong: 1px solid rgba(28,24,18,0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* ========================================================
   keyboard accessibility (WCAG 2.4.7 focus visible)
   visible only when navigating by keyboard, so the design
   is untouched for mouse/touch users.
   ======================================================== */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 2px;
}
/* on dark backgrounds the ink outline would vanish, so use yellow there */
.visit :focus-visible,
.ring :focus-visible,
.closing-cta :focus-visible,
.site-nav.is-open a:focus-visible {
  outline-color: var(--yellow);
}

/* skip link: hidden until focused, then appears top-left */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-family: var(--serif);
  font-size: 16px;
  text-decoration: none;
  border-radius: 4px;
  transition: top .2s ease;
}
.skip-link:focus { top: 8px; }

/* respect users who ask for less motion (WCAG 2.3.3 / pref) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .mark.swipe::before { transform: scaleX(1) skew(-3deg); }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(28,24,18,0.05) 1px, transparent 1px),
    radial-gradient(rgba(28,24,18,0.03) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ========================================================
   layout primitives
   ======================================================== */
.wrap { width: min(1320px, 92vw); margin-inline: auto; }
.wrap-narrow { width: min(760px, 92vw); margin-inline: auto; }

.eyebrow {
  font-family: var(--hand);
  font-size: 22px;
  color: var(--ink-soft);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--ink-soft);
  display: inline-block;
}

.hand { font-family: var(--hand); }

/* yellow marker highlight */
.mark {
  position: relative;
  display: inline-block;
  padding: 0 0.12em;
  isolation: isolate;
}
.mark::before {
  content: "";
  position: absolute;
  inset: 8% -2% 4% -2%;
  background: var(--yellow);
  z-index: -1;
  transform: skew(-3deg) rotate(-0.4deg);
  border-radius: 60% 40% 50% 50% / 30% 50% 40% 60%;
}
.mark.swipe::before {
  transform-origin: left center;
  transform: scaleX(0) skew(-3deg);
  transition: transform 1.2s cubic-bezier(.65,.1,.2,1);
}
.mark.swipe.in::before { transform: scaleX(1) skew(-3deg); }

/* hand-drawn underline */
.scribble {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'><path d='M2 8 C 30 2, 60 12, 100 6 S 170 4, 198 8' fill='none' stroke='%23d9a900' stroke-width='2.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 0 95%;
  background-size: 100% 10px;
  padding-bottom: 6px;
}

/* taped paper card */
.tape {
  position: relative;
  background: var(--paper);
  padding: 28px 28px 26px;
  box-shadow:
    0 1px 0 rgba(28,24,18,0.08),
    0 12px 24px -16px rgba(28,24,18,0.25);
  border: 1px solid rgba(28,24,18,0.08);
}
.tape::before, .tape::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 64px; height: 20px;
  background: rgba(245, 208, 34, 0.55);
  border: 1px solid rgba(217, 169, 0, 0.4);
  transform: rotate(-3deg);
  box-shadow: 0 2px 4px rgba(28,24,18,0.08);
}
.tape::before { left: 18px; transform: rotate(-4deg); }
.tape::after  { right: 22px; transform: rotate(3deg); display: none; }
.tape.dual::after { display: block; }

/* button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 13px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: transform .15s ease, background .2s ease;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:hover { transform: translateY(-1px); background: var(--ink-2); }
.btn .arr { display: none; }
.btn:hover .arr { transform: translateX(3px); }

.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-yellow:hover {
  background: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ========================================================
   site header (no glass effect; solid paper bg)
   ======================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--rule);
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 0;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand .wordmark {
  font-family: var(--hand);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  position: relative;
  padding: 4px 14px 6px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 50% / 50%;
  transform: rotate(-2deg);
  letter-spacing: 0.01em;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.brand .place {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@media (max-width: 1200px) { .brand .place { display: none; } }

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  font-size: 16px;
  color: var(--ink-2);
  font-weight: 500;
  padding: 4px 2px;
  position: relative;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px; height: 3px;
  background: var(--yellow);
  border-radius: 3px;
}
.site-nav .nav-cta { display: none; }

@media (max-width: 1100px) {
  .site-nav { gap: 20px; margin-right: 6px; }
  .site-nav a { font-size: 15px; }
}

/* hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  z-index: 60;
}
.nav-toggle .bun {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
  transform-origin: center;
}
.nav-toggle.is-open .bun:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .bun:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .bun:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .site-header .bar { padding: 14px 0; }
  .nav-toggle { display: flex; }
  .boka-desktop { display: none; }
  .brand .wordmark { font-size: 26px; padding: 3px 12px 5px; }
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateY(-100%);
    transition: transform .35s cubic-bezier(.65,.1,.2,1);
    margin: 0;
    z-index: 55;
  }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav a {
    font-family: var(--serif);
    font-style: italic;
    font-size: 38px;
    font-weight: 500;
  }
  .site-nav a.is-active::after { display: none; }
  .site-nav a.is-active { color: var(--gold-text); }
  .site-nav .nav-cta {
    display: inline-flex;
    margin-top: 16px;
    padding: 18px 32px 20px;
    font-family: var(--serif);
    font-style: normal;
    font-size: 22px;
    font-weight: 500;
  }
}

/* ========================================================
   site footer
   ======================================================== */
.site-footer {
  margin-top: 120px;
  padding: 72px 0 32px;
  border-top: var(--rule-strong);
  background: var(--paper-2);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.site-footer h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.site-footer .footer-lede {
  margin: 0 0 22px;
  max-width: 36ch;
  color: var(--ink-2);
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer .big-name {
  font-family: var(--hand);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 600;
  line-height: 0.85;
  color: var(--ink-soft);
  margin-top: 28px;
  letter-spacing: -0.01em;
}
.site-footer .big-name .y { color: var(--yellow); }
.site-footer .colofon {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: var(--rule);
  padding-top: 18px;
}

@media (max-width: 880px) {
  .site-footer { margin-top: 80px; padding: 56px 0 28px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 32px; }
}

/* ========================================================
   page title block (subpages)
   ======================================================== */
.page-title {
  padding: 72px 0 56px;
  border-bottom: var(--rule);
}
.page-title h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
}
.page-title p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 22px 0 0;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .page-title { padding: 48px 0 36px; }
  .page-title p.lede { font-size: 17px; }
}

/* ========================================================
   small utility
   ======================================================== */
.divider { height: 1px; background: rgba(28,24,18,0.18); width: 100%; }
.divider-dash { border: none; border-top: 1.5px dashed rgba(28,24,18,0.35); margin: 0; }

.sup-no {
  font-family: var(--hand);
  font-size: 28px;
  color: var(--gold-text);
  display: inline-block;
  transform: rotate(-6deg);
  margin-right: 6px;
}

section[id] { scroll-margin-top: 90px; }
