/* ============================================================
   Amves — brand layer on top of style.css
   Colours from the logo (navy → brand blue → ice), Jost to echo
   the logo's light geometric wordmark, the pane-grid motif from
   their banner, and the window configurator.
   ============================================================ */

/* Palette tokens only on the bare :root — `:root` and `[data-theme=…]` have the
   same specificity and this file loads last, so setting them on plain :root
   would silently beat every palette in the picker. */
:root:not([data-theme]) {
  --surface:     #e7edf4;
  --surface-2:   #f3f6fa;
  --accent:      #136aad;
  --accent-deep: #0d5490;
  --accent-hover:#0f5c98;
  --accent-ink:  #ffffff;
  --cta:         #141c3d;
  --dark:        #141c3d;
}
:root {
  --bg:          #ffffff;
  --text:        #0f1a2e;
  --body:        #4b5768;
  --muted:       #687385;
  --line:        #d8e0ea;
  --cta-text:    #ffffff;
  --dark-text:   #e9eef6;
  --dark-muted:  #9aa6b8;
  --ink-line:    #223047;   /* drawing strokes */

  --mark-1: var(--dark);
  --mark-2: var(--accent);
  --mark-3: color-mix(in srgb, var(--accent) 42%, #fff);

  --font-display: 'Jost', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --shadow: 0 2px 6px rgba(15,26,46,.05), 0 18px 48px rgba(15,26,46,.09);
  --shadow-sm: 0 1px 3px rgba(15,26,46,.06), 0 6px 18px rgba(15,26,46,.07);
}
/* the logo's own three blues when no palette is picked */
:root:not([data-theme]) { --mark-1: #292d77; --mark-2: #136aad; --mark-3: #8cc3df; }

h1, h2, h3 { letter-spacing: -.015em; }
.btn--dark:hover { background: color-mix(in srgb, var(--dark) 82%, #fff); }
.langs button.is-active { background: var(--dark); }
.hdr__in { background: rgba(243,246,250,.92); }

/* ---------- logo: redrawn pane-grid mark + wordmark ---------- */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mk { flex: none; width: 21px; height: 37px; }
.brand .brand__tx { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; letter-spacing: .005em; line-height: 1; color: var(--accent-deep); }
.brand .brand__tx small { margin-top: 4px; letter-spacing: .16em; }
.foot .brand__mk { width: 24px; height: 42px; }

/* ---------- hero: a field of glass panes fading out from the top right,
   the motif of their 2014 banner ---------- */
.ha__panes {
  position: absolute; z-index: -1; top: 0; right: 0; width: min(62%, 980px); height: 100%; pointer-events: none;
  background-color: color-mix(in srgb, var(--accent) 11%, var(--surface-2));
  background-image:
    linear-gradient(90deg, var(--surface-2) 7px, transparent 7px),
    linear-gradient(var(--surface-2) 7px, transparent 7px);
  background-size: 58px 66px;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, rgba(0,0,0,.55) 35%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, rgba(0,0,0,.55) 35%, transparent 72%);
}
@media (max-width: 999px) { .ha__panes { width: 100%; height: 55%; } }
.ha__cta .btn--line { background: rgba(255,255,255,.7); }

/* ---------- services: several stock photos are portrait (498×1008); in flow they
   set the row height and a card grew to ~1200px. Placed absolutely they fill
   whatever height the text gives the card. ---------- */
.srow__ph { position: relative; }
.srow__ph img { position: absolute; inset: 0; }

/* ---------- contact: monogram instead of a stock face ---------- */
.ct__mono {
  flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--dark); color: #fff; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .04em;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent);
}
.ct__head .lead { margin-top: 1rem; }
.ct__empty { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--body); }
.ct__tocfg { display: inline-block; margin-top: .6rem; font-size: .875rem; font-weight: 600; color: var(--accent-deep); }
.ct__items:not(:empty) ~ .ct__tocfg { display: none; }

/* =========================================================
   CONFIGURATOR (#aken, konfig.js)
   ========================================================= */
.cfg { background: var(--bg); border-top: 1px solid var(--line); }
.cfg__head { max-width: 62ch; }
.cfg__head .lead { margin-top: 1rem; }
.cfg__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: clamp(2rem, 4vw, 3rem); align-items: start; }

