@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.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: "Manrope Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.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;
}

:root {
  --paper: #f4efe4;
  --ink: #1b2430;
  --muted: #5a6370;
  --accent: #1e7d77;
  --accent-hover: #165e59;
  --card: #fffdf8;
  --line: #d5ccb8;
  --cr: #e05c16;
  --logo: #2a9a93;
  --logo-eyes: #1b2430;
  --header-bg: rgba(255, 253, 248, 0.92);
  --button-fg: #fff;
  --font: "Manrope Variable", "Segoe UI", Arial, sans-serif;
  --reel-h: clamp(3.35rem, 16vw, 6.4rem);
  --digit-size: clamp(1.45rem, 7.6vw, 3.35rem);
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #12161c;
  --ink: #e8eef3;
  --muted: #9aa4b0;
  --accent: #4ecdc4;
  --accent-hover: #7adcd5;
  --card: #1c242e;
  --line: #2d3642;
  --cr: #f07a2a;
  --logo: #3ec9be;
  --logo-eyes: #12161c;
  --header-bg: rgba(18, 22, 28, 0.92);
  --button-fg: #12161c;
  color-scheme: dark;
}

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

html {
  text-rendering: optimizeLegibility;
}

body.page {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.5;
}

.site-header,
.site-footer {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.bar {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
}

.brand,
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.footer-brand {
  gap: 0.65rem;
  flex: 0 1 auto;
}

.crtech-logo {
  width: 2.15rem;
  height: 2.15rem;
  display: block;
  flex: 0 0 auto;
  color: var(--logo);
}

.footer-brand .crtech-logo {
  width: 1.85rem;
  height: 1.85rem;
}

.brand-copy {
  min-width: 0;
}

.service-name {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.brand-line {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted);
}

.wordmark {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--muted);
}

.wordmark-cr {
  color: var(--cr);
}

.tagline {
  font-weight: 600;
  letter-spacing: 0;
}

.theme-toggle {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: none;
}

html[data-theme="light"] .icon-moon,
html[data-theme="dark"] .icon-sun {
  display: block;
}

.footer-note {
  margin: 0;
  flex: 1 1 16rem;
  max-width: 38rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

main {
  width: min(40rem, calc(100% - 1.75rem));
  margin: 0 auto;
  padding: 2.4rem 0 2.8rem;
}

.headline {
  margin: 0 0 1.35rem;
  font-size: clamp(1.65rem, 6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
}

.reels {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.28rem, 1.5vw, 0.7rem);
  margin: 0 0 1.15rem;
}

.reel {
  flex: 1 1 0;
  min-width: 0;
}

.reel-window {
  position: relative;
  height: var(--reel-h);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--card);
}

.reel-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--card) 92%, transparent),
    transparent 30%,
    transparent 70%,
    color-mix(in srgb, var(--card) 92%, transparent)
  );
}

.reel-digit {
  height: var(--reel-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--digit-size);
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.play,
.link-read,
.share {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}

.play {
  display: block;
  width: 100%;
  border: 0;
  padding: 0.92rem 1.2rem;
  background: var(--accent);
  color: var(--button-fg);
}

.play:hover:not(:disabled) {
  background: var(--accent-hover);
}

.play:disabled,
.share:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.result {
  margin-top: 1.35rem;
  padding: 1.1rem 1.15rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
}

.result-designation {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.result-title {
  margin: 0.4rem 0 1rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.link-read,
.share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1.05rem;
}

.link-read {
  background: var(--accent);
  color: var(--button-fg);
}

.link-read:hover {
  background: var(--accent-hover);
  color: var(--button-fg);
}

.share {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.share:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.status {
  min-height: 1.4em;
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .bar {
    padding: 0.7rem 0.85rem;
  }

  .service-name {
    font-size: 1.35rem;
  }

  .footer-note {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
