/* BOOK (book/index.html, fi/varaa/index.html)
   ------------------------------------------------------------------
   The booking page set in the print language of the homepage, the
   About page, the case pages and the FAQ: condensed 76-80% Bricolage,
   one mono label with a 12px cobalt square and a hairline, 0-4px
   corners, fields that meet on straight edges.

     masthead  paper   the label row, the headline, the support line
     slip      stock   one printed booking slip with an ink outline:
                       the three assurances as its stub, a perforation
                       with two die-cut side notches, then the
                       scheduler. Before the click it holds the GDPR
                       note (small mono print) and the die-cut cobalt
                       ticket button; after it, Cal.com's month view
                       fills the same frame (full-bleed on phones)
     contact   ink     the homepage's closing contact block

   The Cal.com click-to-load script is untouched: it still removes
   .book-load and mounts the embed into #cal-booking. The frame only
   reserves room for the scheduler once .book-load is gone.

   The default CSS is the finished page. A short CSS-only entrance runs
   when motion is allowed; reduced motion never animates. No #bgBlob,
   no .reveal, no glows, no scene slates. Every class is prefixed bk3;
   the page wears body.bk3.
   ------------------------------------------------------------------ */

body.bk3 {
  --bk-p: var(--paper, #f0ece3);
  --bk-i: var(--ink, #14110c);
  --bk-c: var(--cobalt, #2b34ff);
  --bk-cl: var(--cobalt-light, #7a83ff);
  --bk-stock: #fbf8f2;                        /* ticket card stock, a shade off the page */
  --bk-soft: var(--ink-soft, #3a342b);
  --bk-mut: #5f584d;                          /* 6.4:1 on the stock, 5.9:1 on paper */
  --bk-on-ink: rgba(240, 236, 227, 0.74);
  --bk-rule: rgba(20, 17, 12, 0.16);          /* hairline on paper */
  --bk-rule-d: rgba(240, 236, 227, 0.16);     /* hairline on ink */
  --bk-e: var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
  --bk-snap: cubic-bezier(0.3, 1.45, 0.45, 1);
  --bk-draw: cubic-bezier(0.65, 0, 0.2, 1);
  --bk-notch:
    radial-gradient(circle at 0 50%, #0000 5px, #000 5.5px) 0 0 / 51% 100% no-repeat,
    radial-gradient(circle at 100% 50%, #0000 5px, #000 5.5px) 100% 0 / 51% 100% no-repeat;
  --bk-pad: clamp(18px, 2vw, 28px);           /* the slip's inner margin */
  --bk-navh: 60px;
  background: var(--bk-p);
  color: var(--bk-i);
}
@media (max-width: 768px) {
  body.bk3 { --bk-navh: 68px; }               /* .pill gets a 44px target */
}
@media (max-width: 620px) {
  body.bk3 { --bk-pad: var(--gutter, 20px); } /* the slip runs edge to edge */
}

/* ---------- page-level clean-up (this page only) ---------- */
body.bk3 .bg-blob,
body.bk3 .timecode,
body.bk3 .scene-slate { display: none !important; }
body.bk3 ::selection { background: var(--bk-c); color: var(--bk-p); }
body.bk3 :focus-visible { outline: 2px solid var(--bk-c); outline-offset: 3px; border-radius: 0; }
body.bk3 .contact :focus-visible { outline-color: var(--bk-p); }

.bk3-main { display: block; }
.bk3-wrap {
  /* same measure as the nav bar and the contact block (1320px of content) */
  max-width: calc(var(--maxw, 1320px) + 2 * var(--gutter, 24px));
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}

/* ---------- buttons: the die-cut cobalt ticket (fill on ::before so the
   focus ring is never masked away) ---------- */
body.bk3 .pill--solid {
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: var(--bk-p);
}
body.bk3 .pill--solid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 4px;
  background: var(--bk-c);
  -webkit-mask: var(--bk-notch);
          mask: var(--bk-notch);
  transition: background-color 0.25s var(--bk-e), transform 0.4s var(--bk-snap);
}
body.bk3 .pill--solid:hover { background: none; border-color: transparent; box-shadow: none; transform: none; }
body.bk3 .pill--solid:hover::before { background: var(--bk-i); transform: scale(1.03); }
body.bk3 .pill--solid:focus-visible { outline: 2px solid var(--bk-c); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  body.bk3 .pill--solid:hover { box-shadow: none; }
}

/* ---------- NAV: one solid paper bar, ink hairline, no blur, no tray ---------- */
body.bk3 #nav,
body.bk3 #nav.is-scrolled {
  background: var(--bk-p);
  color: var(--bk-i);
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: 0 1px 0 var(--bk-rule);
  padding-top: 12px;
  padding-bottom: 12px;
  transition: box-shadow 0.28s var(--bk-e);
}
body.bk3 #nav.is-scrolled { box-shadow: 0 1px 0 var(--bk-i); }
body.bk3 #nav .nav__name { color: inherit; }
body.bk3 #nav .nav__name sup { color: var(--bk-c); }
body.bk3 #nav .nav__lang {
  padding: 3px 6px 2px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: inherit;
  opacity: 0.72;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  transition: opacity 0.2s var(--bk-e);
}
body.bk3 #nav .nav__lang:hover,
body.bk3 #nav .nav__lang:focus-visible { opacity: 1; color: inherit; border-color: currentColor; }
body.bk3 #nav .nav__menu {
  gap: clamp(16px, 2.2vw, 30px);
  padding: 0;
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}
body.bk3 #nav .nav__menu .pill--ghost {
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}
body.bk3 #nav .nav__menu .pill--ghost::before {
  inset: auto 0 4px 0;
  height: 1px;
  border-radius: 0;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--bk-e);
}
body.bk3 #nav .nav__menu .pill--ghost:hover::before,
body.bk3 #nav .nav__menu .pill--ghost:focus-visible::before { transform: scaleX(1); }
body.bk3 #nav .nav__contact {
  padding: 0.9em 1.25em;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--bk-p);
}
@media (max-width: 620px) {
  body.bk3 #nav .nav__menu { gap: 12px; }
  body.bk3 #nav .nav__menu .pill--ghost { font-size: 0.6rem; letter-spacing: 0.12em; padding: 8px 0; }
  body.bk3 #nav .nav__contact { padding: 0.85em 0.95em; font-size: 0.58rem; letter-spacing: 0.1em; }
}

