/* Square Vize brand layer: tokens, type, the shared masthead and footer, actions and surfaces.
   Loaded after /styles.css and /studio.css on every page, before any page stylesheet, so it
   re-tones the baseline without repeating it. The homepage body is composed by /studio-home.css,
   loaded last; it shares only the shell defined here.

   Public pages share a charcoal masthead, ivory links and a restrained lime accent. Forms and
   tool surfaces keep their higher-density light theme. The brand mark keeps its shape across
   both surfaces.

   The mark (two folded bands, see /assets/mark.svg#sv) is referenced with <use> from the
   masthead and the footer and takes its colour from `color`, so the same silhouette serves the
   header, the footer and the favicon tile. */

:root {
  --paper: #faf9f4;
  --paper-2: #f2f0e5;
  --paper-3: #eae6d8;
  --surface: #ffffff;
  --ink: #0b0d0c;                  /* ink: about 19:1 on the paper canvas */
  --ink-2: #2a2d2a;                 /* about 12:1 on the paper canvas */
  --ink-3: #5a5d57;                 /* about 5.9:1 on the paper canvas, safe for small text */
  --rule: #e3dfd2;
  --rule-strong: #b8b3a2;
  --accent: #577a1e;                /* leaf: about 6.5:1 as text on white and under white text */
  --accent-ink: #3f5a14;            /* hover and pressed leaf: about 8.6:1 under white text */
  --accent-soft: #eef2e0;
  --accent-on-dark: #b7d971;        /* leaf lifted for the dark plate: about 10:1 on ink */
  --plate: #0b0d0c;
  --plate-2: #16180f;
  --plate-ink: #ffffff;
  --plate-ink-2: #c9c6b9;          /* about 11:1 on ink */
  --plate-rule: rgba(255, 255, 255, 0.22);
  --radius: 4px;
  --radius-l: 8px;
  --pill: 6px;                     /* actions and chips are square-cut, like the mark */
  --head-h: 64px;
  --cobalt: var(--accent);
  --cobalt-dark: var(--accent-ink);
  --cobalt-ink: #ffffff;
  --signal: var(--accent);
  --signal-ink: #ffffff;
  --woro: var(--plate-ink-2);
}

/* ---- Base ------------------------------------------------------------------------------- */
::selection { background: var(--accent-soft); color: var(--ink); }
h1, h2, h3, h4 { font-weight: 600; }
h1 { letter-spacing: -0.036em; }
a:hover { text-decoration-color: var(--accent); }
.link:hover { text-decoration-color: var(--accent); }
.plate :focus-visible, .foot-plate :focus-visible { outline-color: var(--accent-on-dark); }

