:root {
  /* Smart Travel Buddy — palette from app icon, restrained presentation */
  --bg-top: #fff9ee;
  --bg-bottom: #f3e4b8;
  /* Header: darker cream/yellow at top → lighter at bottom + fade below */
  --header-tone-dark: rgba(232, 205, 138, 0.92);
  --header-tone-mid: rgba(255, 244, 200, 0.68);
  --header-tone-light: rgba(255, 251, 235, 0.32);
  --header-fade-yellow: rgba(253, 230, 138, 0.5);
  --header-blur: 20px;
  --header-fade-height: 2rem;
  --page-bg: #f4f3f0;
  --surface: #ffffff;
  --title: #210a3d;
  --section: #331257;
  --text-muted: #5c4275;
  --primary: #9333ea;
  --primary-hover: #7c22ce;
  --accent-violet: #a764f2;
  --accent-lime: #6b8f1a;
  --border: rgba(33, 10, 61, 0.1);
  --border-strong: rgba(33, 10, 61, 0.16);
  --shadow-sm: 0 1px 3px rgba(33, 10, 61, 0.06);
  --shadow-md: 0 8px 24px rgba(33, 10, 61, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

[hidden] {
  display: none !important;
}

/* Early locale hint from lang-init.js (full toggle in lang.js) */
html[data-stb-lang="en"] .lang-ru {
  display: none !important;
}

html[data-stb-lang="en"] .lang-en {
  display: block !important;
}

html:not([data-stb-lang="en"]) .lang-en {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  color: var(--title);
  background: var(--page-bg);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}

a:hover {
  color: var(--primary-hover);
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* Brand strip — dark→light inside bar; yellow blur fades out below (app reference) */
.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: calc(2.25rem + var(--header-fade-height));
  background: linear-gradient(
    180deg,
    var(--header-tone-dark) 0%,
    var(--header-tone-mid) 52%,
    var(--header-tone-light) 100%
  );
  -webkit-backdrop-filter: blur(var(--header-blur)) saturate(1.1);
  backdrop-filter: blur(var(--header-blur)) saturate(1.1);
  border-bottom: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-top {
    background: linear-gradient(180deg, #e8d49a 0%, var(--bg-top) 55%, var(--page-bg) 100%);
  }
}

.site-top .wrap {
  position: relative;
  z-index: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-top + .wrap {
  padding-top: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.lang-switch {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border: 1px solid rgba(147, 51, 234, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.lang-switch button {
  border: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--section);
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.lang-switch button:hover:not(.lang-btn-active) {
  color: var(--primary);
  background: rgba(147, 51, 234, 0.1);
}

.lang-switch button.lang-btn-active {
  background: linear-gradient(180deg, var(--accent-violet) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 1px 4px rgba(124, 34, 206, 0.35);
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 1px;
}

.logo {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--title);
}

.logo a {
  text-decoration: none;
  color: inherit;
}

.nav-inline {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9375rem;
}

.nav-inline a {
  text-decoration: none;
  color: var(--section);
  font-weight: 500;
}

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

.nav-inline a[aria-current="page"] {
  color: var(--title);
  font-weight: 600;
  text-decoration: none;
}

/* Hero — product landing layout */
.hero-panel {
  margin-bottom: 2.75rem;
}

.hero-panel__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

.hero-panel__media {
  flex-shrink: 0;
}

.hero-icon {
  width: clamp(88px, 20vw, 112px);
  height: clamp(88px, 20vw, 112px);
  border-radius: 22%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: block;
}

.hero-panel__body {
  min-width: 0;
}

.hero-badge {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.hero-badge::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: 0.05em;
}

.hero-panel h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  line-height: 1.25;
  color: var(--title);
}

.hero-panel .lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-weight: 400;
  max-width: 36em;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  color: var(--section);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.grid-features .card {
  border-left: 3px solid var(--primary);
}

.grid-features .card:nth-child(3n + 2) {
  border-left-color: var(--accent-violet);
}

.grid-features .card:nth-child(3n + 3) {
  border-left-color: var(--accent-lime);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--section);
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.55;
}

.card-legal {
  max-width: 36rem;
  margin: 0 auto;
  border-left: 3px solid var(--primary);
}

.card-legal h3 {
  margin-top: 0;
}

.card-legal p {
  margin-bottom: 0;
}

.legal-page h1 {
  font-size: 1.625rem;
  margin-top: 0;
  color: var(--title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal-page h2 {
  font-size: 1.0625rem;
  margin-top: 1.75rem;
  color: var(--section);
  font-weight: 600;
}

.legal-page p,
.legal-page li {
  color: var(--title);
  font-weight: 400;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page .meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 400;
}

.site-footer .nav-inline {
  justify-content: center;
  margin-bottom: 0.75rem;
}

.site-footer .nav-inline a {
  color: var(--text-muted);
}

.site-footer .nav-inline a:hover {
  color: var(--primary);
}

@media (max-width: 640px) {
  .hero-panel__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-panel__media {
    justify-self: start;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-tools {
    justify-content: space-between;
  }
}
