/* EternalMail base: tokens, fonts, reset, shared controls.
   Monochrome product surface. Black accent, hairlines, small radii, no glow. */

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

:root {
  /* surfaces */
  --ground: #ffffff;
  --ground-2: #f7f7f7;
  --panel: #ffffff;
  --panel-2: #fafafa;
  --dark: #0a0a0a;
  --dark-2: #101010;

  /* ink */
  --text: #0a0a0a;
  --text-2: #4d4d4d;
  --muted: #8a8a8a;

  /* lines */
  --line: #e5e5e5;
  --line-2: #d0d0d0;
  --dark-line: #262626;

  /* accent is black; status colours stay, but small */
  --accent: #0a0a0a;
  --accent-strong: #262626;
  --accent-soft: #f2f2f2;
  --danger: #b42318;
  --ok: #067647;
  --warn: #b54708;

  /* legacy aliases used by the admin/editor scripts and older rules */
  --amber: var(--accent);
  --ice: var(--text-2);
  --spark: var(--text);

  --f-display: 'Plex Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --f-body: 'Plex Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --f-mono: 'Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: min(1180px, 100% - 40px);

  --r-s: 4px;
  --r: 6px;
  --r-l: 8px;
  --r-xl: 10px;

  --shadow-xs: 0 1px 1px rgba(10, 10, 10, .03);
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, .04);
  --shadow-md: 0 2px 6px rgba(10, 10, 10, .06);
  --shadow-lg: 0 18px 48px rgba(10, 10, 10, .1);
  --ring: 0 0 0 1px var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light; -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  background: var(--ground);
}
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--text);
  font: 400 14px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--text); color: #fff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.wrap { width: var(--wrap); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- cards ---------- */
.frame {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-l);
}

/* ---------- brand ---------- */
.mark {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 600 15px/1 var(--f-display); letter-spacing: -.01em; text-decoration: none; color: var(--text);
}
.mark::before {
  content: ''; flex: none; width: 18px; height: 18px; border-radius: 3px;
  background: var(--text);
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 0 13px;
  font: 500 13px/1 var(--f-body); letter-spacing: 0; text-decoration: none; white-space: nowrap;
  color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .1s;
}
.btn:hover { background: var(--ground-2); border-color: var(--text-2); }
.btn:active { transform: translateY(1px); }
.btn-hot {
  color: #fff; background: var(--text); border-color: var(--text);
}
.btn-hot:hover { background: #262626; border-color: #262626; }
.btn-ghost { color: #fff; background: transparent; border-color: #3a3a3a; }
.btn-ghost:hover { background: #1c1c1c; border-color: #5a5a5a; }

/* ---------- opening animation ---------- */
html.is-intro, html.is-intro body { overflow: hidden; }
#intro { position: fixed; inset: 0; z-index: 1000; background: #000; overflow: hidden; cursor: pointer; }
#intro canvas { position: absolute; left: 0; top: 0; opacity: 0; }
.intro-hint {
  position: absolute; left: 22px; bottom: 18px;
  font: 500 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: #6f6f6f; transition: opacity .4s;
}
#intro.is-leaving .intro-hint { opacity: 0; }

html.is-intro .rise, html.is-intro .top { opacity: 0; }
html.intro-played .rise, html.intro-played .top {
  animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 40ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}