/* ================================================================
   MASTHEAD
   ================================================================ */
.bk3-mast {
  padding: calc(var(--bk-navh) + clamp(44px, 6vw, 92px)) 0 0;
}

/* the one label: mono caps, a 12px cobalt square, a hairline to the edge */
.bk3-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bk-i);
}
.bk3-label::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: var(--bk-c);
}
.bk3-label__rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--bk-rule);
}

.bk3-title {
  margin: clamp(26px, 3.4vw, 50px) 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 78%;
  font-size: clamp(3rem, 9.2vw, 9rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-wrap: balance;
  overflow-wrap: break-word;
  font-feature-settings: "kern" 1;
  color: var(--bk-i);
}
.bk3-title em { font-style: normal; color: var(--bk-c); }

.bk3-lede {
  max-width: 40ch;
  margin: clamp(22px, 2.8vw, 40px) 0 0;
  font-family: var(--font-display);
  font-weight: 430;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.42;
  letter-spacing: -0.004em;
  text-wrap: balance;
  color: var(--bk-soft);
}

@media (max-width: 620px) {
  .bk3-title {
    font-size: clamp(2.6rem, 13.4vw, 3.6rem);   /* meets 9.2vw at the 620/621 seam */
    line-height: 0.88;
  }
}

/* ================================================================
   THE SLIP: stub (assurances) · perforation · scheduler
   ================================================================ */
.bk3-book {
  padding: clamp(40px, 4.6vw, 68px) 0 clamp(96px, 10vw, 150px);
}

.bk3-slip {
  --notch: 9px;
  position: relative;
  border: 1px solid var(--bk-i);
  border-radius: 4px;
  background: var(--bk-stock);
  color: var(--bk-i);
}

/* the stub: three assurances as one printed spec row */
.bk3-spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.bk3-spec li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: clamp(18px, 1.8vw, 24px) var(--bk-pad);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bk-i);
}
.bk3-spec li + li { border-left: 1px solid var(--bk-rule); }
/* tablets: equal thirds would wrap "Vastaus 24 tunnin sisällä" onto two
   lines, so the cells size to their text and share what is left */
