/* ===== FONTS (LOCAL, FROM GOOGLE FONTS TTF) ===== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ===== CSS RESET (LIGHT) ===== */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
}

/* ===== THEME TOKENS ===== */

:root {
  --tr-color-bg: #050515;
  --tr-color-bg-soft: #0b0d2a;
  --tr-color-surface: #111431;
  --tr-color-surface-soft: #171a3d;

  --tr-color-text: #f5f5ff;
  --tr-color-text-soft: #c4c6ff;
  --tr-color-text-muted: #8c8fb1;

  --tr-color-accent: #f5c451;       /* warm golden highlight, like clock hands */
  --tr-color-accent-soft: #ff7a9b;  /* warm alarm-glow pink */
  --tr-color-accent-cool: #50f5d2;  /* minty LED accent */

  --tr-color-border-subtle: rgba(255, 255, 255, 0.08);
  --tr-color-border-strong: rgba(255, 255, 255, 0.16);

  --tr-radius-lg: 1.7rem;
  --tr-radius-md: 1rem;
  --tr-radius-pill: 999px;

  --tr-shadow-soft: 0 22px 55px rgba(0, 0, 0, 0.65);
  --tr-shadow-subtle: 0 12px 30px rgba(0, 0, 0, 0.4);

  --tr-header-height: 72px;
  --tr-page-gutter: 1.5rem;

  --tr-transition-fast: 180ms ease-out;
  --tr-transition-med: 260ms ease-out;
}

/* ===== GLOBAL ELEMENTS ===== */

.tr-body {
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1c2157 0, #050515 55%, #030310 100%);
  color: var(--tr-color-text);
  text-rendering: optimizeLegibility;
}

.tr-main {
  padding-top: calc(var(--tr-header-height) + 2.5rem);
  padding-bottom: 3.5rem;
}

.tr-wrap {
  width: min(1120px, 100% - 2 * var(--tr-page-gutter));
  margin-inline: auto;
}

/* Generic section wrapper */

.tr-section {
  padding: 4.5rem 0;
  position: relative;
  overflow: hidden;
}

/* Shared image style: never more than 350px */

.tr-img {
  display: block;
  max-width: 100%;
  width: 100%;
  max-width: 350px;
  border-radius: 1.25rem;
  box-shadow: var(--tr-shadow-subtle);
}

/* ===== HEADER & NAV ===== */

.tr-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 21, 0.96),
    rgba(5, 5, 21, 0.92),
    rgba(5, 5, 21, 0.88)
  );
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--tr-color-border-strong);
}

.tr-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--tr-header-height);
  gap: 1.25rem;
}

/* Logo */

.tr-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}

.tr-logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 40%;
  background:
    radial-gradient(circle at 30% 20%, #ffffff 0, rgba(255, 255, 255, 0) 40%),
    conic-gradient(
      from 220deg,
      #f5c451 0 20%,
      #ff7a9b 20% 50%,
      #50f5d2 50% 75%,
      #f5c451 75% 100%
    );
  position: relative;
  box-shadow: 0 0 0 1px rgba(10, 8, 26, 0.4), 0 0 25px rgba(245, 196, 81, 0.5);
}

.tr-logo__mark::before,
.tr-logo__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 1px solid rgba(5, 6, 20, 0.7);
}

.tr-logo__mark::after {
  inset: 13px;
  border-color: rgba(3, 4, 15, 0.9);
  transform-origin: center;
  animation: tr-logo-tick 18s linear infinite;
}

.tr-logo__text {
  display: flex;
  flex-direction: column;
}

.tr-logo__title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.tr-logo__tagline {
  font-size: 0.75rem;
  color: var(--tr-color-text-muted);
}

/* Nav */

.tr-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tr-nav__list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tr-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.86rem;
  padding: 0.3rem 0;
  text-decoration: none;
  color: var(--tr-color-text-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.tr-nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tr-color-accent), var(--tr-color-accent-soft));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--tr-transition-fast);
}

.tr-nav__link:hover,
.tr-nav__link:focus-visible {
  color: var(--tr-color-text);
}

.tr-nav__link:hover::after,
.tr-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.tr-nav__link--active {
  color: var(--tr-color-text);
}

.tr-nav__link--active::after {
  transform: scaleX(1);
}

/* Burger */

.tr-nav__toggle {
  display: none;
  border: 1px solid var(--tr-color-border-subtle);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: rgba(7, 8, 29, 0.85);
  cursor: pointer;
}

.tr-nav__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--tr-color-text-soft);
  transition: transform var(--tr-transition-fast), opacity var(--tr-transition-fast);
}

.tr-nav__bar + .tr-nav__bar {
  margin-top: 4px;
}

/* ===== BUTTONS ===== */

.tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--tr-radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--tr-transition-med),
    color var(--tr-transition-med),
    border-color var(--tr-transition-med),
    box-shadow var(--tr-transition-med),
    transform var(--tr-transition-fast);
  white-space: nowrap;
}

