/* EcoWise – design tokens */
:root {
  --space: #04050a;
  --space-2: #0a0d15;
  --white: #f4f6f8;
  --text: #e9edf1;
  --muted: #b3bcc6;          /* 9.6:1 on --space */
  --green: #3ec393;
  --green-2: #59bc7c;
  --magenta: #ba279c;
  --glass: rgba(16, 21, 30, .62);
  --glass-line: rgba(255, 255, 255, .09);
  --sans: "Geist", "Inter", system-ui, sans-serif;
  --gutter: clamp(18px, 3.4vw, 52px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--space); }
body { color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* ---------- world layers ---------- */
.world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.world.is-drag { cursor: grabbing; }
.tiles { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 3;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 55%, rgba(4,5,10,.85) 100%),
    linear-gradient(180deg, rgba(4,5,10,.85) 0%, transparent 26%, transparent 70%, rgba(4,5,10,.9) 100%); }
.curtain { position: fixed; inset: 0; background: var(--space); z-index: 100; pointer-events: none; opacity: 0; }

/* tool tiles (positioned every frame from 3D) */
.tile {
  position: absolute; left: 0; top: 0; will-change: transform, opacity;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: filter .4s;
}
.tile svg {
  width: 58px; height: 58px; padding: 15px; border-radius: 17px; fill: var(--c);
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.03) 45%, rgba(0,0,0,.2)), rgba(12,16,24,.78);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.55), 0 0 26px -4px color-mix(in srgb, var(--g) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tile span { font-size: 11px; font-weight: 500; letter-spacing: .02em; color: rgba(233,237,241,.78); white-space: nowrap; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.tile.is-back { filter: blur(1.5px) saturate(.6); }
.tile.is-back span { opacity: 0; }

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter); }
.logo svg { display: block; height: 34px; width: auto; }
.nav__cta { font-size: 14px; font-weight: 500; padding: 11px 18px; border-radius: 99px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .3s, border-color .3s; }
.nav__cta:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

/* ---------- hero copy ---------- */
.hero { position: fixed; inset: 0; z-index: 10; pointer-events: none; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(88px, 11vh, 120px) var(--gutter) clamp(64px, 8.5vh, 96px); }
.hero__slot { flex: 1; width: 100%; min-height: 220px; }
.hero__top, .hero__bottom { position: relative; }
.hero__title, .hero__sub, .hero__kicker { text-shadow: 0 2px 24px rgba(4,5,10,.9); }
.hero a { pointer-events: auto; }
.hero__kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(62,195,147,.18), 0 0 12px var(--green); animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 50% { box-shadow: 0 0 0 7px rgba(62,195,147,0), 0 0 12px var(--green); } }
.hero__title { font-weight: 600; font-size: clamp(40px, 5.6vw, 92px); line-height: 1.0; letter-spacing: -.045em; color: var(--white); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.grad { background: linear-gradient(92deg, #7ff0c3 0%, var(--green) 38%, #8fd36a 70%, #d6f5e7 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__bottom { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.hero__sub { max-width: 34ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; color: var(--muted); }

/* primary button */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 600; color: #04130d;
  padding: 17px 22px 17px 28px; border-radius: 99px;
  background: linear-gradient(180deg, #6fe0b3, var(--green));
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 12px 40px -8px rgba(62,195,147,.75), 0 0 80px -20px rgba(62,195,147,.9);
  transition: transform .4s var(--ease), box-shadow .4s;
  overflow: hidden;
}
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite 3s; }
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 18px 50px -8px rgba(62,195,147,.85), 0 0 110px -20px rgba(62,195,147,1); }
.btn:hover svg { transform: translateX(4px); }

/* ---------- footer ---------- */
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px var(--gutter); font-size: 12px; color: rgba(179,188,198,.75); }
.foot a:hover { color: var(--white); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .logo svg { height: 28px; }
  .nav__cta { display: none; }
  .tile svg { width: 42px; height: 42px; padding: 11px; border-radius: 13px; }
  .tile span { display: none; }
  .hero { padding-top: 88px; padding-bottom: 76px; }
  .hero__title { font-size: clamp(36px, 10.4vw, 52px); }
  .hero__sub { font-size: 15px; }
  .foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .foot__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dot, .btn::after { animation: none; } }

/* =========================================================
   CONTACT LAYER (opens over the world)
   ========================================================= */
.contact { position: fixed; inset: 0; z-index: 40; overflow-y: auto; -webkit-overflow-scrolling: touch; opacity: 0; visibility: hidden; pointer-events: none;
  background: linear-gradient(180deg, rgba(4,5,10,.82) 0%, rgba(4,5,10,.55) 45%, rgba(4,5,10,.2) 100%); }
