/* Amnesia.pw palette: #020205 bg, #b9fdec brand, #08080a cards */

:root {
  --brand: #b9fdec;
  --brand-soft: #cffff3;
  --brand-200: #dcfff7;
  --brand-muted: rgba(185, 253, 236, 0.45);
  --brand-glow: rgba(185, 253, 236, 0.4);
  --brand-border: rgba(185, 253, 236, 0.3);
  --brand-fill-5: rgba(185, 253, 236, 0.05);
  --brand-fill-20: rgba(185, 253, 236, 0.2);
  --brand-fill-10: rgba(185, 253, 236, 0.1);
  --on-brand: #021511;

  /* Dark (как amnesia.pw) — по умолчанию */
  --bg: #020205;
  --bg-elevated: rgba(255, 255, 255, 0.03);
  --card: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.05);
  --icon-bg: rgba(0, 0, 0, 0.4);
  --text: #ffffff;
  --text-muted: #737373;
  --text-dim: #525252;
  --section-line: #262626;
  --section-title: #525252;
  --grid-line: rgba(255, 255, 255, 0.04);
  --spot-opacity: 0.1;
}

[data-theme='light'] {
  --bg: #f8f9fa;
  --bg-elevated: rgba(255, 255, 255, 0.85);
  --card: #ffffff;
  --card-border: #e2e8f0;
  --icon-bg: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --section-line: #e2e8f0;
  --section-title: #94a3b8;
  --grid-line: rgba(15, 23, 42, 0.06);
  --spot-opacity: 0.35;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .card__chev,
  .card__icon,
  .blob,
  .title-char,
  .tagline-char {
    transition: none !important;
  }

  .title:hover .title-char,
  .tagline:hover .tagline-char {
    transform: none !important;
  }
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

::selection {
  background: rgba(185, 253, 236, 0.3);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page {
  position: relative;
  min-height: 100vh;
  padding-bottom: 5rem;
  overflow-x: hidden;
  transition: color 0.5s ease;
}

.glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: var(--spot-opacity);
  transition: opacity 0.5s ease;
}

.glow--spot {
  background: radial-gradient(
    600px at 70% 20%,
    var(--brand-glow),
    transparent 80%
  );
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(
      90deg,
      var(--grid-line) 1px,
      transparent 1px
    ),
    linear-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}

.blobs {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
  transition: transform 0.2s ease-out;
}

.blob--a {
  top: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: var(--brand-fill-20);
}

.blob--b {
  bottom: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: var(--brand-fill-10);
  filter: blur(150px);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 0;
}

@media (min-width: 48rem) {
  .wrap {
    padding-top: 8rem;
  }
}

.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: left;
  margin-bottom: 6rem;
}

@media (min-width: 48rem) {
  .header {
    gap: 2.5rem;
  }
}

.logo-link {
  flex-shrink: 0;
  border-radius: 1rem;
}

.logo {
  width: 4rem;
  height: 4rem;
  filter: drop-shadow(0 0 15px rgba(185, 253, 236, 0.45));
}

@media (min-width: 48rem) {
  .logo {
    width: 6rem;
    height: 6rem;
  }

  [data-theme='dark'] .logo {
    filter: drop-shadow(0 0 15px rgba(185, 253, 236, 0.5)) brightness(1.15);
  }
}

.header-text {
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.title {
  position: relative;
  font-size: 2.25rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 1;
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  cursor: default;
}

@media (min-width: 48rem) {
  .title {
    font-size: 4.5rem;
  }
}

.title__visual {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
}

.title__group {
  display: inline-flex;
  flex-wrap: nowrap;
}

.title__group--accent .title-char {
  color: var(--brand);
}

.title__gap {
  display: inline-block;
  width: 0.3em;
  flex-shrink: 0;
}

.title-char {
  display: inline-block;
  cursor: default;
  transform: scale(1);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1),
    color 0.2s ease;
  transition-delay: 0s;
  position: relative;
  z-index: 0;
}

