:root {
  --abyss: #050b18;
  --deep: #0a1730;
  --tide: #12284d;
  --line: rgba(160, 200, 255, 0.12);
  --text: #e8f0ff;
  --muted: #8ea3c4;
  --glow: #6fd3ff;
  --glow-soft: rgba(111, 211, 255, 0.16);
  --violet: #a78bfa;
  --radius: 20px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--abyss);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 11, 24, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand svg { width: 28px; height: 28px; color: var(--glow); transition: color 0.4s; }

.site-header.scrolled .brand svg { color: var(--violet); }

.brand small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 2px;
}

.nav { display: flex; gap: 24px; }

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.nav { align-items: center; }

.nav a.lang {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 140px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--tide) 0%, transparent 70%),
    linear-gradient(180deg, var(--deep) 0%, var(--abyss) 100%);
}

.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 0 24px;
  max-width: 14ch;
}

h1 em {
  font-style: normal;
  color: var(--glow);
}

.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 54ch;
  margin: 0 0 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  background: var(--glow);
  color: var(--abyss);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--glow-soft);
}

.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 220px;
  pointer-events: none;
}

.waves path {
  fill: none;
  stroke: var(--glow);
  stroke-width: 1.5;
}

.waves .whale-body {
  fill: var(--glow);
  stroke: none;
}

.waves .whale-eye { fill: var(--abyss); }

.waves .whale-mouth,
.waves .whale-groove {
  stroke: var(--abyss);
  stroke-width: 0.9;
  stroke-linecap: round;
}

.waves .whale-groove { stroke-width: 0.6; stroke-opacity: 0.55; }

.waves .whale-spout { stroke-width: 1.2; stroke-linecap: round; }

.waves .song {
  stroke-linecap: round;
  opacity: 0;
  animation: song 3.2s ease-out infinite;
}

.waves .song-2 { animation-delay: 0.35s; }

@keyframes song {
  0% { opacity: 0; transform: translateX(0); }
  25% { opacity: 0.8; }
  70%, 100% { opacity: 0; transform: translateX(8px); }
}

.not-found {
  min-height: calc(100vh - 64px - 90px);
  display: flex;
  align-items: center;
}

/* Sections */
section { padding: 96px 0; }

.section-head { margin-bottom: 40px; }

h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  max-width: 56ch;
}

/* App cards */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 0.25s, border-color 0.25s;
}

a.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(160, 200, 255, 0.3);
}

.app-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.app-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.app-card p {
  margin: 0;
  color: var(--muted);
}

.app-card .meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.app-card .more { color: var(--text); font-weight: 500; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--glow-soft);
  color: var(--glow);
}

.app-card.placeholder {
  border-style: dashed;
  background: transparent;
}

.app-card.placeholder .icon {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.app-card.placeholder .icon svg { width: 28px; height: 28px; }

/* Story */
.story {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(18, 40, 77, 0.6), transparent 70%);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.freq {
  font-size: clamp(88px, 16vw, 168px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--glow);
}

.freq span {
  font-size: 0.32em;
  letter-spacing: 0;
  -webkit-text-stroke: 0;
  color: var(--glow);
  margin-left: 6px;
}

.story p { color: var(--muted); margin: 0 0 16px; }
.story p strong { color: var(--text); font-weight: 600; }

/* Contact & footer */
.contact { text-align: center; }
.contact h2 { margin-bottom: 16px; }
.contact p { color: var(--muted); margin: 0 0 28px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: 14px;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a { text-decoration: none; }
.site-footer .footer-links { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav { gap: 16px; }
  .nav a.hide-sm { display: none; }
  .hero { padding: 80px 0 120px; }
  section { padding: 72px 0; }
  .story-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