.contact.is-open { visibility: visible; pointer-events: auto; }
body.contact-open { overflow: hidden; }
body.contact-open .tiles { opacity: 0; transition: opacity .4s; }
.contact__close { position: fixed; top: 18px; right: var(--gutter); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(10,13,20,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; transition: background .3s, transform .4s var(--ease); }
.contact__close:hover { background: rgba(255,255,255,.12); transform: rotate(90deg); }
.contact__close svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.contact__inner { min-height: 100%; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: 110px var(--gutter) 60px; }
.contact__title { font-weight: 600; font-size: clamp(34px, 3.8vw, 58px); line-height: 1.04; letter-spacing: -.04em; color: var(--white); margin-top: 4px; }
.contact__text { margin-top: 18px; max-width: 40ch; font-size: 17px; line-height: 1.6; color: var(--muted); }
.contact__info { list-style: none; margin-top: 34px; display: grid; gap: 14px; font-size: 15px; color: var(--text); }
.contact__info li { display: flex; flex-direction: column; gap: 2px; }
.contact__info span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact__info a { text-decoration: underline; text-decoration-color: rgba(62,195,147,.5); text-underline-offset: 4px; }

/* glass card */
.card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: clamp(22px, 3vw, 34px); border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 40%), rgba(11,15,23,.78);
  border: 1px solid var(--glass-line); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); }
.card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(62,195,147,.55), transparent 35%, transparent 70%, rgba(186,39,156,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.card__title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; color: var(--white); }
.card__sub { font-size: 14px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .chips legend { font-size: 13px; font-weight: 500; color: var(--text); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--white); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 13px 14px; outline: none; transition: border-color .25s, background .25s, box-shadow .25s; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(179,188,198,.55); }
.field input:focus, .field textarea:focus { border-color: rgba(62,195,147,.75); background: rgba(62,195,147,.06); box-shadow: 0 0 0 4px rgba(62,195,147,.14); }
.chips { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; margin-bottom: 8px; padding: 0; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; font-size: 14px; padding: 9px 14px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03); color: var(--text); transition: background .25s, border-color .25s, color .25s; }
.chips label:hover span { border-color: rgba(255,255,255,.3); }
.chips input:checked + span { background: rgba(62,195,147,.16); border-color: var(--green); color: #fff; }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(62,195,147,.4); }
.check { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; line-height: 1.55; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--green); }
.check a { color: var(--text); text-decoration: underline; }
.is-invalid input, .is-invalid textarea { border-color: #ff6b81 !important; }
.chips.is-invalid span { border-color: rgba(255,107,129,.6); }
.check.is-invalid span, .chips.is-invalid legend, .field.is-invalid > span { color: #ff9aa9; }
.form-error { min-height: 1.2em; font-size: 13px; color: #ff9aa9; }
.btn--full { width: 100%; justify-content: center; }
.btn.is-loading { opacity: .7; pointer-events: none; }
.card__done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 10px; }
.card__done[hidden] { display: none; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(62,195,147,.14); border: 1px solid rgba(62,195,147,.5); box-shadow: 0 0 40px rgba(62,195,147,.4); margin-bottom: 10px; }
.done-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 860px) {
  .contact__inner { grid-template-columns: 1fr; align-items: start; padding-top: 86px; padding-bottom: 40px; }
  .contact__info { display: none; }
  .contact__text { font-size: 16px; }
  .row { grid-template-columns: 1fr; }
  .card { border-radius: 18px; }
}
.card__sub { white-space: nowrap; }
@media (max-width: 460px) { .card__head { flex-direction: column; gap: 2px; } }

/* ===== v2: logo, services row, bigger mobile type, no-fit note ===== */
.logo img { display: block; height: 36px; width: auto; }
.world { touch-action: none; }
.hero__services { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; max-width: 560px; }
.hero__services li { font-size: 14px; font-weight: 500; color: var(--text); letter-spacing: .01em; padding: 0 12px; position: relative; text-shadow: 0 2px 16px rgba(4,5,10,.9); }
.hero__services li + li::before { content: ""; position: absolute; left: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.nofit { border-radius: 14px; padding: 16px 18px; background: rgba(186,39,156,.12); border: 1px solid rgba(186,39,156,.45); font-size: 14px; line-height: 1.6; color: var(--text); }
.nofit b { color: #fff; }
.nofit[hidden] { display: none; }
@media (max-width: 760px) {
  .logo img { height: 30px; }
  .hero__title { font-size: clamp(42px, 12.8vw, 62px); line-height: .98; }
  .hero__services { max-width: 340px; }
  .hero__services li { font-size: 13px; padding: 0 9px; }
}

/* ===== v3: mobile hero as one centred block, bigger type + CTA ===== */
@media (max-width: 760px) {
  .hero { justify-content: center; gap: 12px; padding-top: 78px; padding-bottom: 58px; }
  .hero__slot { flex: 0 0 auto; height: min(100vw, 43vh); min-height: 0; }
  .hero__title { font-size: clamp(44px, 13.6vw, 64px); line-height: .98; letter-spacing: -.05em; }
  .hero__services { max-width: 360px; }
  .hero__services li { font-size: 14px; }
  .hero__bottom { gap: 22px; }
  .hero .btn { font-size: 17px; padding: 20px 28px 20px 34px; min-width: min(320px, 84vw); justify-content: center; }
  .hero .btn svg { width: 22px; height: 22px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero__slot { height: min(96vw, 42vh); }
  .hero__title { font-size: clamp(38px, 12vw, 52px); }
}
.hero__services { gap: 6px 16px; }
.hero__services li { padding: 0 0 0 11px; }
.hero__services li + li::before { content: none; }
.hero__services li::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
@media (max-width: 760px) { .hero__services { gap: 5px 14px; } .hero__services li { padding-left: 10px; } }

/* ===== v4: every portrait screen (phones, tablets, tall windows) gets the stacked hero,
   sized relative to the screen instead of fixed pixel caps ===== */
.hero__services li + li::before { content: ""; }
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .hero { justify-content: center; gap: 2.2vh; padding-top: max(76px, 9vh); padding-bottom: max(56px, 6vh); }
  .hero__slot { flex: 0 0 auto; height: min(100vw, 44vh); min-height: 0; }
  .hero__title { font-size: min(14vw, 7.6vh, 120px); line-height: .98; letter-spacing: -.05em; }
  .hero__services { max-width: min(92vw, 700px); gap: .6vh 3.4vw; }
  .hero__services li { font-size: min(3.9vw, 2.2vh, 24px); padding-left: 1.1em; }
  .hero__services li::before { width: .36em; height: .36em; margin-top: -.18em; }
  .hero__bottom { gap: 2.4vh; }
  .hero .btn { font-size: min(4.6vw, 2.5vh, 26px); padding: 1.15em 1.4em 1.15em 1.7em; min-width: min(84vw, 560px); justify-content: center; }
  .hero .btn svg { width: 1.25em; height: 1.25em; }
  .nav__cta { display: none; }
  .logo img { height: min(8vw, 44px); }
  .foot__hint { display: none; }
}
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .hero { gap: 1.8vh; }
  .hero__slot { height: min(92vw, 39vh); }
  .hero__services li { font-size: min(3.55vw, 2.1vh, 24px); padding-left: .95em; }
  .hero__services { gap: .5vh 2.6vw; }
}

/* ===== v5: line reveal without overlap + phone layout that always fits ===== */
.hero__title .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero__title .line__in { display: inline-block; }
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .hero { justify-content: flex-start; gap: 14px;
    padding-top: calc(env(safe-area-inset-top) + max(96px, 11.5vh));
    padding-bottom: calc(env(safe-area-inset-bottom) + 56px); }
  .hero__slot { flex: 1 1 auto; height: auto; min-height: 120px; }
  .hero__title { font-size: min(13vw, 6.4vh, 120px); }
  .hero__services li { font-size: min(3.6vw, 2vh, 24px); }
  .hero .btn { font-size: min(4.6vw, 2.4vh, 26px); }
  .hero__bottom { gap: 16px; }
}
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .hero { padding-bottom: calc(env(safe-area-inset-bottom) + 66px); }
  .hero__title { font-size: min(13vw, 7vh, 120px); }
}