/* ---- Masthead --------------------------------------------------------------------------- */
.site-head {
  --ink: #f5f0e7;
  --ink-2: #ddd6c9;
  --paper: #111312;
  --rule: #3b3d39;
  --accent: #b7d971;
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-head-row { min-height: var(--head-h); gap: clamp(12px, 2vw, 28px); }
.brand { gap: 10px; color: var(--ink); }
.brand .mark { color: var(--accent); }
.brand-name { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.035em; }
.brand:focus-visible { outline-offset: 4px; }
.site-nav ul { gap: clamp(2px, 1.1vw, 18px); }
.site-nav a, .site-nav a.nav-adviser, .site-nav a.nav-cta {
  min-height: 44px;
  margin: 0;
  padding: 0 5px;
  border: 0;
  border-radius: 0;
  color: var(--ink-2);
  background: transparent;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a.nav-cta { color: var(--accent); }
.site-nav a.nav-adviser::before { content: none; }
.site-nav a:hover, .site-nav a[aria-current="page"],
.site-nav a.nav-cta:hover, .site-nav a.nav-cta[aria-current="page"] {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-color: var(--accent);
}
.site-nav a:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle { min-height: 44px; color: var(--ink); border: 0; border-radius: 0; background: transparent; }
@media (max-width: 860px) {
  .nav-toggle:not([hidden]) + ul {
    gap: 0;
    padding: 4px var(--gutter) 12px;
    max-height: calc(100dvh - var(--head-h));
    overflow-y: auto;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .nav-toggle:not([hidden]) + ul li + li { border-top: 1px solid var(--rule); }
  .nav-toggle:not([hidden]) + ul a,
  .nav-toggle:not([hidden]) + ul a.nav-cta { margin: 0; padding: 0 4px; min-height: 48px; justify-content: start; font-size: 1rem; }
  .nav-toggle:not([hidden]) + ul a:focus-visible { outline-offset: -2px; }
}

/* ---- Books product head ------------------------------------------------------------------ */
/* Native product surface, not the marketing masthead: own sticky row, own ink, no overlays. */
.books-product-head {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--head-h);
  display: flex;
  align-items: center;
  color: #171917;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.books-product-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 24px);
  min-width: 0;
  height: 100%;
}
.books-product-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #171917;
  text-decoration: none;
}
.books-product-brand .mark { color: #171917; flex: none; }
.books-product-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.books-product-name-sv { font-weight: 500; }
.books-product-name-books { font-weight: 700; }
.books-product-account {
  flex: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  color: #171917;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.books-product-account:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.3em;
}
.books-product-brand:focus-visible, .books-product-account:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media print {
  .books-product-head { display: none; }
}

/* ---- Actions ---------------------------------------------------------------------------- */
.btn { background: var(--accent); border-color: var(--accent); color: #ffffff; border-radius: var(--radius); font-weight: 600; }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #ffffff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { background: var(--paper-2); border-color: var(--ink); color: var(--ink); }
.plate .btn { background: #ffffff; color: var(--plate); border-color: #ffffff; }
.plate .btn:hover { background: var(--paper-2); border-color: var(--paper-2); color: var(--plate); }
.plate .btn.ghost { background: transparent; color: var(--plate-ink); border-color: var(--plate-rule); }
.plate .btn.ghost:hover { background: transparent; border-color: #ffffff; color: #ffffff; }

/* ---- Footer ----------------------------------------------------------------------------- */
/* Interior pages: the closing invitation on paper, then the directory on the midnight plate.
   The homepage, the enquiry form and the console omit the invitation. */
.site-foot { margin-top: clamp(56px, 8vw, 112px); border-top: 1px solid var(--rule); background: var(--paper); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 6vw, 80px); border-bottom: 0; }
.foot-title { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); letter-spacing: -0.03em; max-width: 20ch; margin-bottom: 0.4em; }
.foot-lede { color: var(--ink-2); max-width: 52ch; margin: 0; }
.foot-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr; } }

.foot-plate {
  --plate: #111312;
  --plate-ink: #f5f0e7;
  --plate-ink-2: #c8c5bc;
  --plate-rule: #4a4b45;
  --accent-on-dark: #b7d971;
  background: var(--plate);
  color: var(--plate-ink);
}
.foot-brand-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px var(--gutter); align-items: end; padding-block: clamp(40px, 5vw, 64px) clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--plate-rule); }
.foot-plate .brand { color: var(--plate-ink); }
.foot-plate .brand .mark { color: #ffffff; }
.foot-positioning { margin: 18px 0 0; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.65rem); font-weight: 500; letter-spacing: -0.022em; line-height: 1.25; color: var(--plate-ink); max-width: 24ch; text-wrap: balance; }
.foot-scope { margin: 0; color: var(--plate-ink-2); max-width: 46ch; }
.foot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px var(--gutter); padding-block: clamp(32px, 4vw, 52px) clamp(24px, 3vw, 40px); }
.foot-head { margin: 0 0 10px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--plate-ink); }
.foot-col .plain li { padding: 4px 0; border: 0; }
.foot-col a { font-size: 0.9rem; line-height: 1.45; color: var(--plate-ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--plate-ink); text-decoration: underline; text-decoration-color: var(--accent-on-dark); text-underline-offset: 0.2em; }
.foot-col a[aria-current="page"] { color: var(--plate-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-on-dark); text-underline-offset: 0.2em; }
.foot-col a:focus-visible, .foot-plate .brand:focus-visible, .foot-legal a:focus-visible { outline-color: var(--accent-on-dark); outline-offset: 3px; }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid var(--plate-rule); padding-block: 18px 28px; color: var(--plate-ink-2); }
.foot-legal-links { display: inline-flex; gap: 20px; }
.foot-legal a { color: var(--plate-ink-2); text-decoration: none; }
.foot-legal a:hover { color: var(--plate-ink); text-decoration: underline; }
@media (max-width: 1080px) { .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .foot-brand-row .foot-brand { grid-column: auto; padding-right: 0; } }
@media (max-width: 900px) { .foot-brand-row { grid-template-columns: 1fr; align-items: start; } }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px var(--gutter); } }

