/* AN ECHO AWAY – shared tokens, fonts and base elements.
   Layout concept: a dark observation deck; one warm light source (the corona),
   everything else is instrument lines and quiet type. Single dark look by design. */

@font-face { font-family: "Jost"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;

  /* Color */
  --void: #07080a;          /* page ground, the space behind everything */
  --hull: #0d0e11;          /* raised surfaces: cards, panels */
  --hull-2: #14151a;        /* hover / pressed surfaces */
  --line: rgba(232, 214, 190, 0.14);
  --line-strong: rgba(232, 214, 190, 0.32);
  --text: #e8e1d6;          /* warm off-white */
  --muted: #9a958c;         /* secondary text, 6:1 on --void */
  --faint: #6c685f;         /* captions only, never body text */
  --corona: #e8893a;        /* the one accent: light around the hole */
  --corona-hi: #f3b071;
  --corona-glow: rgba(232, 137, 58, 0.35);

  /* Outpost colors, shared by the demos */
  --post-r11: #ead9b8;
  --post-s12: #e8893a;
  --post-g13: #b8462a;

  /* Type */
  --display: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);

  --track-wide: 0.42em;     /* spaced capitals for display type */
  --track-label: 0.18em;    /* small uppercase labels */

  /* Layout */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --measure: 62ch;
  --content: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--void); }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--corona-hi); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }

:focus-visible { outline: 1px solid var(--corona-hi); outline-offset: 3px; }

[hidden] { display: none !important; }

.label {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step--1);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.04em; }

/* Buttons: hairline frames, the primary one carries the corona */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 44px;
  padding: 0.7em 1.6em;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step--1);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:hover { border-color: var(--text); background: var(--hull-2); color: var(--text); }
.btn--primary {
  border-color: var(--corona);
  background: linear-gradient(90deg, rgba(232, 137, 58, 0.22), rgba(232, 137, 58, 0.04));
  box-shadow: inset 2px 0 0 var(--corona);
}
.btn--primary:hover { border-color: var(--corona-hi); box-shadow: inset 2px 0 0 var(--corona-hi), 0 0 24px var(--corona-glow); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { background: transparent; border-color: var(--line-strong); }

/* Wordmark: spaced capitals, wider gaps between words, a corona arc around ECHO */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.wordmark > span { margin-right: calc(-1 * var(--track-wide)); }
.wordmark .arc { position: relative; }
.wordmark .arc::before {
  content: "";
  position: absolute;
  left: -0.42em;
  top: 50%;
  width: 1.75em;
  height: 1.75em;
  transform: translateY(-50%) rotate(-28deg);
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-left-color: var(--corona);
  border-top-color: var(--corona);
  filter: drop-shadow(0 0 6px var(--corona-glow));
  -webkit-mask-image: linear-gradient(160deg, #000 35%, transparent 72%);
          mask-image: linear-gradient(160deg, #000 35%, transparent 72%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Language: every page exists in English and, under de/, in German (see config.js) */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  flex: none;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 500 0.6875rem/1 var(--mono);
  letter-spacing: 0.12em;
  min-width: 38px;
  min-height: 34px;
  padding: 0 0.6em;
  color: var(--faint);
  text-decoration: none;
}
.lang-switch a + a { border-left: 1px solid var(--line); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="page"] { color: var(--text); background: rgba(232, 214, 190, 0.08); }
.lang-switch a:focus-visible { outline: 2px solid var(--corona); outline-offset: -2px; }

.lang-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.45rem var(--gutter-r) 0.45rem var(--gutter);
  background: var(--hull);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}
.lang-hint a { color: var(--corona-hi); }
.lang-hint__close { min-width: 32px; min-height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.lang-hint__close:hover { color: var(--text); }
