/* EDEV Ehitus — black + gold. Contract: .build/DIRECTION.md */

:root {
  --ink-0: #0A0A0B;
  --ink-1: #111113;
  --ink-2: #19191C;
  --ink-3: #232327;
  --text: #ECE8E0;
  --muted: #A39D92;
  --line: rgba(236, 232, 224, .09);
  --gold: #C6A15B;      /* placeholder until the client's logo file arrives */
  --gold-hi: #E7CD8E;
  --gold-lo: #8A6C34;
  --gold-ink: #0A0A0B;
  --gold-tint: rgba(198, 161, 91, .12);
  --err: #F08A7B;

  --display: 'Tektur', 'Golos Text', system-ui, sans-serif;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1280px;
  --gut: clamp(16px, 4vw, 48px);
  --head-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --cut: 10px;
  --sec: clamp(64px, 9vw, 130px);
  --div-h: clamp(36px, 5.5vw, 84px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink-0);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.ed-no-scroll { overflow: hidden; }
main { flex: 1 0 auto; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
button { font: inherit; }
[id] { scroll-margin-top: calc(var(--head-h) + 20px); }
::selection { background: var(--gold); color: var(--gold-ink); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}

.ed-wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin-inline: auto; }
.ed-vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ed-skip {
  position: absolute; left: 12px; top: -80px; z-index: 300;
  background: var(--gold); color: var(--gold-ink); padding: 12px 16px;
  font: 600 .9rem var(--display); text-decoration: none;
}
.ed-skip:focus { top: 12px; }

/* ---------- type ---------- */
.ed-h1, .ed-h2, .ed-mh-h {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 90%;
  letter-spacing: -.012em;
  line-height: 1.02;
  text-wrap: balance;
}
.ed-h1 { font-size: clamp(2.6rem, 6.4vw, 6rem); }
.ed-h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.ed-lead { font-size: clamp(1.08rem, 1.45vw, 1.28rem); line-height: 1.55; color: var(--text); }

/* ---------- buttons + links ---------- */
.ed-btn {
  --c: var(--cut);
  display: inline-flex; align-items: center; justify-content: center; gap: .65em;
  min-height: 48px; padding: 0 1.4em;
  font: 600 .82rem/1 var(--display); letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.ed-btn .ed-ic { width: 1.15em; height: 1.15em; transition: transform .25s var(--ease); }
.ed-btn:hover .ed-ic { transform: translateX(3px); }
.ed-btn:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: -6px; }
.ed-btn--gold { background: var(--gold); color: var(--gold-ink); }
.ed-btn--gold:hover { background: var(--gold-hi); }
.ed-btn--sm { min-height: 40px; padding: 0 1.1em; font-size: .74rem; --c: 7px; }
.ed-btn--lg { min-height: 56px; padding: 0 1.7em; font-size: .86rem; }
.ed-btn:disabled { opacity: .6; cursor: progress; }

.ed-link-arrow {
  display: inline-flex; align-items: center; gap: .55em; min-height: 44px;
  color: var(--gold); text-decoration: none;
  font: 600 .8rem/1 var(--display); letter-spacing: .09em; text-transform: uppercase;
}
.ed-link-arrow .ed-ic { width: 1.1em; height: 1.1em; transition: transform .25s var(--ease); }
.ed-link-arrow:hover { color: var(--gold-hi); }
.ed-link-arrow:hover .ed-ic { transform: translateX(4px); }

.ed-ic { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- header ---------- */
.ed-head {
  position: sticky; top: 0; z-index: 50;
  height: var(--head-h);
  margin-bottom: calc(var(--head-h) * -1);   /* glass: the first section runs underneath */
  isolation: isolate;
  transition: box-shadow .3s var(--ease);
}
/* blur on a pseudo-element, never on .head itself (mistakes M01: backdrop-filter traps fixed children) */
.ed-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(10, 10, 11, .48);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
          backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 -1px 0 rgba(236, 232, 224, .08);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ed-head::before { background: rgba(10, 10, 11, .92); }
}
.ed-head.ed-is-scrolled { box-shadow: 0 1px 0 var(--line), 0 12px 32px -18px rgba(0, 0, 0, .8); }
.ed-head-in {
  height: 100%;
  width: min(1440px, 100% - 2 * var(--gut));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
.ed-head-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ed-nav-a {
  --c: 6px;
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  font: 500 .78rem/1 var(--display); letter-spacing: .11em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color .2s, color .2s;
}
.ed-nav-a:hover { background: var(--ink-2); }
.ed-nav-a.ed-is-current { background: var(--gold-tint); color: var(--gold-hi); }
.ed-nav-a:focus-visible { outline-offset: -3px; }
.ed-head-logo { display: block; color: var(--gold); justify-self: center; transition: color .25s; }
.ed-head-logo:hover { color: var(--gold-hi); }
.ed-logo { height: 54px; width: auto; aspect-ratio: 1580 / 862; }
.ed-mark { width: 100%; height: auto; aspect-ratio: 1580 / 640; }
.ed-head-r { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }

.ed-head-call, .ed-head-menu {
  display: none; width: 44px; height: 44px; place-items: center;
  color: var(--text); background: var(--ink-2); text-decoration: none;
}
.ed-head-call { color: var(--gold); }
.ed-head-call .ed-ic, .ed-head-menu .ed-ic { width: 22px; height: 22px; }

/* mobile menu */
.ed-mnav {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink-0);
  display: flex; flex-direction: column;
  padding: 12px var(--gut) max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.ed-mnav-top { display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.ed-mnav-logo { color: var(--gold); width: 64px; }
.ed-mnav-close {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--ink-2); color: var(--text); border: 0; cursor: pointer;
}
.ed-mnav-close .ed-ic { width: 22px; height: 22px; }
.ed-mnav-nav ul { list-style: none; margin: 0; padding: 36px 0 28px; display: grid; gap: 2px; }
.ed-mnav-a {
  display: block; padding: 8px 0;
  font: 600 clamp(2rem, 9vw, 2.6rem)/1.12 var(--display); font-stretch: 90%;
  color: var(--text); text-decoration: none;
}
.ed-mnav-a.ed-is-current { color: var(--gold); }
.ed-mnav-foot { margin-top: auto; display: grid; gap: 12px; justify-items: start; }
.ed-mnav-tel {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.ed-mnav-tel .ed-ic { color: var(--gold); }
.ed-mnav.ed-is-open .ed-mnav-nav li { animation: rise .5s var(--ease) backwards; }
.ed-mnav.ed-is-open .ed-mnav-nav li:nth-child(2) { animation-delay: .05s; }
.ed-mnav.ed-is-open .ed-mnav-nav li:nth-child(3) { animation-delay: .1s; }
.ed-mnav.ed-is-open .ed-mnav-nav li:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- «Peegelpind» hero ---------- */
.ed-mh {
  --hs: clamp(3.1rem, 8.4vw, 7.6rem);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--ink-0);
}
.ed-mh--page { --hs: clamp(2.6rem, 7vw, 6.2rem); min-height: calc(min(80svh, 780px) + var(--head-h)); }
.ed-mh-photo { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.ed-mh-photo picture { position: absolute; inset: 0; }
.ed-mh-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%;
  filter: brightness(.74) contrast(1.06) saturate(.82);
}
.ed-mh.ed-is-fit .ed-mh-photo img { position: absolute; }
.ed-mh-shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg,
    rgba(10, 10, 11, .5) 0%, rgba(10, 10, 11, .82) 16%, rgba(10, 10, 11, .72) 34%,
    rgba(10, 10, 11, .34) 54%, rgba(10, 10, 11, .4) 70%, rgba(10, 10, 11, .9) 100%);
}

