/* ---------------------------------------------------------------------------
   appdev.team — holding page
   Variant 1a "Тёмный терминал": monochrome + amber, noise, scanlines,
   a sweeping band of light and a hairline that follows the pointer.
   --------------------------------------------------------------------------- */

/* Fonts — JetBrains Mono, self-hosted variable subsets (400–500). */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Palette — hex first, oklch where it is supported. */
:root {
  --bg: #0d1012;
  --fg: #e4e8ed;
  --accent: #e6ad00;
  --dim-1: #d3d8de; /* language toggles      */
  --dim-2: #9399a0; /* lede                  */
  --dim-3: #6f757b; /* shell prompt          */
  --dim-4: #5f6469; /* wordmark TLD          */
  --dim-5: #54595e; /* footer                */

  /* Translucent amber used for the atmospherics. */
  --glow-sweep: rgba(242, 193, 78, .06);
  --glow-hairline: rgba(242, 193, 78, .16);
  --scanline: rgba(255, 255, 255, .035);

  /* Pointer position for the vertical hairline; offscreen until the mouse moves. */
  --ax: -10px;
  /* Noise texture, generated at runtime; blank until then. */
  --noise: none;
}

@supports (color: oklch(0.5 0.1 250)) {
  :root {
    --bg: oklch(0.17 0.006 250);
    --fg: oklch(0.93 0.008 250);
    --accent: oklch(0.78 0.16 85);
    --dim-1: oklch(0.88 0.01 250);
    --dim-2: oklch(0.68 0.012 250);
    --dim-3: oklch(0.56 0.012 250);
    --dim-4: oklch(0.5 0.01 250);
    --dim-5: oklch(0.46 0.01 250);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  -webkit-font-smoothing: antialiased;
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

a {
  color: var(--fg);
  text-decoration: none;
}

a:hover { color: var(--accent); }

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* --- Language visibility ------------------------------------------------- */

[data-lang='ru'] [data-lang-block='en'],
[data-lang='en'] [data-lang-block='ru'] { display: none; }

/* --- Stage & atmospherics ------------------------------------------------ */

.stage {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.fx {
  position: absolute;
  pointer-events: none;
}

.fx--noise {
  inset: 0;
  opacity: .5;
  background-image: var(--noise);
  background-repeat: repeat;
  animation: drift 26s linear infinite;
}

.fx--scanlines {
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--scanline) 0 1px,
    transparent 1px 4px
  );
}

.fx--sweep {
  left: 0;
  right: 0;
  top: 0;
  height: 9vh;
  background: linear-gradient(to bottom, transparent, var(--glow-sweep), transparent);
  animation: scan 7.5s linear infinite;
}

.fx--hairline {
  left: var(--ax);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--glow-hairline);
}

/* --- Layout -------------------------------------------------------------- */

.layout {
  position: relative;
  min-height: 100dvh;
  padding: clamp(24px, 4vw, 56px) clamp(20px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(40px, 8vh, 96px);
}

/* --- Masthead ------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: clamp(13px, 1.6vw, 15px);
  letter-spacing: .02em;
}

.wordmark__name { color: var(--accent); }
.wordmark__tld { color: var(--dim-4); }

.lang {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  font-size: 13px;
  letter-spacing: .12em;
}

.lang__btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--dim-1);
  font: inherit;
  letter-spacing: inherit;
  transition: color .18s ease;
}

.lang__btn:hover { color: var(--accent); }

.lang__mark {
  height: 1px;
  background: var(--accent);
  opacity: 0;
}

.lang__btn[aria-pressed='true'] .lang__mark { opacity: 1; }

/* --- Console ------------------------------------------------------------- */

.console {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 34px);
  animation: fadeUp .7s ease-out both;
}

.prompt {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(12px, 1.5vw, 14px);
  color: var(--dim-3);
}

.prompt__path { color: var(--accent); }

.say {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.5vh, 28px);
}

.headline {
  margin: 0;
  font-size: clamp(30px, 5.4vw, 60px);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.12;
  text-wrap: balance;
}

/* Glued to the last word — no whitespace in the markup, so it can never
   wrap onto a line of its own, in any language. */
.caret {
  display: inline-block;
  vertical-align: baseline;
  width: .28em;
  height: .8em;
  margin-left: .22em;
  background: var(--accent);
  animation: caret 1.1s step-end infinite;
}

.lede {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 720px;
  font-size: clamp(14px, 1.9vw, 18px);
  line-height: 1.6;
  color: var(--dim-2);
}

.link {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.link__arrow { font-family: ui-sans-serif, system-ui, sans-serif; }

/* --- Footer -------------------------------------------------------------- */

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: clamp(10px, 1.3vw, 12px);
  letter-spacing: .1em;
  color: var(--dim-5);
}

.status__clock:empty { visibility: hidden; }

/* --- Motion -------------------------------------------------------------- */

@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes drift {
  0% { background-position: 0 0; }
  100% { background-position: 140px 140px; }
}

@keyframes scan {
  0% { transform: translateY(-8vh); }
  100% { transform: translateY(108vh); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fx--noise,
  .fx--sweep,
  .caret,
  .console { animation: none; }

  .fx--sweep { opacity: 0; }
  .fx--hairline { display: none; }
  .lang__btn { transition: none; }
}
