/* Blank Law v2: base.css (core). Tokens, type, chrome, dock, buttons, the marked slot, the reveal.
   Pages add only page-prefixed classes (.home-*, .ratt-*, .boka-*, .partner-*, .kontakt-*). See site/README.md. */

@font-face { font-family: "Newsreader"; src: url(../fonts/newsreader-latin-opsz-normal.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(../fonts/newsreader-latin-opsz-italic.woff2) format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(../fonts/figtree-latin-wght-normal.woff2) format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  /* colour */
  --cream: #F6F8FB;     /* ground */
  --paper: #FFFFFF;     /* raised paper */
  --ink: #1A2838;       /* text */
  --mute: #4A5768;      /* lightest allowed text on cream (7.3:1) */
  --teal: #1E3A5F;
  --teal-deep: #152B47;
  --terra: #1E3A5F;     /* CTA ground, white text (4.9:1) */
  --terra-deep: #152B47;
  --ochre: #9BB3CF;
  --sea: #DCE5EF;
  --line: #D9E0E8;      /* hairlines on cream */
  --sun: #E6EDF5;       /* sun-wash tint */

  /* type */
  --f-head: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: 1.0625rem;                     /* 17 px phone */
  --small: .9375rem;
  --h1: clamp(2.75rem, 1.2rem + 5.6vw, 6.25rem);
  --h2: clamp(1.875rem, 1.2rem + 2.2vw, 3.125rem);
  --h3: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);

  /* space (8-based scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px; --s-10: 160px;
  --gut: clamp(20px, 5vw, 80px);
  --wrap: 1320px;
  --measure: 62ch;

  /* shape and depth: base / raised / floating, warm-tinted */
  --r-1: 6px; --r-2: 10px; --r-pill: 999px;
  --sh-raised: 0 1px 2px rgba(18,32,52,.08), 0 10px 24px -14px rgba(18,32,52,.28);
  --sh-float: 0 2px 4px rgba(18,32,52,.06), 0 28px 60px -28px rgba(18,32,52,.42);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* chrome */
  --bar-h: 64px;
  --dock-h: 0px;
}
@media (min-width: 760px) { :root { --body: 1.125rem; } }  /* 18 px desktop */
@media (max-width: 759.98px) { :root { --dock-h: calc(60px + env(safe-area-inset-bottom, 0px)); --bar-h: 60px; } }

/* ---------- reset + type ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); scroll-padding-bottom: calc(var(--dock-h) + 16px); }
body {
  margin: 0; min-height: 100vh; overflow-x: clip;
  background: var(--cream); color: var(--ink);
  font: 400 var(--body)/1.55 var(--f-text);
  font-kerning: normal; -webkit-font-smoothing: antialiased;
  padding-bottom: var(--dock-h);
}
img, video, svg, picture { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-head); font-optical-sizing: auto; font-weight: 420; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: var(--h1); line-height: .98; letter-spacing: -0.025em; font-weight: 400; }
h2 { font-size: var(--h2); line-height: 1.06; letter-spacing: -0.018em; }
h3 { font-size: var(--h3); line-height: 1.2; letter-spacing: -0.008em; font-weight: 500; }
p { margin: 0; text-wrap: pretty; max-width: var(--measure); }
p + p { margin-top: .75em; }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
::selection { background: var(--ochre); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
main { display: block; }
main:focus { outline: none; }
.bl-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bl-wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.bl-lede { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.5; color: var(--ink); }
.bl-small { font-size: var(--small); line-height: 1.5; color: var(--mute); }
.bl-eyebrow { font: 600 var(--small)/1.3 var(--f-text); color: var(--teal); margin-bottom: var(--s-3); }
.bl-ico { flex: none; }

.bl-skip { position: absolute; left: 12px; top: -200px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 14px; border-radius: var(--r-1); box-shadow: var(--sh-raised); }
.bl-skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.bl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px;
  background: var(--terra); color: #fff; border: 0; border-radius: var(--r-pill);
  font: 600 1.0625rem/1.1 var(--f-text); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 18px -10px rgba(21,43,71,.75);
  transition: background-color 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.bl-btn:hover { background: var(--terra-deep); text-decoration: none; transform: translateY(-1px); }
.bl-btn:active { transform: translateY(1px); box-shadow: 0 2px 6px -4px rgba(21,43,71,.8); }
.bl-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--r-pill); }
/* the quiet partner: a call link with its own underline (not a second filled button) */
.bl-call {
  display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 4px;
  font: 600 1.0625rem/1.1 var(--f-text); color: var(--ink); text-decoration: underline; text-decoration-color: var(--ochre);
  text-decoration-thickness: 3px; text-underline-offset: .32em; white-space: nowrap;
  transition: text-decoration-color 160ms var(--ease);
}
.bl-call:hover { text-decoration-color: var(--terra); }
.bl-call:active { color: var(--terra-deep); }
.bl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.bl-link { color: var(--teal); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; }
.bl-link:hover { color: var(--teal-deep); text-decoration-thickness: 2px; }

