:root {
  color-scheme: light dark;
  --bg: #0b1020;
  --fg: #f4f1e8;
  --accent: #e0a100;
  --muted: #b7b1a4;
}

body {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", Palatino, "Palatino Linotype",
    "Songti SC", "Songti TC", "Hiragino Mincho ProN", "Noto Serif CJK JP",
    "Noto Serif CJK KR", "Noto Serif Thai", "Geeza Pro", "Noto Naskh Arabic", serif;
  background: radial-gradient(circle at top, #1a2340, var(--bg));
  color: var(--fg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(11, 16, 32, 0.94);
  border-bottom: 1px solid rgba(224, 161, 0, 0.35);
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px 20px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.02em;
}

h2 {
  margin-top: 2rem;
}

p,
li {
  line-height: 1.6;
  color: var(--muted);
}

a {
  color: var(--accent);
}

a:focus-visible,
.lang-picker select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
}

.lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.lang-picker select {
  max-width: 100%;
  font: inherit;
  color: var(--fg);
  background: #12182c;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 8px;
}

.hero {
  margin: 32px 0 48px;
}

code {
  color: var(--fg);
}

/* Home */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}

.brand img {
  border-radius: 7px;
}

body[data-page="home"] {
  --red: #d8342c;
  background:
    radial-gradient(60rem 36rem at 85% -10%, rgba(216, 52, 44, 0.28), transparent 60%),
    radial-gradient(50rem 30rem at -10% 20%, rgba(224, 161, 0, 0.14), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}

main.home {
  max-width: 1120px;
  padding-top: 24px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 560px;
}

.home-icon {
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(224, 161, 0, 0.4), 0 12px 40px rgba(216, 52, 44, 0.45);
}

.home-hero h1 {
  margin: 24px 0 12px;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.gold {
  background: linear-gradient(100deg, #ffd56b, var(--accent) 45%, #e0632a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-lead {
  max-width: 34rem;
  font-size: 1.2rem;
  color: #d6d0c2;
}

.home-cta {
  margin-top: 28px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 16px;
  border-radius: 14px;
  background: #05070f;
  border: 1px solid rgba(244, 241, 232, 0.25);
  color: var(--fg);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.store-button span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.store-button small {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.store-button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(224, 161, 0, 0.25);
}

.home-phones {
  position: relative;
  height: 540px;
}

.phone {
  position: absolute;
  width: 230px;
  height: auto;
  border-radius: 34px;
  border: 6px solid #1c2236;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.phone-front {
  left: 12%;
  top: 0;
  transform: rotate(-5deg);
  z-index: 1;
}

.phone-back {
  left: 48%;
  top: 40px;
  transform: rotate(7deg);
  opacity: 0.85;
}

.home-features,
.home-languages {
  margin-top: 72px;
}

.home h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(224, 161, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 161, 0, 0.6);
}

.feature-card p {
  margin: 14px 0 0;
  color: var(--fg);
  font-size: 1.05rem;
}

.feature-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--red), #8c1d18);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff4dc;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-gallery {
  margin: 72px -20px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.gallery-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: gallery-scroll 50s linear infinite;
}

.gallery-track img {
  width: 180px;
  height: auto;
  border-radius: 22px;
  border: 4px solid #1c2236;
}

@keyframes gallery-scroll {
  to {
    transform: translateX(-50%);
  }
}

.language-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.language-chips span {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 232, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid rgba(224, 161, 0, 0.2);
  padding: 24px 20px 40px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .home-lead {
    margin: 0 auto;
  }

  .home-phones {
    height: 420px;
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
  }

  .phone {
    width: 180px;
  }

  .phone-front {
    left: 6%;
  }

  .phone-back {
    left: 44%;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .feature-icon {
    flex-shrink: 0;
  }

  .feature-card p {
    margin: 0;
  }

  .site-header label {
    display: none;
  }

  .phone {
    width: 150px;
  }

  .home-phones {
    height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    animation: none;
  }
}
