@import url("/fonts/fonts.css");

/* ===== S-Klasse — токены «Флагман»: лак, кожа, платина ===== */
:root {
  --lacquer: #07080a;      /* фон: чёрный рояльный лак */
  --cabin: #0e1013;        /* поверхности */
  --panel: #14171b;        /* приподнятые блоки */
  --panel-2: #1b1f24;
  --line: rgba(236, 232, 223, .08);
  --line-2: rgba(236, 232, 223, .15);

  --platinum: #ece8df;     /* основной текст */
  --silver: #b8b5ad;
  --titanium: #8b8d93;     /* второстепенный текст */
  --graphite: #55585e;

  --cognac: #c98a4b;       /* акцент: коньячная кожа */
  --cognac-hi: #e2a768;
  --cognac-lo: #8a5629;
  --on-cognac: #160e06;

  --ok: #8bcfa6;
  --danger: #e6735f;

  --chrome: linear-gradient(180deg, #faf8f3 0%, #c9c8c4 38%, #8e8f93 50%, #e4e3de 62%, #9a9b9f 100%);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .75, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--lacquer);
  color: var(--platinum);
  font: 300 16px/1.55 var(--sans);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
::selection { background: rgba(201, 138, 75, .35); color: #fff; }

:focus-visible { outline: 2px solid var(--cognac-hi); outline-offset: 3px; border-radius: 8px; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Типографика ===== */
.eyebrow {
  font: 500 11px/1 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--titanium);
}
.eyebrow--cognac { color: var(--cognac); }
.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: .95;
}
.display em { font-style: italic; color: var(--silver); }
.num { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
.muted { color: var(--titanium); }

/* ===== Шильдик ===== */
.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark__emblem { width: 34px; height: 34px; flex: none; }
.wordmark__text {
  font: 500 13px/1 var(--sans);
  letter-spacing: .38em;
  margin-right: -.38em;
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.wordmark__text b { font-weight: 300; letter-spacing: .3em; }

/* ===== Кнопки ===== */
.btn {
  --h: 52px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  height: var(--h); padding: 0 26px;
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s, color .25s, border-color .25s;
  user-select: none;
}
.btn::after { /* блик хрома, пробегает при наведении */
  content: ""; position: absolute; inset: -2px; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease);
  pointer-events: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn--cognac {
  background: linear-gradient(180deg, var(--cognac-hi), var(--cognac) 55%, #b27637);
  color: var(--on-cognac);
  box-shadow: inset 0 1px 0 rgba(255, 236, 210, .45), 0 10px 30px -12px rgba(201, 138, 75, .7);
}
.btn--ghost {
  border: 1px solid var(--line-2);
  color: var(--platinum);
  background: rgba(255, 255, 255, .02);
}
.btn--ghost::after { background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%); }
.btn--block { width: 100%; }
.btn > svg { margin-right: 10px; flex: none; }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 14px; }

@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover::after { transform: translateX(120%); }
  .btn--cognac:hover { box-shadow: inset 0 1px 0 rgba(255, 236, 210, .5), 0 16px 40px -12px rgba(226, 167, 104, .85); }
  .btn--ghost:hover { border-color: rgba(236, 232, 223, .32); background: rgba(255, 255, 255, .05); }
}

/* ===== Строчка «прострочки» кожи ===== */
.stitch { position: relative; }
.stitch::before {
  content: ""; position: absolute; inset: 7px;
  border-radius: calc(var(--r-lg) - 6px);
  border: 1px dashed rgba(201, 138, 75, .55);
  pointer-events: none;
  opacity: 0; transition: opacity .4s var(--ease);
}
.stitch.is-on::before { opacity: 1; }

/* ===== Появление при скролле ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ===== Тост ===== */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--panel-2); border: 1px solid var(--line-2);
  padding: 12px 18px; border-radius: 999px;
  font-size: 14px; z-index: 100; pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ===== Прибор (общий для лендинга и кабинета) ===== */
.gauge { position: relative; aspect-ratio: 1; width: 100%; user-select: none; -webkit-user-select: none; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .g-face { fill: url(#g-face); }
.gauge .g-bezel { fill: none; stroke: url(#g-bezel); stroke-width: 2; }
.gauge .g-tick { stroke: var(--graphite); stroke-width: 1.4; stroke-linecap: round; transition: stroke .25s; }
.gauge .g-tick--major { stroke-width: 2.4; stroke: var(--titanium); }
.gauge .g-tick.is-lit { stroke: var(--cognac-hi); }
.gauge .g-label { fill: var(--titanium); font: 400 15px var(--sans); text-anchor: middle; dominant-baseline: middle; transition: fill .25s; }
.gauge .g-label.is-lit { fill: var(--platinum); }
.gauge .g-track { fill: none; stroke: rgba(236, 232, 223, .06); stroke-width: 3; }
.gauge .g-arc { fill: none; stroke: url(#g-arc); stroke-width: 3; stroke-linecap: round; filter: url(#g-glow); }
.gauge .g-needle line { stroke: var(--cognac-hi); stroke-width: 3; stroke-linecap: round; filter: url(#g-glow); }
.gauge .g-needle .g-tail { stroke: var(--silver); stroke-width: 4; filter: none; }
.gauge .g-cap { fill: url(#g-cap); stroke: rgba(0, 0, 0, .6); stroke-width: 1; }
.gauge .g-readout {
  position: absolute; left: 0; right: 0; top: 62%;
  text-align: center; pointer-events: none;
}
.gauge .g-value {
  display: block;
  font: 200 clamp(40px, 11vw, 64px)/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  color: var(--platinum);
}
.gauge .g-unit { display: block; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