@media (min-width: 621px) and (max-width: 1080px) {
  .bk3-spec { grid-template-columns: repeat(3, auto); }
}
.bk3-spec li::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: var(--bk-c);
}

/* the perforation: a row of punched holes and a die-cut notch at each
   side, drawn over the seam (the notches carry the page colour and an
   ink edge, clipped so only the bite into the slip shows) */
.bk3-perf {
  position: relative;
  height: 8px;
  margin: -4px 0;
  padding: 0 calc(var(--notch) + 12px);
  background:
    radial-gradient(circle at 50% 50%, var(--bk-p) 0 2px, rgba(20, 17, 12, 0.42) 2.2px 2.9px, #0000 3.3px)
    0 50% / 11px 8px space no-repeat;              /* whole holes only, edge to edge */
  background-clip: content-box;
  background-origin: content-box;
  pointer-events: none;
}
.bk3-perf::before,
.bk3-perf::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  margin-top: calc(var(--notch) * -1);
  box-sizing: border-box;
  border: 1px solid var(--bk-i);
  border-radius: 50%;
  background: var(--bk-p);
}
.bk3-perf::before {
  left: calc(var(--notch) * -1 - 0.5px);
  clip-path: inset(-2px -2px -2px calc(50% - 1.5px));
}
.bk3-perf::after {
  right: calc(var(--notch) * -1 - 0.5px);
  clip-path: inset(-2px calc(50% - 1.5px) -2px -2px);
}

/* the scheduler field */
.bk3-cal {
  position: relative;
  padding: clamp(12px, 1.4vw, 20px);
}
/* once the visitor opens it (the script removes .book-load), hold room
   for Cal.com's month view (570px on desktop) so nothing below jumps
   while it loads. Cal's <cal-inline> inherits this min-height. */
.bk3-cal:not(:has(.book-load)) { min-height: 570px; padding-bottom: 0; }

/* before the click: the GDPR note as small print, the ticket button */
body.bk3 .book-load {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: stretch;
  align-items: center;
  align-content: normal;
  gap: 28px clamp(32px, 5vw, 88px);
  min-height: 0;
  margin: 0;
  padding: clamp(22px, 2.6vw, 40px) calc(var(--bk-pad) - clamp(12px, 1.4vw, 20px));
  border: 0;
  border-radius: 0;
  text-align: left;
}
body.bk3 .book-load__note {
  max-width: 58ch;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--bk-mut);
  text-wrap: pretty;
}
body.bk3 .book-load__note a {
  color: var(--bk-i);
  text-decoration: underline;
  text-decoration-color: var(--bk-c);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--bk-e);
}
body.bk3 .book-load__note a:hover { color: var(--bk-c); }
body.bk3 .book-load .pill--lg {
  align-self: center;
  justify-self: end;
  margin: 0;
  padding: 1.35em 2.3em;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

/* no-JS: the direct link and the email, as small print under the slip */
body.bk3 .book-embed__fallback {
  max-width: 64ch;
  margin: 18px 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--bk-mut);
}
body.bk3 .book-embed__fallback a { color: var(--bk-c); }

@media (max-width: 860px) {
  body.bk3 .book-load { grid-template-columns: minmax(0, 1fr); }
  body.bk3 .book-load .pill--lg { justify-self: start; }
}

/* phones: the slip runs edge to edge so Cal.com gets the full width;
   the assurances stack as ruled rows */