/* ---------- banner + header ---------- */
.bl-banner {
  margin: 0; max-width: none; padding: 7px var(--gut); background: var(--ink); color: #EEF1F5;
  font-size: .8125rem; line-height: 1.35; text-align: center;
}
.bl-top { position: sticky; top: 0; z-index: 40; background: rgba(246,248,251,.94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) { .bl-top { background: rgba(246,248,251,.86); backdrop-filter: saturate(1.2) blur(10px); } }
.bl-top__in { height: var(--bar-h); display: flex; align-items: center; gap: var(--s-5); max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.bl-brand { display: flex; flex-direction: column; justify-content: center; min-height: 44px; gap: 2px; text-decoration: none; margin-right: auto; color: var(--ink); }
.bl-brand__name { font: 500 1.5rem/1 var(--f-head); letter-spacing: -0.015em; }
.bl-brand__tag { font: 500 .78rem/1.1 var(--f-text); color: var(--mute); }
.bl-brand:hover .bl-brand__name { color: var(--teal); }
.bl-nav { align-self: stretch; display: none; }
.bl-nav__list { list-style: none; display: flex; height: 100%; align-items: stretch; }
.bl-nav a {
  position: relative; display: flex; align-items: center; height: 100%; padding: 0 var(--s-3);
  color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 500; white-space: nowrap;
}
.bl-nav a:hover { color: var(--teal); }
.bl-nav a[aria-current="page"] { color: var(--teal); }
.bl-nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 14px; height: 3px; border-radius: 2px; background: var(--ochre); }
.bl-top__phone { display: none; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--ink); }
.bl-top__phone:hover { color: var(--teal); text-decoration: underline; }
.bl-top__cta { display: none; min-height: 44px; padding: 0 20px; font-size: 1rem; }
.bl-top__menu {
  min-height: 44px; min-width: 44px; padding: 0 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; cursor: pointer; color: var(--ink);
}
.bl-top__menu:hover { border-color: var(--teal); color: var(--teal); }
.bl-top__menu[aria-expanded="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.bl-menu { border-top: 1px solid var(--line); background: var(--cream); padding: var(--s-4) var(--gut) var(--s-6); }
.bl-menu[hidden] { display: none; }
.bl-menu__list { list-style: none; }
.bl-menu__list a { display: block; padding: 12px 0; font: 450 1.625rem/1.2 var(--f-head); text-decoration: none; border-bottom: 1px solid var(--line); }
.bl-menu__list a[aria-current="page"] { color: var(--teal); }
.bl-menu__contact { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); font-weight: 600; }
@media (min-width: 1024px) {
  .bl-nav, .bl-top__phone, .bl-top__cta { display: flex; }
  .bl-top__menu, .bl-menu { display: none !important; }
  .bl-top__in { gap: var(--s-4); }
}
@media (min-width: 1024px) and (max-width: 1180px) { .bl-nav a { padding: 0 8px; font-size: .95rem; } .bl-brand__tag { display: none; } }
@media (max-width: 759.98px) { .bl-top { position: relative; } }

/* ---------- phone dock (< 760 px): fixed, independent of every scroll effect ---------- */
.bl-dock { display: none; }
@media (max-width: 759.98px) {
  .bl-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr;
    height: var(--dock-h); padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); gap: 8px;
    background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -18px rgba(18,32,52,.45);
  }
  .bl-dock a {
    display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r-pill);
    font: 600 .98rem/1 var(--f-text); text-decoration: none; white-space: nowrap; min-height: 44px;
  }
  .bl-dock__call { color: var(--ink); border: 1.5px solid var(--teal); }
  .bl-dock__call:active { background: var(--sea); }
  .bl-dock__book { background: var(--terra); color: #fff; }
  .bl-dock__book:active { background: var(--terra-deep); }
}

/* ---------- sections ---------- */
.bl-sec { padding: clamp(72px, 9vh, 104px) 0; }
@media (max-width: 759.98px) { .bl-sec { padding: 56px 0; } }
.bl-sec__head { max-width: 42rem; margin-bottom: var(--s-7); }
.bl-sec__head p { margin-top: var(--s-4); }