.title:hover .title-char:hover {
  transform: scale(1.26);
  transition-delay: 0s !important;
  z-index: 1;
}

.title:hover .title__group--main .title-char:nth-child(1) {
  transition-delay: 0s;
  transform: scale(1.12);
}
.title:hover .title__group--main .title-char:nth-child(2) {
  transition-delay: 0.04s;
  transform: scale(1.12);
}
.title:hover .title__group--main .title-char:nth-child(3) {
  transition-delay: 0.08s;
  transform: scale(1.12);
}
.title:hover .title__group--main .title-char:nth-child(4) {
  transition-delay: 0.12s;
  transform: scale(1.12);
}
.title:hover .title__group--main .title-char:nth-child(5) {
  transition-delay: 0.16s;
  transform: scale(1.12);
}
.title:hover .title__group--main .title-char:nth-child(6) {
  transition-delay: 0.2s;
  transform: scale(1.12);
}
.title:hover .title__group--main .title-char:nth-child(7) {
  transition-delay: 0.24s;
  transform: scale(1.12);
}

.title:not(:hover) .title__group--main .title-char:nth-child(1) {
  transition-delay: 0.24s;
}
.title:not(:hover) .title__group--main .title-char:nth-child(2) {
  transition-delay: 0.2s;
}
.title:not(:hover) .title__group--main .title-char:nth-child(3) {
  transition-delay: 0.16s;
}
.title:not(:hover) .title__group--main .title-char:nth-child(4) {
  transition-delay: 0.12s;
}
.title:not(:hover) .title__group--main .title-char:nth-child(5) {
  transition-delay: 0.08s;
}
.title:not(:hover) .title__group--main .title-char:nth-child(6) {
  transition-delay: 0.04s;
}
.title:not(:hover) .title__group--main .title-char:nth-child(7) {
  transition-delay: 0s;
}

.title:hover .title__group--accent .title-char:nth-child(1) {
  transition-delay: 0.28s;
  transform: scale(1.12);
}
.title:hover .title__group--accent .title-char:nth-child(2) {
  transition-delay: 0.32s;
  transform: scale(1.12);
}
.title:hover .title__group--accent .title-char:nth-child(3) {
  transition-delay: 0.36s;
  transform: scale(1.12);
}
.title:hover .title__group--accent .title-char:nth-child(4) {
  transition-delay: 0.4s;
  transform: scale(1.12);
}
.title:hover .title__group--accent .title-char:nth-child(5) {
  transition-delay: 0.44s;
  transform: scale(1.12);
}

.title:not(:hover) .title__group--accent .title-char:nth-child(1) {
  transition-delay: 0.16s;
}
.title:not(:hover) .title__group--accent .title-char:nth-child(2) {
  transition-delay: 0.12s;
}
.title:not(:hover) .title__group--accent .title-char:nth-child(3) {
  transition-delay: 0.08s;
}
.title:not(:hover) .title__group--accent .title-char:nth-child(4) {
  transition-delay: 0.04s;
}
.title:not(:hover) .title__group--accent .title-char:nth-child(5) {
  transition-delay: 0s;
}

.title:hover .title__group--accent .title-char {
  color: var(--brand-soft);
}

.title:not(:hover) .title__group--accent .title-char {
  color: var(--brand);
}

.tagline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
  cursor: default;
}

.tagline__rule {
  flex: 1;
  height: 1px;
  background: var(--brand-border);
}

.tagline__text {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--section-title);
}

.tagline__group {
  display: inline-flex;
  flex-wrap: nowrap;
}

.tagline-char {
  display: inline-block;
  position: relative;
  z-index: 0;
  cursor: default;
  color: var(--section-title);
  transform: scale(1);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1),
    color 0.2s ease;
}

.tagline-char:not(:last-child) {
  margin-right: 0.5em;
}