/* ===== cookie / consent banner ===== */
.consent { position: fixed; z-index: 90; left: 16px; bottom: 16px; width: min(440px, calc(100% - 32px));
  padding: 20px 20px 18px; border-radius: 18px; color: var(--text);
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 40%), rgba(11,15,23,.92);
  border: 1px solid var(--glass-line); box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(16px); transition: opacity .4s var(--ease), transform .5s var(--ease); }
.consent.is-in { opacity: 1; transform: none; }
.consent[hidden] { display: none; }
.consent__title { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.consent__text { font-size: 13px; line-height: 1.55; color: var(--muted); }
.consent__text a { color: var(--text); text-decoration: underline; }
.consent__details { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--glass-line); }
.consent__details[hidden] { display: none; }
.consent__opt { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent__opt input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--green); }
.consent__opt b { display: block; color: var(--white); font-weight: 600; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.consent__btn { font: inherit; font-size: 14px; font-weight: 600; border-radius: 99px; padding: 11px 16px; cursor: pointer; border: 1px solid transparent; }
.consent__btn--primary { flex: 1 1 auto; background: linear-gradient(180deg, #6fe0b3, var(--green)); color: #04130d; }
.consent__btn--ghost { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.18); color: var(--white); }
.consent__btn--link { background: none; color: var(--muted); text-decoration: underline; padding-left: 6px; padding-right: 6px; }
.consent__details .consent__btn { justify-self: start; }
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .consent { left: 10px; right: 10px; width: auto; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 16px; }
  .consent__actions .consent__btn { flex: 1 1 40%; text-align: center; }
  .consent__btn--primary { flex-basis: 100%; order: -1; }
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