/* framed picture: base for every photo on the site (rounded, warm shadow) */
/* it keeps an aspect-ratio (3:2 unless the page sets another) and the picture fills it */
.bl-frame { position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-2); overflow: hidden; box-shadow: var(--sh-float); background: var(--sun); }
.bl-frame > picture, .bl-frame > video { position: absolute; inset: 0; }
.bl-frame img, .bl-frame video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- the marked seller slot ("Kommer från Blank Law"): never a face, a name or a title ---------- */
.bl-slot {
  position: relative; display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: var(--s-6); align-items: center;
  padding: var(--s-6); border: 2px dashed var(--teal); border-radius: var(--r-2); background: rgba(220,229,239,.35);
}
.bl-slot__frame { aspect-ratio: 4 / 5; border-radius: var(--r-1); border: 1.5px dashed rgba(30,58,95,.6); background:
  repeating-linear-gradient(135deg, rgba(30,58,95,.07) 0 10px, transparent 10px 20px), var(--paper); display: grid; place-items: center; }
.bl-slot__frame svg { width: 44%; height: auto; color: rgba(30,58,95,.55); }
.bl-slot__mark {
  display: inline-block; margin-bottom: var(--s-3); padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--teal); color: #fff; font: 600 .875rem/1.3 var(--f-text);
}
.bl-slot h2, .bl-slot h3 { margin-bottom: var(--s-3); }
@media (max-width: 559.98px) { .bl-slot { grid-template-columns: 1fr; padding: var(--s-5); gap: var(--s-5); } .bl-slot__frame { max-width: 160px; } }

/* ---------- reveal: pictures ease in once (opacity + 24 px). Armed by base.js after load; never in reduced motion ---------- */
html.rv-on .rv:not(.is-in) { opacity: 0; transform: translateY(24px); }
html.rv-on .rv { transition: opacity 900ms var(--ease), transform 900ms var(--ease); transition-delay: var(--rv-d, 0ms); }

/* ---------- footer (ink allowed) ---------- */
.bl-foot { background: var(--ink); color: #EBEFF3; padding: var(--s-8) 0 var(--s-6); }
.bl-foot a { color: #fff; }
.bl-foot a:hover { color: var(--ochre); }
.bl-foot__in { max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: var(--s-7) var(--s-6); }
.bl-foot__name { font: 450 1.75rem/1.1 var(--f-head); color: #fff; margin-bottom: var(--s-3); }
.bl-foot__facts { display: grid; gap: var(--s-3); }
.bl-foot__facts dt { font-size: .875rem; color: #C3C9D1; }
.bl-foot__navh { font-size: .875rem; color: #C3C9D1; margin-bottom: var(--s-2); }
.bl-foot__nav ul { list-style: none; display: grid; gap: 0; }
.bl-foot__nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.bl-foot__facts a { display: inline-flex; align-items: center; min-height: 44px; }
.bl-foot__nav a:hover { text-decoration: underline; }
.bl-foot__gen { grid-column: 1 / -1; max-width: none; padding-top: var(--s-5); border-top: 1px solid rgba(235,239,243,.18); font-size: .875rem; color: #C3C9D1; }
@media (min-width: 760px) and (max-width: 899.98px) { .bl-foot__in { grid-template-columns: 1fr 1fr; } .bl-foot__lede { grid-column: 1 / -1; } }
@media (max-width: 759.98px) {
  .bl-foot { padding: var(--s-6) 0 var(--s-4); }
  .bl-foot__in { grid-template-columns: 1fr; gap: var(--s-4); }
  .bl-foot__name { font-size: 1.375rem; margin-bottom: var(--s-1); }
  .bl-foot__lede p:not(.bl-foot__name) { font-size: .9375rem; }
  .bl-foot__facts { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
  .bl-foot__facts > div:first-child { flex-basis: 100%; }
  .bl-foot__facts dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bl-foot__navh { display: none; }
  .bl-foot__nav ul { grid-template-columns: 1fr 1fr; column-gap: var(--s-5); }
  .bl-foot__gen { padding-top: var(--s-3); font-size: .8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
/* lead 2026-11-14: tap targets >= 44 px (sweep: 'Hem' was 39 px wide) */
.bl-nav a { min-width: 44px; justify-content: center; }
.bl-foot__nav a { min-width: 44px; }

/* v2-6: the labels inside the fee bar */
.bar-lbl { font: 600 clamp(.8125rem, .7rem + .45vw, 1.125rem)/1 var(--f-text); white-space: nowrap; padding: 0 4px; }
.home-bar__own .bar-lbl, .ratt-bar__own .bar-lbl { color: #13243A; }
.home-bar__ins .bar-lbl, .ratt-bar__ins .bar-lbl { color: #fff; }
