/* ============================================================================
   ENVO — project page
   ----------------------------------------------------------------------------
   Shared by /envo/index.html (DE) and /en/envo/index.html (EN).
   Loads AFTER /style.css (site chrome: fonts, fixed header, menu overlay) and
   only restyles what this page owns. Companion logic: /envo.js.

   The page takes the app's side of the studio's palette: ENVO's interface is
   strictly black and white, so this page is too — with terracotta, the studio
   accent, reserved for exactly one thing: the adjustment ENVO applies.
   Sibling of /app/index.html, which owns the same dark treatment.
   ============================================================================ */

body.page-envo {
  --bg: #0E0E0E;
  --bg-2: #141414;
  --fg: #F1F1F1;
  --body: #C2C2C2;
  --mut: #8C8C8C;
  --dim: #5A5A5A;
  --line: rgba(241, 241, 241, .16);
  --line-soft: rgba(241, 241, 241, .08);
  --accent: #A4683C;

  --ease: cubic-bezier(.25, .46, .45, .94);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --disp: 'OPTIAuvantGothic-Bold', Arial, sans-serif;
  --body-f: 'HelveticaNowText-Light', Arial, sans-serif;
  --med-f: 'HelveticaNowText-Medium', Arial, sans-serif;

  --wrap: min(1080px, 90vw);

  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
}

body.page-envo main { padding-top: 0; display: block; min-height: 0; }

/* film grain, same treatment as the app page — static, never animated, so it
   can't force a full-page repaint every frame */
.envo-grain {
  position: fixed;
  inset: 0;
  z-index: 7000;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------- shared chrome, darkened ------------------------ */
body.page-envo .header-content h1 { color: var(--fg); }
body.page-envo .header-line { background-color: var(--fg); }
body.page-envo .glass-blur {
  background: rgba(14, 14, 14, .04);
  -webkit-backdrop-filter: blur(13px) saturate(.7);
  backdrop-filter: blur(13px) saturate(.7);
}
body.page-envo footer {
  color: var(--mut);
  border-top: 1px solid var(--line);
  margin-top: 0;
}

/* ================================ TYPE ==================================== */
.e-wrap { width: var(--wrap); margin: 0 auto; }

.e-label {
  font-family: var(--body-f);
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--mut);
  margin: 0;
}
.e-label b { font-family: var(--med-f); font-weight: 400; color: var(--fg); }

h2.e-h2 {
  font-family: var(--disp);
  font-weight: normal;
  font-size: clamp(30px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -.02em;
  margin: .28em 0 0 -.04em;   /* optical: pull display ink flush with the body */
  color: var(--fg);
  max-width: 20ch;
}
h3.e-h3 {
  font-family: var(--med-f);
  font-weight: normal;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.3;
  letter-spacing: -.005em;
  margin: 0 0 12px;
  color: var(--fg);
  /* these headings are two short sentences; without balancing, the second one
     orphans its last word onto a line of its own. Ignored where unsupported. */
  text-wrap: balance;
}

.e-lede {
  font-family: var(--body-f);
  font-size: clamp(16px, 1.9vw, 21px);
  line-height: 1.55;
  color: var(--body);
  max-width: 46ch;
  margin: clamp(18px, 2.6vh, 30px) 0 0;
}
.e-body {
  font-family: var(--body-f);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.68;
  color: var(--body);
  max-width: 64ch;
  margin: 0 0 1.1em;
}
.e-body:last-child { margin-bottom: 0; }
.e-body b, .e-body strong { font-family: var(--med-f); font-weight: 400; color: var(--fg); }
.e-body em { font-style: normal; color: var(--accent); }
.e-body a, .e-link {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color .35s var(--ease), color .35s var(--ease);
}
.e-body a:hover, .e-link:hover,
.e-body a:focus-visible, .e-link:focus-visible { color: var(--accent); border-color: var(--accent); }

/* ================================ HERO ==================================== */
.e-hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15vh 6vw 12vh;
  position: relative;
}
.e-icon {
  width: clamp(92px, 11vw, 128px);
  height: auto;
  border-radius: 22.5%;
  display: block;
  box-shadow: 0 0 0 1px rgba(241, 241, 241, .16), 0 24px 70px rgba(0, 0, 0, .6);
  animation: eRise 1.1s var(--ease-out) both;
}
.e-eyebrow {
  font-family: var(--body-f);
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mut);
  margin: clamp(20px, 2.8vh, 32px) 0 0;
  padding-left: .3em;
  animation: eRise 1s .12s var(--ease-out) both;
}
.e-eyebrow .live { color: var(--accent); }
.e-title {
  font-family: var(--disp);
  font-weight: normal;
  font-size: clamp(56px, 13vw, 168px);
  line-height: .92;
  letter-spacing: .3em;
  padding-left: .3em;   /* tracking adds a trailing gap — recentre the word */
  margin: .12em 0 0;
  animation: eRise 1s .22s var(--ease-out) both;
}
.e-sub {
  font-family: var(--disp);
  font-weight: normal;
  font-size: clamp(20px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: clamp(14px, 2.2vh, 26px) 0 0;
  color: var(--fg);
  animation: eRise 1s .3s var(--ease-out) both;
}
.e-hero .e-lede {
  margin-inline: auto;
  animation: eRise 1s .38s var(--ease-out) both;
}
.e-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: clamp(28px, 4.4vh, 46px);
  animation: eRise 1s .46s var(--ease-out) both;
}
@keyframes eRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* =============================== BUTTONS ================================== */
.e-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  font-family: var(--med-f);
  font-size: .82rem;
  letter-spacing: .05em;
  border: 1.5px solid var(--fg);
  color: var(--fg);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease);
}
.e-btn:hover, .e-btn:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--fg); }

