/* Edges — the structure of the header, the menu sheet and the footer (core/edges.js). Each world gives them their look
   through these properties and its own rules; the structure and the behaviour stay the same. */
:root {
  --edge-ink: currentColor;
  --edge-accent: currentColor;
  --edge-accent-ink: #000;
  --edge-face: inherit;
  --edge-text: inherit;
  --edge-backdrop: rgba(0, 0, 0, 0.5);
  --edge-line: rgba(127, 127, 127, 0.3);
  --edge-sheet-bg: #000;
  --edge-sheet-ink: #fff;
  --edge-foot-bg: #000;
  --edge-foot-ink: #fff;
  --edge-radius: 999px;
  --edge-h: 68px;
  --edge-ease: cubic-bezier(0.215, 0.61, 0.355, 1);
}
html { overflow-x: clip; }

/* ---------------- header ---------------- */
.edge-head { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--edge-h); box-sizing: border-box; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: clamp(14px, 2vw, 28px); color: var(--edge-ink); font-family: var(--edge-text);
  transition: opacity 0.6s, transform 0.55s var(--edge-ease), background-color 0.4s, color 0.6s var(--edge-ease), border-color 0.4s; border-bottom: 1px solid transparent; }
body.is-loading .edge-head { opacity: 0; pointer-events: none; }
.edge-head[data-state='hidden'] { transform: translate3d(0, -105%, 0); }
.edge-head[data-state='pinned'] { background: var(--edge-backdrop); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); border-bottom-color: var(--edge-line); }
.edge-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--edge-accent); transform-origin: left; transform: scaleX(0); opacity: 0; transition: opacity 0.4s; }
.edge-head[data-state='pinned'] .edge-progress { opacity: 1; }

.edge-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.edge-brand svg { display: block; height: 22px; width: auto; overflow: visible; }
.edge-brand__word { font-family: var(--edge-face); font-size: 17px; line-height: 1; }

.edge-nav { position: relative; display: flex; justify-content: center; gap: clamp(18px, 2.4vw, 34px); }
.edge-nav__link { position: relative; color: inherit; text-decoration: none; font-size: 14px; line-height: 1; padding: 10px 0; opacity: 0.66; transition: opacity 0.3s; }
.edge-nav__link:hover, .edge-nav__link:focus-visible, .edge-nav__link.is-on { opacity: 1; }
.edge-nav__detail { position: absolute; left: 50%; top: calc(100% + 12px); white-space: nowrap; font-size: 12px; opacity: 0; transform: translate3d(-50%, -4px, 0); pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--edge-ease); }
.edge-nav__link:hover .edge-nav__detail, .edge-nav__link:focus-visible .edge-nav__detail { opacity: 0.8; transform: translate3d(-50%, 0, 0); }
.edge-nav__bar { position: absolute; left: 0; bottom: 2px; height: 2px; width: 0; background: var(--edge-accent); opacity: 0; transition: transform 0.6s var(--edge-ease), width 0.6s var(--edge-ease), opacity 0.3s; }

.edge-live { display: grid; grid-template-columns: auto auto; grid-template-rows: auto 3px; column-gap: 8px; row-gap: 5px; align-items: baseline; font-size: 12px; line-height: 1; }
.edge-live__k { opacity: 0.6; }
.edge-live__v { font-weight: 600; min-width: 7ch; text-align: right; } /* no tabular figures: their zero is slashed in the faces we use («Ø bar», 22/10); the min-width already holds the place */
.edge-live__meter { grid-column: 1 / -1; height: 3px; background: var(--edge-line); overflow: hidden; }
.edge-live__meter i { display: block; height: 100%; background: var(--edge-accent); transform-origin: left; transform: scaleX(var(--k, 0)); }