/* the drawing, on drafting paper */
.cfg__stage {
  position: sticky; top: 100px; z-index: 2;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .9rem .9rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.cfg__bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { font: inherit; font-size: .8125rem; font-weight: 600; padding: .4rem .9rem; border: 0; border-radius: 999px; background: none; color: var(--body); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--dark); color: #fff; }
.cfg__u { font-size: .78rem; font-weight: 600; padding: .35rem .75rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent-deep); white-space: nowrap; }
.cfg__draw {
  position: relative; height: clamp(320px, 52vh, 520px); border-radius: var(--r-sm);
  background-color: var(--surface-2);
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
/* absolutely placed: as a grid/flex child the svg took its intrinsic height and spilled out */
.cfg__draw svg { position: absolute; inset: 1rem; width: calc(100% - 2rem); height: calc(100% - 2rem); }
.cfg__cap { margin: .85rem 0 0; font-weight: 600; font-size: .9375rem; color: var(--text); }
.cfg__note { margin: .3rem 0 0; font-size: .8125rem; line-height: 1.5; color: var(--muted); }

/* drawing parts (also used by the shape tiles and list thumbnails) */
.k-fr { stroke: var(--ink-line); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.k-gr { stroke: none; pointer-events: none; }
.k-gl { stroke: var(--ink-line); stroke-width: .8; vector-effect: non-scaling-stroke; }
.k-sh { fill: rgba(255,255,255,.32); }
.k-op { fill: none; stroke: var(--ink-line); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .75; }
.k-hd { fill: #f5f6f7; stroke: var(--ink-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.k-dim path { fill: none; stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.k-dim text { fill: var(--body); font-family: var(--font-body); font-weight: 500; }

/* the steps */
.cfg__form { min-width: 0; }
.cfg__step { margin: 0; padding: 0 0 1.4rem; border: 0; min-width: 0; }
.cfg__step + .cfg__step { padding-top: 1.4rem; border-top: 1px dashed color-mix(in srgb, var(--text) 13%, transparent); }
.cfg__step legend { float: left; width: 100%; display: flex; align-items: center; gap: .65rem; padding: 0; margin-bottom: .9rem; font-weight: 600; font-size: 1rem; color: var(--text); }
.cfg__step legend + * { clear: both; }
.cfg__n { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; font-size: .72rem; letter-spacing: .04em; color: var(--accent-deep); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: #fff; }

.shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.shape { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .65rem .4rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: center; transition: border-color .2s var(--ease), background .2s var(--ease); }
.shape input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.shape__ic { display: grid; place-items: center; height: 60px; width: 100%; }
.shape__ic svg { height: 100%; width: auto; max-width: 100%; }
.shape__t { font-size: .72rem; line-height: 1.25; color: var(--body); }
.shape:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.shape:has(input:checked) { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 8%, #fff); box-shadow: inset 0 0 0 1px var(--accent-deep); }
.shape:has(input:checked) .shape__t { color: var(--text); font-weight: 600; }
.shape:has(input:focus-visible) { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

.cfg__form .chip { position: relative; display: inline-block; margin: 0; cursor: pointer; }

.opens { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.sel, .num { position: relative; display: grid; gap: .3rem; font-size: .8125rem; color: var(--body); }
.sel select, .num input {
  width: 100%; font: inherit; font-size: .9375rem; color: var(--text); background-color: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; transition: border-color .2s, box-shadow .2s;
}
.sel select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23687385' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px;
}
.num input { padding-right: 2.6rem; font-variant-numeric: tabular-nums; }
.num i { position: absolute; right: .85rem; bottom: .8rem; font-style: normal; font-size: .8rem; color: var(--muted); pointer-events: none; }
.sel select:focus, .num input:focus { outline: 0; border-color: var(--accent-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.cfg__hint { margin: .55rem 0 0; font-size: .8125rem; color: var(--muted); }

/* colour swatches: real radios, woodgrains striped, custom colour as a wheel */
.sw + .sw { margin-top: 1.1rem; }
.sw__h { margin: 0 0 .55rem; font-size: .8125rem; color: var(--body); }
.sw__h b { color: var(--text); font-weight: 600; }
.sw.is-viewed .sw__h > span:first-child { color: var(--accent-deep); font-weight: 600; }
.sw__set { display: flex; flex-wrap: wrap; gap: .4rem; }
.sw__b { position: relative; width: 30px; height: 30px; cursor: pointer; }
.sw__b input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sw__b span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.sw__b.is-wood span { background: repeating-linear-gradient(100deg, rgba(0,0,0,.16) 0 1.5px, transparent 1.5px 5px), var(--c); }
.sw__b.is-eri span { background: conic-gradient(#d94b4b, #e8c43a, #4fae62, #3a8fd6, #9b5ac8, #d94b4b); }
.sw__b:hover span { transform: scale(1.1); }
.sw__b input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent-deep); }
.sw__b input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 5px; }
@media (pointer: coarse) { .sw__b { width: 34px; height: 34px; } }

.glass { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.glass__o { position: relative; cursor: pointer; }
.glass__o input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.glass__c { display: grid; align-content: start; gap: .25rem; height: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .2s var(--ease), background .2s var(--ease); }
.glass__c b { font-size: .9375rem; color: var(--text); }
.glass__c small { font-size: .74rem; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.glass__o:hover .glass__c { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.glass__o input:checked + .glass__c { border-color: var(--accent-deep); background: color-mix(in srgb, var(--accent) 8%, #fff); box-shadow: inset 0 0 0 1px var(--accent-deep); }
.glass__o input:focus-visible + .glass__c { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; align-items: end; }
.tick { display: flex; align-items: center; gap: .6rem; min-height: 46px; font-size: .9rem; color: var(--text); cursor: pointer; }
.tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-deep); }

.cfg__add { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding-top: .3rem; }
.cfg__add .btn svg { width: 16px; height: 16px; }
.cfg__added { font-size: .875rem; font-weight: 600; color: var(--accent-deep); }

/* the request list, here and mirrored in the contact form */
.cfg__list { margin-top: clamp(2rem, 4vw, 3rem); padding: clamp(1.1rem, 3vw, 1.8rem); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.cfg__list-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.cfg__list-h h3 { font-size: 1.35rem; }
.cfg__items, .ct__items { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.cfg__items li, .ct__items li {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: .85rem; align-items: center;
  padding: .6rem .7rem; background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.ct__items li { grid-template-columns: 42px minmax(0, 1fr); background: var(--surface-2); }
.ct__items:not(:empty) { margin-bottom: .2rem; }
.it__ic { display: grid; place-items: center; height: 52px; }
.ct__items .it__ic { height: 44px; }
.it__ic svg { height: 100%; width: auto; max-width: 100%; }
.it__tx { min-width: 0; }
.it__tx b { display: block; font-size: .9375rem; color: var(--text); }
.it__tx span { display: block; margin-top: .1rem; font-size: .8rem; line-height: 1.45; color: var(--body); }
.it__x { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.it__x svg { width: 14px; height: 14px; }
.it__x:hover { color: var(--text); border-color: var(--text); }

/* stacked: the drawing stays pinned under the header, compact, while the
   steps scroll beneath it — so every choice is seen to change the window */
@media (max-width: 999px) {
  .cfg__grid { grid-template-columns: minmax(0, 1fr); }
  .cfg__stage { top: 76px; padding: .55rem .55rem .65rem; box-shadow: 0 12px 26px -14px rgba(15,26,46,.35); }
  .cfg__bar { margin-bottom: .45rem; }
  .cfg__draw { height: min(30vh, 260px); }
  .cfg__draw svg { inset: .5rem; width: calc(100% - 1rem); height: calc(100% - 1rem); }
  .cfg__cap { margin-top: .5rem; font-size: .8125rem; }
  .cfg__note { display: none; }
}
@media (max-width: 560px) {
  .shape { padding: .5rem .25rem; }
  .shape__ic { height: 44px; }
  .shape__t { font-size: .64rem; }
  .glass { grid-template-columns: minmax(0, 1fr); }
  .dims { gap: .45rem; }
  .num input { padding-inline: .6rem 2.1rem; }
  .num i { right: .6rem; }
  .cfg__items li { grid-template-columns: 42px minmax(0, 1fr) auto; gap: .6rem; }
  .it__ic { height: 44px; }
}
/* short landscape phones: a pinned drawing would leave no room for the steps */
@media (max-width: 999px) and (max-height: 600px) {
  .cfg__stage { position: static; }
}

/* =========================================================
   EXTRA PALETTES (the rest are in style.css)
   ========================================================= */
[data-theme="klaas"] {
  --accent: #11759e; --accent-deep: #0b5878; --accent-hover: #0f6a8f; --accent-ink: #ffffff;
  --cta: #0c2230; --dark: #0c2230; --surface: #e3eff4; --surface-2: #f1f7f9;
}
[data-theme="tamm"] {
  --accent: #9a5f28; --accent-deep: #74461b; --accent-hover: #8a5524; --accent-ink: #ffffff;
  --cta: #22160c; --dark: #22160c; --surface: #f1ebe4; --surface-2: #f9f5f1;
}
[data-theme="indigo"] {
  --accent: #4b52a8; --accent-deep: #353b85; --accent-hover: #434a98; --accent-ink: #ffffff;
  --cta: #161838; --dark: #161838; --surface: #e9eaf4; --surface-2: #f4f5fa;
}