/* =============================== SECTIONS ================================= */
.e-sec { padding: clamp(70px, 11vh, 150px) 0; }
.e-sec + .e-sec { padding-top: 0; }

/* the numbered head: a rule, an index, a kicker, then the title */
.e-head {
  border-top: 1px solid var(--line);
  padding-top: clamp(16px, 2.2vh, 24px);
  margin-bottom: clamp(28px, 4.4vh, 52px);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(16px, 2.4vw, 34px);
  align-items: start;
}
.e-idx {
  font-family: var(--body-f);
  font-size: .68rem;
  letter-spacing: .2em;
  color: var(--accent);
  padding-top: .3em;
}
.e-head h2.e-h2 { margin-top: .1em; }

/* two-column prose where the section needs a side note */
.e-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(26px, 4vw, 64px);
  align-items: start;
}
.e-aside {
  font-family: var(--body-f);
  font-size: clamp(13px, 1.2vw, 14.5px);
  line-height: 1.62;
  color: var(--mut);
  border-left: 1px solid var(--line);
  padding-left: clamp(16px, 1.8vw, 24px);
}
.e-aside b { font-family: var(--med-f); font-weight: 400; color: var(--body); }
.e-aside p { margin: 0 0 .9em; }
.e-aside p:last-child { margin-bottom: 0; }

/* ============================== FIGURES =================================== */
.e-fig {
  margin: clamp(28px, 4.4vh, 52px) 0 0;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: clamp(18px, 2.4vw, 30px);
}
.e-fig canvas { display: block; width: 100%; }
#fig-mask { aspect-ratio: 900 / 420; }
#fig-stair { aspect-ratio: 900 / 340; }

.e-figcap {
  font-family: var(--body-f);
  font-size: clamp(12px, 1.1vw, 13.5px);
  line-height: 1.6;
  color: var(--mut);
  margin: 16px 0 0;
  max-width: 74ch;
}
.e-figcap b { font-family: var(--med-f); font-weight: 400; color: var(--body); }

/* the toggle that switches the masking figure between two rooms */
.e-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 clamp(16px, 2.2vh, 22px);
  border: 1px solid var(--line);
  width: max-content;
  max-width: 100%;
}
.e-switch button {
  font-family: var(--body-f);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mut);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 10px 16px;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.e-switch button:last-child { border-right: 0; }
.e-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.e-switch button:hover:not([aria-pressed="true"]) { color: var(--fg); }