@media (max-width: 620px) {
  .bk3-book { padding-top: 36px; }
  .bk3-slip {
    margin: 0 calc(var(--gutter, 20px) * -1);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .bk3-spec { grid-template-columns: minmax(0, 1fr); }
  .bk3-spec li { padding-top: 15px; padding-bottom: 15px; letter-spacing: 0.16em; }
  .bk3-spec li + li { border-left: 0; border-top: 1px solid var(--bk-rule); }
  .bk3-perf { padding: 0 calc(var(--bk-pad) - 4px); }
  .bk3-perf::before,
  .bk3-perf::after { content: none; }
  .bk3-cal { padding: 0; }
  .bk3-cal:not(:has(.book-load)) { min-height: 640px; }
  body.bk3 .book-load { padding: 28px var(--bk-pad) 32px; gap: 22px; }
  body.bk3 .book-load .pill--lg {
    justify-self: stretch;
    padding: 1.4em 1.2em;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    white-space: normal;
    text-align: center;
  }
}

/* ================================================================
   CONTACT: the homepage's closing ink block, square edges
   ================================================================ */
body.bk3 .contact {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bk-i);
  color: var(--bk-p);
  padding: clamp(80px, 8.4vw, 128px) var(--gutter) clamp(36px, 4vw, 56px);
}
body.bk3 .contact::before,
body.bk3 .contact::after { content: none; animation: none; }
body.bk3 .contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-rows: auto 1fr auto auto auto;
  grid-template-areas:
    "eye   eye"
    "head  ."
    "head  loc"
    "links links"
    "foot  foot";
  column-gap: clamp(32px, 6vw, 110px);
  align-items: start;
  text-align: left;
}
body.bk3 .contact__eyebrow {
  grid-area: eye;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bk-on-ink);
}
body.bk3 .contact__eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: var(--bk-c);
}
body.bk3 .contact__eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--bk-rule-d);
}
body.bk3 .contact__headline {
  grid-area: head;
  margin: clamp(24px, 2.8vw, 40px) 0 0;
  font-stretch: 76%;
  font-size: clamp(3.3rem, 13.4vw, 11.6rem);
  line-height: 0.84;
  letter-spacing: -0.04em;
}
body.bk3 .contact__headline em {
  color: var(--bk-c);
  -webkit-text-stroke: 0;
}
body.bk3 .contact__location {
  grid-area: loc;
  margin: 0 0 0.6em;
  font-size: 0.72rem;
  line-height: 1.6;
  letter-spacing: 0.18em;
}
body.bk3 .contact__links {
  grid-area: links;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: space-between;
  gap: 0 32px;
  margin: clamp(44px, 5vw, 72px) 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--bk-rule-d);
  border-bottom: 1px solid var(--bk-rule-d);
}
body.bk3 .contact__link {
  justify-self: start;
  padding: 4px 0 6px;
  border-bottom: 0;
  font-stretch: 86%;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
body.bk3 .contact__link::after { bottom: -1px; }
body.bk3 .contact__foot { grid-area: foot; margin-top: clamp(40px, 5vw, 72px); }
@media (max-width: 760px) {
  body.bk3 .contact__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "eye" "head" "links" "loc" "foot";
  }
  body.bk3 .contact__headline { font-size: clamp(3.4rem, 18vw, 5.4rem); }
  body.bk3 .contact__links { grid-template-columns: minmax(0, 1fr); margin-top: 36px; padding: 6px 0; }
  body.bk3 .contact__link { padding: 10px 0; }
  body.bk3 .contact__location { margin: 32px 0 0; }
  body.bk3 .contact__foot { align-items: flex-start; text-align: left; }
}

/* ================================================================
   ENTRANCE: CSS only, motion allowed only. The label rule draws, the
   headline and the support line rise, the slip follows. One timing for
   every arrival (as on the FAQ): main.js drops html.wipe-in the moment
   the ink wipe ends, so wipe-keyed delays would re-time these mid-run
   and pop the slip in.
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  .bk3-label { animation: bk3-fade 0.6s var(--bk-e) both; }
  .bk3-label__rule { transform-origin: left center; animation: bk3-draw 1s var(--bk-draw) 0.1s both; }
  .bk3-title { animation: bk3-rise 1s var(--bk-e) 0.06s both; }
  .bk3-lede { animation: bk3-rise 1s var(--bk-e) 0.18s both; }
  .bk3-slip { animation: bk3-rise 1s var(--bk-e) 0.28s both; }
}
@keyframes bk3-fade { from { opacity: 0; } }
@keyframes bk3-draw { from { transform: scaleX(0); } }
@keyframes bk3-rise { from { opacity: 0; transform: translateY(26px); } }

@media (prefers-reduced-motion: reduce) {
  body.bk3 .pill--solid::before,
  body.bk3 #nav .nav__menu .pill--ghost::before { transition: none; }
}