.edge-cta { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; border-radius: var(--edge-radius); background: var(--edge-accent); color: var(--edge-accent-ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; transition: transform 0.3s var(--edge-ease), filter 0.3s; }
.edge-cta:hover { filter: brightness(1.08); transform: translate3d(0, -1px, 0); }
.edge-cta--wide { height: 48px; padding: 0 24px; }

.edge-menu { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 4px 0 14px; border-radius: var(--edge-radius); border: 1px solid var(--edge-line); background: none; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.edge-menu__icon { position: relative; width: 32px; height: 32px; border-radius: 50%; }
.edge-menu__icon::before, .edge-menu__icon::after { content: ''; position: absolute; left: 9px; right: 9px; height: 1.5px; background: currentColor; transition: transform 0.5s var(--edge-ease); }
.edge-menu__icon::before { top: 12px; } .edge-menu__icon::after { top: 18px; }
.edge-menu[aria-expanded='true'] .edge-menu__icon::before { transform: translateY(3px) rotate(45deg); }
.edge-menu[aria-expanded='true'] .edge-menu__icon::after { transform: translateY(-3px) rotate(-45deg); }
.edge-head a:focus-visible, .edge-head button:focus-visible, .edge-sheet a:focus-visible, .edge-foot a:focus-visible, .edge-foot button:focus-visible, .edge-foot input:focus-visible, .edge-foot textarea:focus-visible { outline: 2px solid var(--edge-accent); outline-offset: 3px; }

/* ---------------- the sheet ---------------- */
.edge-sheet { position: fixed; inset: 0; z-index: 19; background: var(--edge-sheet-bg); color: var(--edge-sheet-ink); overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0); transition: clip-path 0.7s var(--edge-ease); }
body.edge-open .edge-sheet { clip-path: inset(0 0 0 0); }
body.edge-open .edge-head { color: var(--edge-sheet-ink); background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.edge-sheet__inner { min-height: 100%; box-sizing: border-box; padding: calc(var(--edge-h) + 4vh) var(--gutter) var(--gutter); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 6vw; }
.edge-sheet__list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; border-top: 1px solid var(--edge-line); }
.edge-sheet__list li { border-bottom: 1px solid var(--edge-line); opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.5s, transform 0.7s var(--edge-ease); transition-delay: calc(0.12s + var(--i) * 0.04s); }
body.edge-open .edge-sheet__list li { opacity: 1; transform: none; }
.edge-sheet__link { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: clamp(10px, 1.6vh, 18px) 0; color: inherit; text-decoration: none; }
.edge-sheet__label { font-family: var(--edge-face); font-size: clamp(28px, 3.6vw, 56px); line-height: 1; transition: transform 0.5s var(--edge-ease); }
.edge-sheet__detail { font-size: 14px; opacity: 0.6; text-align: right; }
.edge-sheet__link:hover .edge-sheet__label, .edge-sheet__link:focus-visible .edge-sheet__label { transform: translate3d(12px, 0, 0); }
.edge-sheet__link.is-on .edge-sheet__label { color: var(--edge-accent); }
.edge-sheet__aside { display: grid; align-content: space-between; gap: 40px; font-size: 15px; }
.edge-sheet__aside .edge-live { font-size: 14px; max-width: 280px; }
.edge-sheet__title { font-family: var(--edge-face); font-size: 22px; margin: 0 0 10px; }
.edge-sheet__text { margin: 0 0 22px; opacity: 0.7; max-width: 34ch; line-height: 1.5; }
.edge-sheet__legal { margin: 0; font-size: 12px; opacity: 0.5; }

/* ---------------- footer ---------------- */
.edge-foot { position: relative; z-index: 3; background: var(--edge-foot-bg); color: var(--edge-foot-ink); padding: clamp(64px, 12vh, 140px) var(--gutter) var(--gutter); font-family: var(--edge-text); overflow: hidden; }
.edge-foot__lead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; padding-bottom: clamp(40px, 8vh, 90px); border-bottom: 1px solid var(--edge-line); }
.edge-foot__statement { font-family: var(--edge-face); font-size: clamp(34px, 5vw, 84px); line-height: 0.95; margin: 0; max-width: 15ch; }
.edge-foot__cols { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(280px, 2fr); gap: 36px clamp(24px, 4vw, 64px); padding: clamp(36px, 6vh, 64px) 0; }
.edge-foot__ask { display: grid; gap: 20px; justify-items: start; max-width: 360px; }
.edge-foot__text { margin: 0; font-size: 16px; line-height: 1.5; opacity: 0.72; }
.edge-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-bottom: 1px solid var(--edge-line); }
.edge-tile { position: relative; display: grid; grid-template-columns: 1fr auto; align-content: space-between; gap: 18px 12px; min-height: clamp(120px, 18vh, 190px); padding: clamp(18px, 2.4vw, 32px); color: inherit; text-decoration: none; border-right: 1px solid var(--edge-line); transition: background-color 0.35s var(--edge-ease), color 0.35s var(--edge-ease); }
.edge-tile:last-child { border-right: 0; }
.edge-tile__label { font-family: var(--edge-face); font-size: clamp(24px, 2.4vw, 36px); line-height: 1; }
.edge-tile__detail { grid-column: 1; font-size: 14px; opacity: 0.62; }
.edge-tile__arrow { grid-column: 2; grid-row: 1; width: 26px; height: 26px; color: var(--edge-accent); transition: transform 0.45s var(--edge-ease), color 0.35s; }
.edge-tile:hover, .edge-tile:focus-visible { background: var(--edge-accent); color: var(--edge-accent-ink); }
.edge-tile:hover .edge-tile__arrow, .edge-tile:focus-visible .edge-tile__arrow { color: currentColor; transform: translate3d(6px, 0, 0); }
.edge-foot__title { font-size: 13px; opacity: 0.55; margin: 0 0 16px; }
.edge-foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.edge-foot__link { color: inherit; text-decoration: none; font-size: 17px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.45s var(--edge-ease); }
.edge-foot__link:hover { background-size: 100% 1px; }
.edge-form { display: grid; gap: 14px; align-content: start; }
.edge-form__row { display: grid; gap: 6px; }
.edge-form__row label { font-size: 13px; opacity: 0.7; }
.edge-form__row input, .edge-form__row textarea { font: inherit; font-size: 16px; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--edge-line); padding: 6px 0 8px; border-radius: 0; resize: none; }
.edge-form.is-bad :invalid { border-bottom-color: var(--edge-accent); }
.edge-form .edge-cta { justify-self: start; margin-top: 6px; }
.edge-form__done { margin: 0; font-size: 14px; min-height: 1.4em; opacity: 0.8; }
.edge-foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0 0; font-size: 13px; }
.edge-foot__legal { margin: 0; opacity: 0.6; }
.edge-up { font: inherit; color: inherit; background: none; border: 1px solid var(--edge-line); border-radius: var(--edge-radius); height: 36px; padding: 0 16px; cursor: pointer; }
.edge-up:hover { border-color: currentColor; }
.edge-foot__mark { font-family: var(--edge-face); white-space: nowrap; width: max-content; line-height: 0.8; margin: clamp(28px, 6vh, 72px) 0 0; padding-bottom: clamp(14px, 2vh, 24px); border-bottom: 1px solid var(--edge-line); }

@media (max-width: 1100px) { .edge-nav__detail { display: none; } }
@media (max-width: 900px) {
  :root { --edge-h: 60px; }
  .edge-head { grid-template-columns: auto 1fr auto; }
  .edge-nav, .edge-head > .edge-cta { display: none; }
  .edge-head > .edge-live { justify-self: end; }
  .edge-menu { grid-column: -2 / -1; justify-self: end; }
  .edge-sheet__inner { grid-template-columns: 1fr; gap: 36px; }
  .edge-sheet__link { flex-direction: column; gap: 6px; }
  .edge-sheet__detail { text-align: left; }
  .edge-foot__cols { grid-template-columns: 1fr 1fr; }
  .edge-tile { border-right: 0; border-top: 1px solid var(--edge-line); min-height: 0; }
  .edge-form { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .edge-head > .edge-live { display: none; } .edge-menu__word { display: none; } .edge-menu { padding: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .edge-head, .edge-sheet, .edge-sheet__list li, .edge-nav__bar { transition: none; } }