.ed-mh-in { padding-top: calc(var(--head-h) + 48px); padding-bottom: calc(clamp(28px, 6vh, 64px) + var(--div-h)); }
.ed-mh-h { font-size: var(--hs); line-height: .92; font-weight: 650; font-stretch: 88%; color: var(--text); }
.ed-mh-h span { display: block; }
.ed-mh-mirror {
  height: calc(var(--hs) * .8);
  overflow: hidden; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .2) 45%, transparent 88%);
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, .62), rgba(0, 0, 0, .2) 45%, transparent 88%);
}
.ed-mh-mirror-in { transform: scaleY(-1); filter: blur(1.4px); opacity: .62; }
.ed-mh-body {
  display: grid; grid-template-columns: minmax(0, 40rem) auto;
  align-items: end; gap: 24px 48px; margin-top: 2px;
}
.ed-mh-lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.55; color: rgba(236, 232, 224, .9); margin: 0; max-width: 38rem; }
.ed-mh-act { display: flex; align-items: center; gap: 12px 26px; flex-wrap: wrap; justify-content: flex-end; }
.ed-tel-link {
  display: inline-flex; align-items: center; gap: .6em; min-height: 44px;
  font: 600 1.05rem/1 var(--display); color: var(--text); text-decoration: none; white-space: nowrap;
}
.ed-tel-link .ed-ic { color: var(--gold); }
.ed-tel-link:hover { color: var(--gold-hi); }