/* ---- Motion, forced colours ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .site-nav a, .foot-col a, .btn, .brand .mark { transition: none; }
}
@media (forced-colors: active) {
  .site-nav a[aria-current="page"], .foot-col a[aria-current="page"] { text-decoration: underline; }
  .foot-plate, .foot-brand-row, .foot-legal { border-color: CanvasText; }
}

/* Open service shelf. Product silhouettes, spacing and labels distinguish destinations. */
.desk-shelf {background: var(--paper-2); color:var(--ink); padding:clamp(24px,3vw,44px) 0;}
.desk-shelf h2 {margin:0 0 14px; font-size:clamp(22px,2.4vw,34px); letter-spacing:-.045em; line-height:1.12;}
.desk-shelf ul {list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(10px,2.7vw,42px);}
.desk-shelf li {min-width:0; padding:0; margin:0;}
.desk-shelf a {min-height:88px; display:flex; align-items:center; gap:clamp(9px,1vw,18px); color:inherit; text-decoration:none; border:none; border-radius:4px;}
.desk-shelf a:hover strong,.desk-shelf a:focus-visible strong {color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:.2em;}
.desk-shelf img {width:clamp(65px,6.7vw,105px);height:auto;aspect-ratio:1;mix-blend-mode:multiply;flex:none;border:0;border-radius:50%;}
.desk-shelf span {min-width:0;}
.desk-shelf strong,.desk-shelf small {display:block;}
.desk-shelf strong {font-size:clamp(16px,1.18vw,20px);letter-spacing:-.025em;line-height:1.18;}
.desk-shelf small {margin-top:5px;color:var(--ink-2);font-size:13px;line-height:1.4;}
@media(max-width:800px) {
  .desk-shelf ul {gap:8px;}
  .desk-shelf a {flex-direction:column;align-items:center;text-align:center;gap:6px;min-height:96px;}
  .desk-shelf img {width:clamp(49px,12vw,76px);}
  .desk-shelf strong {font-size:clamp(12px,2.7vw,16px);line-height:1.25;}
  .desk-shelf small {display:none;}
}
.desk-finder {max-width:50rem; margin:0 0 24px;}
.desk-finder label {display:block; font-size:14px; font-weight:650; color:var(--ink); margin:0 0 5px;}
.desk-finder input {width:100%; min-height:48px; padding:10px 17px; font-family:inherit; font-size:16px; color:var(--ink); background:#fff; border:1px solid var(--rule-strong); border-radius:100px;}
.desk-hits {padding:9px 0 0;}
.desk-hits p {margin:.4rem 0;color:var(--ink-3);font-size:14px;}
.desk-hits ul {display:flex; flex-direction:column;align-items:start;list-style:none;padding:0;margin:0;}
.desk-hits a {display:inline-block; padding:8px 0; font-size:16px;color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);font-weight:600;}
.desk-finder [hidden],.desk-finder[hidden] {display:none;}

/* Inside the catalogue, the shelf aligns to the page gutter already established by its parent. */
.svc-index .desk-shelf {margin:clamp(20px,3vw,40px) 0; background:transparent; padding:0;}
.svc-index .desk-shelf>.wrap {width:100%; margin:0;}
.svc-index .desk-shelf h2 {font-size:clamp(18px,1.8vw,25px);}
.svc-index .desk-finder {margin:0 0 20px;}
.svc-index .page-head {padding-bottom:0; border-bottom:none; margin-bottom:12px;}

/* The dark introduction continues the studio masthead on public routes. Its paint extends
   beyond the reading width. Forms and data tables below keep their own working surfaces. */
:is(.is-services,.is-setup,.is-enquire,.is-consultation,.is-signup,.is-plans,.is-woro,.is-about,.is-journey) main > .section:has(> .page-head) { padding-top:0; }
:is(.is-services,.is-setup,.is-enquire,.is-consultation,.is-signup,.is-plans,.is-woro,.is-about,.is-journey) main :is(.page-head,.journey-hero) {
  --ink:#f4f1ea;
  --ink-2:#dfded9;
  --ink-3:#c6c3b6;
  --accent:#b7d971;
  --accent-ink:#d6ecab;
  --rule:#3d3f37;
  --rule-strong:#6b6d62;
  --intro-action-ink:#0b0d0c;
  position:relative;
  isolation:isolate;
  padding-block:clamp(20px,3vw,44px);
  color:var(--ink);
  border-bottom:0;
}
:is(.is-services,.is-setup,.is-enquire,.is-consultation,.is-signup,.is-plans,.is-woro,.is-about,.is-journey) main :is(.page-head,.journey-hero)::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  background:#0f1110;
  box-shadow:0 0 0 100vmax #0f1110;
  clip-path:inset(0 -100vmax);
  pointer-events:none;
}
:is(.page-head,.journey-hero) .btn:not(.ghost) { color:var(--intro-action-ink,#fff); }
:is(.page-head,.journey-hero) .btn.ghost:hover { color:var(--intro-action-ink,var(--ink)); }
@media(forced-colors:active) {
  :is(.page-head,.journey-hero)::before { display:none; }
}