.tagline:hover .tagline-char:hover {
  transform: scale(1.22);
  transition-delay: 0s !important;
  z-index: 1;
}

.tagline:hover .tagline-char:nth-child(1) {
  transition-delay: 0s;
  transform: scale(1.15);
  color: var(--brand);
}
.tagline:hover .tagline-char:nth-child(2) {
  transition-delay: 0.035s;
  transform: scale(1.15);
  color: var(--brand);
}
.tagline:hover .tagline-char:nth-child(3) {
  transition-delay: 0.07s;
  transform: scale(1.15);
  color: var(--brand);
}
.tagline:hover .tagline-char:nth-child(4) {
  transition-delay: 0.105s;
  transform: scale(1.15);
  color: var(--brand);
}
.tagline:hover .tagline-char:nth-child(5) {
  transition-delay: 0.14s;
  transform: scale(1.15);
  color: var(--brand);
}
.tagline:hover .tagline-char:nth-child(6) {
  transition-delay: 0.175s;
  transform: scale(1.15);
  color: var(--brand);
}
.tagline:hover .tagline-char:nth-child(7) {
  transition-delay: 0.21s;
  transform: scale(1.15);
  color: var(--brand);
}

.tagline:not(:hover) .tagline-char:nth-child(1) {
  transition-delay: 0.18s;
}
.tagline:not(:hover) .tagline-char:nth-child(2) {
  transition-delay: 0.15s;
}
.tagline:not(:hover) .tagline-char:nth-child(3) {
  transition-delay: 0.12s;
}
.tagline:not(:hover) .tagline-char:nth-child(4) {
  transition-delay: 0.09s;
}
.tagline:not(:hover) .tagline-char:nth-child(5) {
  transition-delay: 0.06s;
}
.tagline:not(:hover) .tagline-char:nth-child(6) {
  transition-delay: 0.03s;
}
.tagline:not(:hover) .tagline-char:nth-child(7) {
  transition-delay: 0s;
}

@media (min-width: 48rem) {
  .tagline__text {
    font-size: 12px;
  }
}

.theme-toggle {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 20;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(185, 253, 236, 0.12);
  transition: transform 0.2s ease, border-color 0.3s ease, background 0.3s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--brand-border);
}

.theme-toggle__icon {
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  mask: var(--theme-icon-mask) center / contain no-repeat;
  -webkit-mask: var(--theme-icon-mask) center / contain no-repeat;
}

[data-theme='dark'] .theme-toggle__icon {
  --theme-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");
}

[data-theme='light'] .theme-toggle__icon {
  --theme-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}

.sections {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  color: var(--section-title);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--section-line);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 48rem) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 2rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s ease, transform 0.3s ease;
  overflow: hidden;
}

[data-theme='dark'] .card,
:root:not([data-theme='light']) .card {
  box-shadow: none;
}

.card:hover {
  border-color: var(--brand-border);
}

.card__icon {
  flex-shrink: 0;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--icon-bg);
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: color 0.3s ease, background 0.3s ease;
}

[data-theme='dark'] .card__icon {
  color: var(--text);
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.25);
}

.card:hover .card__icon {
  color: var(--brand);
}

.card__body {
  flex: 1;
  min-width: 0;
}

.card__title {
  font-size: 1.125rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.card:hover .card__title {
  color: var(--brand);
}

.card__desc {
  margin-top: 0.25rem;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.625;
  color: var(--text-muted);
  padding-right: 1.5rem;
}

.card__chev {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-dim);
  transition: color 0.3s ease, transform 0.3s ease;
}

.card:hover .card__chev {
  color: var(--brand);
  transform: translateX(4px);
}

.card__shine {
  position: absolute;
  inset: 0;
  background: var(--brand-fill-5);
  opacity: 0;
  filter: blur(40px);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.card:hover .card__shine {
  opacity: 1;
}