/* text-only page head (tööd, kontakt): black-glass floor */
.ed-ph { --hs: clamp(2.6rem, 7vw, 6.2rem); padding-top: calc(var(--head-h) + clamp(56px, 8vw, 112px)); position: relative; }
.ed-ph-floor {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, #19191c 0%, #111113 40%, var(--ink-0) 100%);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.ed-ph-floor > .ed-wrap { position: relative; }
.ed-ph-lead { max-width: 42rem; margin: 6px 0 0; color: rgba(236, 232, 224, .86); }

/* ---------- section dividers ---------- */
.ed-roofs-sec, .ed-about, .ed-free, .ed-foot, .ed-fit, .ed-layers, .ed-fi-band, .ed-svc { position: relative; }
.ed-divider {
  position: absolute; left: 0; right: 0; bottom: 100%; z-index: 2;
  height: var(--div-h); color: var(--div-c, var(--ink-0)); pointer-events: none;
}
.ed-divider svg { display: block; width: 100%; height: 100%; }
.ed-about, .ed-layers { --div-c: var(--ink-1); }
.ed-foot { --div-c: #070708; }
.ed-fi-band { --div-c: var(--ink-0); background: var(--ink-0); }

/* ---------- the two roofs ---------- */
.ed-roofs-sec { padding: var(--sec) 0 clamp(40px, 6vw, 80px); }
.ed-roofs {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(20px, 3vw, 44px);
  align-items: end;
}
.ed-roof { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.ed-roof-photo { position: relative; display: block; container-type: inline-size; align-self: end; }
/* the mark's own gable: rise/run 0.91 → apex rises 45.5% of the panel width */
.ed-roof-pic img {
  width: 100%; aspect-ratio: 1.12; object-fit: cover;
  clip-path: polygon(0 45.5cqw, 50% 0, 100% 45.5cqw, 100% 100%, 0 100%);
  transition: filter .5s var(--ease);
  filter: brightness(.9);
}
.ed-roof-photo:hover img { filter: brightness(1.02); }
.ed-roof-text { padding-top: 28px; display: grid; gap: 12px; align-content: start; justify-items: start; }
.ed-roof-text p { margin: 0; color: rgba(236, 232, 224, .86); max-width: 36rem; }
.ed-roof-text h3 a { display: inline-block; padding: 7px 0; margin: -7px 0; text-decoration: none; }
.ed-roof-text h3 a:hover { color: var(--gold-hi); }
.ed-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0; }
.ed-tags li { font-size: .8rem; line-height: 1; padding: 8px 11px; background: var(--ink-2); color: var(--muted); }

/* ---------- works ---------- */
.ed-works-sec { padding: var(--sec) 0; }
.ed-works-sec--strip { padding-top: clamp(48px, 6vw, 96px); }
.ed-sec-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end; gap: 12px 40px; margin-bottom: clamp(28px, 4vw, 48px);
}
.ed-sec-head p { margin: 0; color: var(--muted); max-width: 34rem; }
.ed-sec-head--narrow { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.ed-sec-head--narrow p { color: rgba(236, 232, 224, .86); font-size: 1.1rem; }

.ed-mosaic {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(170px, 17vw, 262px); gap: 12px;
}
.ed-mosaic .ed-m1 { grid-column: 1 / 8; grid-row: 1 / 3; }
.ed-mosaic .ed-m2 { grid-column: 8 / 13; grid-row: 1; }
.ed-mosaic .ed-m3 { grid-column: 8 / 13; grid-row: 2; }
.ed-mosaic .ed-m4 { grid-column: 1 / 5; grid-row: 3; }
.ed-mosaic .ed-m5 { grid-column: 5 / 9; grid-row: 3; }
.ed-mosaic .ed-m6 { grid-column: 9 / 13; grid-row: 3; }

.ed-work { position: relative; margin: 0; overflow: hidden; background: var(--ink-1); min-height: 0; }
.ed-work-link { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; }
.ed-work-link:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: -4px; }
.ed-work-img, .ed-work-img picture, .ed-work-img img { display: block; width: 100%; height: 100%; }
.ed-work-img img { object-fit: cover; transition: transform .9s var(--ease), filter .5s; filter: brightness(.92); }
.ed-work:hover .ed-work-img img { transform: scale(1.04); filter: brightness(1); }
.ed-work-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 38%, rgba(231, 205, 142, .26) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 160% 0;
}
.ed-work:hover .ed-work-sheen { animation: sweep 1.2s var(--ease); }
@keyframes sweep { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.ed-work-zoom {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px;
  display: grid; place-items: center; background: rgba(10, 10, 11, .72); color: var(--text);
  opacity: 0; transition: opacity .25s;
}
.ed-work-zoom .ed-ic { width: 18px; height: 18px; }
.ed-work:hover .ed-work-zoom, .ed-work-link:focus-visible .ed-work-zoom { opacity: 1; }

.ed-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ed-strip .ed-work { aspect-ratio: 4 / 3; }
.ed-empty { color: var(--muted); }

/* image reveal — wipes in from the bottom while rising (owner 2026-10-08) */
/* clip the children, not the observed element: IntersectionObserver treats a zero-area clip-path as invisible */
html.ed-js .ed-pour:not(.ed-active) > * { clip-path: inset(100% 0 0 0); transform: translateY(40px); }
.ed-pour.ed-active > * { animation: reveal-up .95s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: var(--d, 0ms); }
@keyframes reveal-up {
  from { clip-path: inset(100% 0 0 0); transform: translateY(40px); }
  to   { clip-path: inset(0 0 0 0); transform: none; }
}

/* ---------- about ---------- */
.ed-about { padding: var(--sec) 0; background: var(--ink-1); }
.ed-about-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.ed-about-text .ed-h2 { margin-bottom: 24px; max-width: 16ch; }
.ed-about-text p:not(.ed-lead) { color: rgba(236, 232, 224, .82); max-width: 36rem; }
.ed-plate {
  --c: 18px;
  position: relative; overflow: hidden; margin: 0;
  padding: clamp(24px, 4vw, 44px);
  background: var(--ink-2);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.ed-plate > div:not(.ed-plate-mark) {
  position: relative; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 16px; padding: 13px 0;
}
.ed-plate dt, .ed-contact-dl dt {
  font: 500 .78rem/1.5 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: .2em;
}
.ed-plate dd, .ed-contact-dl dd { margin: 0; font-weight: 500; }
.ed-plate-mark { position: absolute; right: -8%; bottom: -16%; width: 72%; color: var(--gold); opacity: .07; pointer-events: none; }

/* ---------- free inquiry ---------- */
.ed-free { padding: var(--sec) 0; }
.ed-free-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ed-free-main .ed-lead { max-width: 40rem; color: rgba(236, 232, 224, .86); }
.ed-free-main .ed-h2 { margin-bottom: 18px; }
.ed-free-side {
  --c: 16px;
  position: sticky; top: calc(var(--head-h) + 32px);
  display: grid; gap: 12px; justify-items: start;
  padding: clamp(24px, 3vw, 36px); background: var(--ink-1);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.ed-free-side-h { margin: 0 0 6px; font: 500 .78rem/1.4 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ed-big-tel, .ed-big-mail { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; color: var(--text); text-decoration: none; }
.ed-big-tel { font: 600 clamp(1.5rem, 2.5vw, 2.1rem)/1.1 var(--display); white-space: nowrap; }
.ed-big-mail { font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; }
.ed-big-tel .ed-ic, .ed-big-mail .ed-ic { color: var(--gold); width: 1.05em; height: 1.05em; }
.ed-big-mail .ed-ic { width: 1.3em; height: 1.3em; }
.ed-big-tel:hover, .ed-big-mail:hover { color: var(--gold-hi); }
.ed-free-person { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; color: var(--muted); }
.ed-free-person .ed-ic { color: var(--gold); }
.ed-ct-person { display: grid; gap: 2px; justify-items: start; }
.ed-ct-person + .ed-ct-person { margin-top: 14px; }
.ed-ct-person + .ed-big-mail { margin-top: 8px; }
.ed-ct-area { margin: 0; font: 600 .78rem/1.4 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }

/* ---------- forms ---------- */
.ed-form { display: grid; gap: 22px; margin-top: 28px; justify-items: start; }
.ed-form-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.ed-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-form-grid--2 .ed-field--span2, .ed-form-grid--2 .ed-field--tail { grid-column: 1 / -1; }
.ed-field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ed-field--full { grid-column: 1 / -1; }
.ed-form-grid--3 .ed-field--span2 { grid-column: span 2; }
.ed-field label { font: 500 .76rem/1.35 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ed-req { color: var(--gold); }
.ed-opt { text-transform: none; letter-spacing: 0; font: 400 .8rem var(--sans); opacity: .8; }
.ed-field input, .ed-field select, .ed-field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px;
  font: 400 1rem/1.4 var(--sans); color: var(--text);
  background: var(--ink-2); border: 1px solid transparent; border-radius: 2px;
  transition: border-color .2s, background-color .2s;
}
.ed-field textarea { resize: vertical; min-height: 140px; }
.ed-field input:hover, .ed-field select:hover, .ed-field textarea:hover { background: var(--ink-3); }
.ed-field input:focus, .ed-field select:focus, .ed-field textarea:focus { outline: none; border-color: var(--gold); background: #1d1d21; }
.ed-field ::placeholder { color: rgba(163, 157, 146, .65); }
.ed-select { position: relative; display: block; }
.ed-select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.ed-select::after {
  content: ""; position: absolute; right: 19px; top: 50%; width: 8px; height: 8px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.ed-field select option { background: var(--ink-2); color: var(--text); }
.ed-field.ed-is-invalid input, .ed-field.ed-is-invalid select, .ed-field.ed-is-invalid textarea { border-color: var(--err); background: rgba(224, 107, 91, .07); }
.ed-f-err { margin: 0; font-size: .86rem; line-height: 1.4; color: var(--err); }
.ed-f-err:empty { display: none; }
.ed-f-hint { margin: 0; font-size: .8rem; color: var(--muted); }
.ed-form-msg {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; width: 100%;
  padding: 14px 16px; background: rgba(224, 107, 91, .1); color: #F6B9AE;
}
.ed-form-msg .ed-ic { margin-top: .15em; }
.ed-form-ok { display: flex; gap: 18px; padding: 28px; background: var(--gold-tint); width: 100%; }
.ed-form-ok p { margin: 0 0 6px; }
.ed-form-ok-h { font: 600 1.35rem/1.2 var(--display); color: var(--gold-hi); }
.ed-ic--ok { width: 36px; height: 36px; color: var(--gold); }
.ed-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ed-form .ed-btn--lg { margin-top: 2px; }

.ed-quote { padding: var(--sec) 0; background: var(--ink-1); }
.ed-quote-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: clamp(32px, 5vw, 80px); }
.ed-quote-head .ed-h2 { margin-bottom: 18px; }
.ed-quote-head p { color: var(--muted); }
.ed-quote .ed-form { margin-top: 0; }

/* ---------- epopõrandad ---------- */
.ed-fit { padding: var(--sec) 0; }
.ed-fit-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ed-fit-head { position: sticky; top: calc(var(--head-h) + 32px); }
.ed-fit-head .ed-h2 { margin-bottom: 18px; }
.ed-fit-head .ed-lead { color: rgba(236, 232, 224, .86); }
.ed-fit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 40px; }
.ed-fit-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; align-items: start; }
.ed-fit-ic {
  --c: 9px;
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--gold-tint); color: var(--gold);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.ed-fit-ic .ed-ic { width: 24px; height: 24px; }
.ed-fit-list h3 { font: 600 1.15rem/1.25 var(--display); margin: 3px 0 6px; }
.ed-fit-list p { margin: 0; color: var(--muted); }

.ed-layers { padding: var(--sec) 0; background: var(--ink-1); }
.ed-layers-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ed-stack-wrap { position: sticky; top: calc(var(--head-h) + 40px); }
.ed-stack {
  --c: 18px;
  height: clamp(320px, 54vh, 520px);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--ink-0); overflow: hidden;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.ed-band {
  position: relative; flex: none; height: var(--h); overflow: hidden;
  display: flex; align-items: center; padding: 0 22px;
  font: 500 .74rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
  transition: height .75s var(--ease), background-color .4s;
}
.ed-band span { white-space: nowrap; }
.ed-band--5 { --h: 9%;  background: linear-gradient(180deg, #b4b4b9, #8a8a90); color: var(--ink-0); }
.ed-band--5::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(231, 205, 142, .55) 50%, transparent 65%) no-repeat;
  background-size: 260% 100%; animation: sweep 4.5s var(--ease) infinite; mix-blend-mode: screen;
}
.ed-band--4 { --h: 22%; background: linear-gradient(180deg, #6f6f75, #5b5b61); color: var(--text); }
.ed-band--3 { --h: 8%;  background: linear-gradient(180deg, #9a7a3d, #7d6230); color: #F4E6C6; }
.ed-band--2 {
  --h: 11%; color: rgba(236, 232, 224, .85);
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 7px), #4c4c51;
}
.ed-band--0 {
  --h: 34%; color: rgba(236, 232, 224, .7);
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .08) 1px, transparent 1.6px) 0 0 / 13px 13px,
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, .35) 1.4px, transparent 2px) 0 0 / 19px 17px,
    #37373b;
}
.ed-stack.ed-is-live .ed-band[data-band]:not(.ed-on) { height: 0; }
.ed-stack[data-on="1"] .ed-band--0 { background-color: #44444a; color: var(--gold-hi); }
.ed-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.ed-step { position: relative; padding: 24px 0 24px 34px; transition: opacity .4s var(--ease); }
.ed-step::before { content: ""; position: absolute; left: 0; top: 31px; width: 14px; height: 14px; background: var(--chip, var(--ink-3)); }
.ed-step[data-step="1"] { --chip: #37373b; }
.ed-step[data-step="2"] { --chip: #6a6a70; }
.ed-step[data-step="3"] { --chip: #9a7a3d; }
.ed-step[data-step="4"] { --chip: #6f6f75; }
.ed-step[data-step="5"] { --chip: #b4b4b9; }
.ed-step--cure { --chip: var(--gold); }
.ed-step h3 { font: 600 1.3rem/1.25 var(--display); margin-bottom: 8px; }
.ed-step p { margin: 0; color: rgba(236, 232, 224, .8); max-width: 34rem; }
html.ed-js .ed-steps.ed-is-live .ed-step:not(.ed-is-on) { opacity: .4; }

.ed-fi-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 520px; }
.ed-fi-photo { position: relative; overflow: hidden; min-height: 320px; }
.ed-fi-photo picture, .ed-fi-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-fi-text { padding: clamp(40px, 6vw, 96px); display: grid; align-content: center; justify-items: start; gap: 22px; }
.ed-fi-text .ed-h2 { font-size: clamp(2rem, 3.6vw, 3.3rem); max-width: 16ch; }
.ed-fi-text .ed-lead { margin: 0; color: rgba(236, 232, 224, .86); max-width: 32rem; }

/* ---------- üldehitus ---------- */
.ed-svc { padding: var(--sec) 0; }
.ed-svc .ed-wrap { display: grid; gap: clamp(56px, 8vw, 120px); }
.ed-svc-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.ed-svc-row--flip .ed-svc-photo { order: 2; }
.ed-svc-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-1); }
.ed-svc-photo picture, .ed-svc-photo img { width: 100%; height: 100%; object-fit: cover; }
.ed-svc-text { display: grid; gap: 16px; justify-items: start; }
.ed-svc-text .ed-lead { margin: 0; color: rgba(236, 232, 224, .86); max-width: 34rem; }

/* ---------- tööd ---------- */
.ed-gallery { padding: clamp(40px, 5vw, 64px) 0 var(--sec); }
.ed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: 12px; }
.ed-grid .ed-work { aspect-ratio: 4 / 3; }
.ed-grid .ed-work.ed-is-wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.ed-grid .ed-work.ed-is-span2 { grid-column: span 2; aspect-ratio: auto; }
.ed-grid .ed-work.ed-is-span3 { grid-column: 1 / -1; aspect-ratio: 3 / 1; }
.ed-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.ed-pager a, .ed-pager span {
  --c: 7px;
  min-width: 48px; min-height: 48px; padding: 0 12px; display: grid; place-items: center;
  font: 600 .86rem/1 var(--display); letter-spacing: .06em; color: var(--text); text-decoration: none;
  background: var(--ink-1);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: background-color .2s, color .2s;
}
.ed-pager a:hover { background: var(--ink-2); }
.ed-pager a.ed-is-on { background: var(--gold); color: var(--gold-ink); }
.ed-pager a:focus-visible { outline-offset: -4px; }
.ed-pager .ed-is-off { color: var(--ink-3); }
.ed-pager .ed-ic { width: 20px; height: 20px; }

/* lightbox */
.ed-lb {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--text);
}
.ed-lb[open] { display: grid; place-items: center; }
.ed-lb::backdrop { background: rgba(5, 5, 6, .95); }
.ed-lb-fig { margin: 0; display: grid; gap: 14px; justify-items: center; max-width: min(92vw, 1500px); padding: 72px 0 28px; }
.ed-lb-img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; }
.ed-lb-cap { font: 500 .95rem/1.3 var(--display); text-align: center; padding: 0 16px; }
.ed-lb-btn {
  position: fixed; width: 52px; height: 52px; display: grid; place-items: center;
  background: rgba(25, 25, 28, .88); color: var(--text); border: 0; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.ed-lb-btn:hover { background: var(--gold); color: var(--gold-ink); }
.ed-lb-btn .ed-ic { width: 24px; height: 24px; }
.ed-lb-close { top: 16px; right: 16px; }
.ed-lb-prev { left: 16px; top: calc(50% - 26px); }
.ed-lb-next { right: 16px; top: calc(50% - 26px); }

/* ---------- kontakt ---------- */
.ed-contact { padding: clamp(40px, 5vw, 64px) 0 var(--sec); }
.ed-contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ed-contact-card {
  --c: 18px;
  position: relative; overflow: hidden; display: grid; gap: 10px; justify-items: start;
  padding: clamp(24px, 4vw, 44px); background: var(--ink-1);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.ed-contact-card > * { position: relative; }
.ed-contact-card .ed-plate-mark { position: absolute; }
.ed-contact-dl { margin: 18px 0 0; display: grid; gap: 16px; }
.ed-contact-dl dd { margin-top: 2px; }
.ed-contact-card { position: sticky; top: calc(var(--head-h) + 32px); }
.ed-contact-form .ed-h2 { margin-bottom: 18px; }
.ed-contact-form .ed-lead { color: rgba(236, 232, 224, .86); }
.ed-free-main .ed-btn { margin-top: 8px; }

/* ---------- 404 ---------- */
.ed-nf { display: grid; place-items: center; padding: calc(var(--head-h) + clamp(64px, 10vw, 140px)) var(--gut) clamp(64px, 10vw, 140px); }
.ed-nf-in { max-width: 36rem; display: grid; justify-items: center; gap: 22px; text-align: center; }
.ed-nf-mark { width: 132px; color: var(--gold); }
.ed-nf .ed-lead { margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
.ed-foot { background: #070708; padding: clamp(56px, 7vw, 96px) 0 24px; }
.ed-foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, .9fr); gap: 40px; }
.ed-foot-logo { display: inline-block; color: var(--gold); margin-bottom: 18px; }
.ed-foot-logo .ed-logo { height: 76px; }
.ed-foot-brand p { color: var(--muted); max-width: 22rem; margin: 0; }
.ed-foot-h { font: 500 .78rem/1.4 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.ed-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ed-foot li { overflow-wrap: anywhere; }
.ed-foot-col a { display: inline-block; padding: 5px 0; text-decoration: none; }
.ed-foot-col a:hover { color: var(--gold-hi); }
.ed-foot-col li:not(:has(a)) { padding: 5px 0; color: rgba(236, 232, 224, .8); }
.ed-foot-base {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--muted); font-size: .85rem;
}
.ed-foot-base p { margin: 0; }
.ed-footer-credit {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-end;
  min-height: 44px; text-align: right; text-decoration: none; line-height: 1.25;
}
.ed-footer-credit-name {
  font: 700 1.02rem/1.25 var(--display);
  background-image:
    linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .9) 50%, transparent 70%),
    linear-gradient(90deg, var(--gold-lo), var(--gold) 45%, var(--gold-hi));
  background-size: 200% 100%, 100% 100%;
  background-position: 150% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.ed-footer-credit:hover .ed-footer-credit-name,
.ed-footer-credit:focus-visible .ed-footer-credit-name { animation: credit-glim 1.1s var(--ease); }
.ed-footer-credit-sub { font-size: .72rem; color: var(--muted); }
@keyframes credit-glim { from { background-position: 150% 0, 0 0; } to { background-position: -50% 0, 0 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --head-h: 68px; }
  .ed-head-in { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px; }
  .ed-head-nav, .ed-head-r { display: none; }
  .ed-head-call, .ed-head-menu { display: grid; }
  .ed-head-call { grid-column: 1; grid-row: 1; }
  .ed-head-logo { grid-column: 2; grid-row: 1; }
  .ed-head-menu { grid-column: 3; grid-row: 1; }
  .ed-logo { height: 44px; }
  .ed-foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ed-foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .ed-roofs { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .ed-roof { grid-row: auto; grid-template-rows: auto; }
  .ed-roof-pic img { aspect-ratio: 1.3; clip-path: polygon(0 26cqw, 50% 0, 100% 26cqw, 100% 100%, 0 100%); }
  .ed-sec-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ed-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 34vw, 280px); }
  .ed-mosaic .ed-work { grid-column: auto; grid-row: auto; }
  .ed-mosaic .ed-m1 { grid-column: 1 / -1; grid-row: span 2; }
  .ed-about-grid, .ed-free-grid, .ed-fit-grid, .ed-layers-grid, .ed-quote-grid, .ed-contact-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-free-side, .ed-fit-head { position: static; }
  .ed-contact-card { position: relative; top: auto; }   /* stays a containing block for its watermark */
  .ed-stack-wrap { position: static; }
  .ed-stack { height: 260px; }
  .ed-fi-band { grid-template-columns: minmax(0, 1fr); }
  .ed-fi-photo { aspect-ratio: 16 / 10; min-height: 0; }
  .ed-svc-row { grid-template-columns: minmax(0, 1fr); }
  .ed-svc-row--flip .ed-svc-photo { order: 0; }
  .ed-form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-strip {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px;
    margin-inline: calc(var(--gut) * -1); padding: 0 var(--gut) 6px; scrollbar-width: thin;
  }
  .ed-strip .ed-work { flex: 0 0 min(78%, 420px); scroll-snap-align: start; }
  .ed-mh-body { grid-template-columns: minmax(0, 1fr); }
  .ed-mh-act { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .ed-mh-in { padding-top: calc(var(--head-h) + 32px); }
  .ed-mh-act .ed-btn { flex: 1 1 100%; }
  .ed-mh-mirror-in { opacity: .9; filter: blur(.8px); }
  .ed-form-grid, .ed-form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .ed-form-grid--3 .ed-field--span2 { grid-column: auto; }
  .ed-fit-list { grid-template-columns: minmax(0, 1fr); }
  .ed-mosaic {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px;
    margin-inline: calc(var(--gut) * -1); padding: 0 var(--gut) 6px;
  }
  .ed-mosaic .ed-work { flex: 0 0 82%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-grid .ed-work.ed-is-wide, .ed-grid .ed-work.ed-is-span2, .ed-grid .ed-work.ed-is-span3 { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .ed-plate > div:not(.ed-plate-mark) { grid-template-columns: minmax(0, 1fr); }
  .ed-foot-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ed-foot-base { flex-direction: column; align-items: flex-start; }
  .ed-footer-credit { align-items: flex-start; text-align: left; }
  .ed-lb-prev, .ed-lb-next { top: auto; bottom: 16px; }
  .ed-lb-prev { left: calc(50% - 60px); }
  .ed-lb-next { right: calc(50% - 60px); }
  .ed-lb-fig { padding-bottom: 84px; }
  .ed-lb-img { max-height: calc(100vh - 220px); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html.ed-js .ed-pour:not(.ed-active) > *, .ed-pour > * { clip-path: none !important; transform: none !important; animation: none !important; }
  .ed-band--5::after { animation: none !important; display: none; }
  .ed-stack.ed-is-live .ed-band[data-band]:not(.ed-on) { height: var(--h); }
  html.ed-js .ed-steps.ed-is-live .ed-step:not(.ed-is-on) { opacity: 1; }
}

.ed-mh--flat .ed-mh-body { margin-top: 22px; }
.ed-mh--flat .ed-mh-photo img { object-position: 50% 62%; }

/* ---------- platform template additions (EDEV on the CMS) ---------- */
.ed-skip:not(:focus) { opacity: 0; }
.ed-logo-pick { display: block; }
.ed-logo.ed-logo-img { aspect-ratio: auto; object-fit: contain; }
.ed-head-links { display: flex; align-items: center; gap: 4px; }
.ed-head-li { display: block; }
.ed-roof-pic { display: block; }
.ed-work-ph { display: block; width: 100%; height: 100%; background: var(--ink-2); }
.ed-form-in { display: grid; gap: 22px; justify-items: start; width: 100%; }
.ed-form-in[hidden] { display: none; }
.ed-hp-in { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.ed-work-facts { display: block; }