/* =============================== TABLES =================================== */
.e-table {
  width: 100%;
  border-collapse: collapse;
  margin: clamp(22px, 3.4vh, 34px) 0 0;
  font-family: var(--body-f);
  font-size: clamp(13.5px, 1.35vw, 15.5px);
}
.e-table caption {
  text-align: left;
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mut);
  padding-bottom: 12px;
}
.e-table th, .e-table td {
  text-align: left;
  padding: 13px 18px 13px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  line-height: 1.5;
}
.e-table th {
  font-family: var(--med-f);
  font-weight: 400;
  color: var(--mut);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.e-table td { color: var(--body); }
.e-table td:first-child { color: var(--fg); font-family: var(--med-f); white-space: nowrap; }
.e-table td b { font-family: var(--med-f); font-weight: 400; color: var(--fg); }
/* readings are numbers — stop them dancing between rows */
.e-table .num { font-variant-numeric: tabular-nums; }

/* =========================== GUARD / SPEC LIST ============================ */
.e-guards {
  list-style: none;
  margin: clamp(22px, 3.4vh, 34px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.e-guards li {
  background: var(--bg);
  padding: clamp(18px, 2.2vw, 26px);
}
.e-guards .g-n {
  display: block;
  font-family: var(--body-f);
  font-size: .64rem;
  letter-spacing: .2em;
  color: var(--accent);
  margin-bottom: 10px;
}
.e-guards .g-t {
  display: block;
  font-family: var(--med-f);
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.3;
}
.e-guards p {
  margin: 0;
  font-family: var(--body-f);
  font-size: clamp(13px, 1.2vw, 14.5px);
  line-height: 1.6;
  color: var(--mut);
}

/* ======================= THE INTEGRITY PANELS ============================= */
/* Deliberately the loudest block on the page. A page that claims honesty has
   to give its limits the same typographic weight as its features. */
.e-limit {
  border: 1px solid var(--line);
  padding: clamp(22px, 3vw, 38px);
  margin: clamp(22px, 3.4vh, 36px) 0 0;
}
.e-limit + .e-limit { margin-top: clamp(14px, 2vh, 20px); }
/* Privacy's proof panel borrows the same evidence register, but affirmative:
   it hands the reader something to check instead of something to accept.
   The accent edge marks that difference without inventing a second style. */
.e-proof { border-color: rgba(164, 104, 60, .5); }
.e-limit .e-label { margin-bottom: 12px; color: var(--accent); }
.e-limit h3.e-h3 { max-width: 34ch; }
.e-measure {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 44px);
  margin: clamp(18px, 2.6vh, 26px) 0 0;
  padding-top: clamp(16px, 2.2vh, 22px);
  border-top: 1px solid var(--line-soft);
}
.e-measure div { display: flex; flex-direction: column; gap: 6px; }
.e-measure dt, .e-measure .m-k {
  font-family: var(--body-f);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mut);
}
.e-measure dd, .e-measure .m-v {
  margin: 0;
  font-family: var(--med-f);
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.e-measure .m-v small { font-size: .55em; color: var(--mut); margin-left: .3em; }

/* ============================= SCREENSHOTS ================================ */
.e-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 44px);
  margin: clamp(28px, 4.4vh, 52px) 0 0;
}
.e-shot { margin: 0; text-align: center; }
.e-shot img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 26px 56px rgba(0, 0, 0, .65));
}
.e-shot figcaption {
  font-family: var(--body-f);
  font-size: clamp(12.5px, 1.15vw, 14px);
  line-height: 1.55;
  color: var(--mut);
  margin-top: clamp(16px, 2.2vh, 22px);
  text-align: left;
  max-width: 34ch;
  margin-inline: auto;
}
.e-shot figcaption b {
  display: block;
  font-family: var(--med-f);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .62rem;
  margin-bottom: 8px;
}

/* ============================== CLOSING =================================== */
.e-close {
  border-top: 1px solid var(--line);
  padding: clamp(60px, 9vh, 110px) 0 clamp(40px, 7vh, 80px);
  text-align: center;
}
.e-close .e-h2 { margin-inline: auto; max-width: 22ch; }
.e-close .e-lede { margin-inline: auto; }
.e-close .e-hero-cta { justify-content: center; }

.e-back {
  display: inline-flex;
  gap: 10px;
  margin-top: clamp(30px, 5vh, 56px);
  font-family: var(--med-f);
  font-size: .82rem;
  color: var(--mut);
  text-decoration: none;
  transition: color .35s var(--ease);
}
.e-back:hover, .e-back:focus-visible { color: var(--fg); }

/* ============================== REVEALS =================================== */
[data-rv] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-rv].in { opacity: 1; transform: none; }

/* ============================= RESPONSIVE ================================= */
@media (max-width: 880px) {
  .e-cols { grid-template-columns: 1fr; }
  .e-aside { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 18px; }
  .e-shots { grid-template-columns: 1fr; gap: clamp(34px, 6vh, 54px); }
  .e-shot img { max-width: 232px; }
  .e-shot figcaption { text-align: center; }
}
@media (max-width: 620px) {
  #fig-mask { aspect-ratio: 620 / 440; }
  #fig-stair { aspect-ratio: 620 / 340; }
  .e-title { letter-spacing: .18em; padding-left: .18em; }
  .e-head { grid-template-columns: 1fr; row-gap: 6px; }
  .e-idx { padding-top: 0; }
  /* the table becomes stacked cards — three columns can't survive 320px */
  .e-table, .e-table tbody, .e-table tr, .e-table td { display: block; width: 100%; }
  .e-table thead { display: none; }
  .e-table tr { border-bottom: 1px solid var(--line); padding: 14px 0; }
  .e-table td { border: 0; padding: 2px 0; }
  .e-table td:first-child { margin-bottom: 6px; white-space: normal; }
}

/* =========================== REDUCED MOTION =============================== */
@media (prefers-reduced-motion: reduce) {
  [data-rv] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .e-icon, .e-eyebrow, .e-title, .e-sub, .e-hero .e-lede, .e-hero-cta { animation: none; opacity: 1; transform: none; }
}