.tr-btn--primary {
  background: linear-gradient(135deg, var(--tr-color-accent), var(--tr-color-accent-soft));
  color: #140b08;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.55);
}

.tr-btn--primary:hover,
.tr-btn--primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.75);
}

.tr-btn--ghost {
  background: transparent;
  border-color: var(--tr-color-border-strong);
  color: var(--tr-color-text-soft);
}

.tr-btn--ghost:hover,
.tr-btn--ghost:focus-visible {
  border-color: var(--tr-color-accent-cool);
  color: var(--tr-color-text);
  box-shadow: 0 16px 40px rgba(4, 226, 177, 0.18);
}

/* ===== FOOTER ===== */

.tr-footer {
  border-top: 1px solid var(--tr-color-border-subtle);
  padding: 2.5rem 0 2.8rem;
  background: radial-gradient(circle at top, #181a45 0, #050515 60%);
}

.tr-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  align-items: flex-start;
}

.tr-foot__title {
  display: block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.tr-foot__text {
  margin: 0;
  max-width: 18rem;
  font-size: 0.86rem;
  color: var(--tr-color-text-soft);
}

.tr-foot__meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--tr-color-text-muted);
}

.tr-foot__line {
  margin: 0 0 0.2rem;
}

/* ===== REVEAL ANIMATION (JS + CSS) ===== */

.tr-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 420ms ease-out,
    transform 420ms ease-out;
}

.tr-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== KEYFRAMES ===== */

@keyframes tr-logo-tick {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 960px) {
  .tr-footer__grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .tr-foot__meta {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .tr-header__inner {
    height: 64px;
  }

  .tr-nav__toggle {
    display: inline-flex;
  }

  .tr-nav__list {
    position: fixed;
    inset-inline: 0;
    top: 64px;
    background: radial-gradient(circle at top, #181b45 0, #050515 55%);
    border-bottom: 1px solid var(--tr-color-border-subtle);
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem 1.4rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform var(--tr-transition-med),
      opacity var(--tr-transition-med);
  }

  .tr-nav--open .tr-nav__list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .tr-nav--open .tr-nav__bar:first-child {
    transform: translateY(3px) rotate(35deg);
  }

  .tr-nav--open .tr-nav__bar:last-child {
    transform: translateY(-3px) rotate(-35deg);
  }

  .tr-main {
    padding-top: calc(64px + 2rem);
  }
}

@media (max-width: 480px) {
  :root {
    --tr-page-gutter: 1.1rem;
  }

  .tr-footer {
    padding-bottom: 2.3rem;
  }

  .tr-foot__text {
    max-width: 100%;
  }
}
/* ===== FOOTER LEGAL LINKS ===== */

.tr-foot__legal {
  margin-top: 0.8rem;
  grid-column: 1 / -1; /* растянуть строку на всю ширину грида */
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--tr-color-text-muted);
}

.tr-foot__legal-link {
  color: var(--tr-color-text-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(80, 245, 210, 0.6);
  padding-bottom: 0.02rem;
  transition:
    color 180ms ease-out,
    border-color 180ms ease-out,
    transform 160ms ease-out;
}

.tr-foot__legal-link:hover,
.tr-foot__legal-link:focus-visible {
  color: var(--tr-color-text);
  border-color: rgba(245, 196, 81, 0.85);
  transform: translateY(-1px);
}

.tr-foot__legal-divider {
  opacity: 0.7;
}

/* адаптив, если у тебя уже есть блок для футера — просто добавь внутрь существующих @media */

@media (max-width: 640px) {
  .tr-foot__legal {
    justify-content: flex-start;
    font-size: 0.8rem;
  }
}
/* ===== GLOBAL MOBILE TWEAKS ===== */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* чуть компактнее контейнеры на маленьких экранах */
@media (max-width: 900px) {
  .tr-wrap {
    padding-inline: 1.25rem;
  }

  .tr-main {
    padding-top: 4.6rem; /* чтобы контент не прятался под фикс-хедером */
  }
}

@media (max-width: 640px) {
  .tr-wrap {
    padding-inline: 1rem;
  }

  .tr-header {
    padding-inline: 0.75rem;
  }

  .tr-logo__title {
    font-size: 0.9rem;
  }

  .tr-logo__tagline {
    font-size: 0.7rem;
  }

  .tr-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .tr-footer__grid {
    row-gap: 1.4rem;
  }
}

@media (max-width: 480px) {
  .tr-main {
    padding-top: 4.2rem;
  }

  .tr-section {
    padding-top: 2.6rem;
    padding-bottom: 2.6rem;
  }

  .tr-foot__text,
  .tr-foot__line {
    font-size: 0.8rem;
  }

  .tr-nav__list {
    padding-top: 0.75rem;
    padding-bottom: 0.9rem;
  }

  .tr-nav__item {
    margin-bottom: 0.35rem;
  }
}
@media (max-width: 640px) {
  .rh-hero__stack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    transform: none;
  }

  .rh-hero__card {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: 320px;
  }

  .rh-hero__card img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 320px;
  }
}
