/* ========================================
   Signal Design System
   Flat. Typographic. Zero decoration.
   One accent per page. Whitespace is the grid.
   ======================================== */

:root {
  --bg:        #08080a;
  --text:      #f5f5f7;
  --text-mid:  #8e8e93;
  --text-dim:  #5c5c62;
  --accent:    #7c5cfc;
  --divider:   rgba(255,255,255,0.06);
  --font:      'Inter', system-ui, -apple-system, sans-serif;

  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  32px;
  --space-lg:  64px;
  --space-xl:  120px;

  --measure:   680px;
  --measure-wide: 880px;

  --ease: cubic-bezier(0.22, 0.03, 0.13, 1);
}

.vairo-page {
  --accent: #14b8a6;
}

/* ========================================
   Reset
   ======================================== */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Typography
   ======================================== */

.t-hero {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.t-heading {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.t-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-mid);
}

.t-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.t-small {
  font-size: 13px;
  color: var(--text-dim);
}

/* ========================================
   Layout primitives
   ======================================== */

.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  width: 100%;
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section { padding: var(--space-md) var(--space-md); }

/* ========================================
   Header
   ======================================== */

.header {
  flex-shrink: 0;
  padding: 16px var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: opacity 0.15s;
}
.logo:hover { opacity: 0.6; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.lang-switcher-link {
  transition: color 0.15s;
}
.lang-switcher-link:hover { opacity: 0.7; }

.lang-switcher-sep {
  color: var(--text-dim);
}

.lang-switcher-active {
  color: var(--text);
}

.lang-switcher-inactive {
  color: var(--text-mid);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  padding: 0 var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero .t-hero { margin-bottom: var(--space-md); }

.hero .t-body {
  max-width: 420px;
  margin: 0 auto var(--space-lg);
}

.accent-word { color: var(--accent); }

/* ========================================
   CTA
   ======================================== */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  padding: 12px 24px;
  border-radius: 100px;
  transition: all 0.2s var(--ease);
}
.cta:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  flex-shrink: 0;
  padding: var(--space-md) var(--space-md);
  padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--divider);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-sep {
  color: var(--text-dim);
}

.footer-links a {
  color: var(--text-mid);
}

/* ========================================
   Vairo: main distribution
   ======================================== */

.vairo-page main {
  justify-content: space-evenly;
}

/* ========================================
   Vairo: hero variant
   ======================================== */

.vairo-hero {
  padding: 0 var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.vairo-hero .t-hero { margin-bottom: var(--space-md); }
.vairo-hero .t-body {
  max-width: 440px;
  margin: 0 auto var(--space-lg);
}

/* ========================================
   Vairo: pillars (3-col grid, unique pattern)
   ======================================== */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.pillar {
  border-top: 1px solid var(--divider);
  padding-top: var(--space-md);
}
.pillar h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.pillar p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ========================================
   Animation
   ======================================== */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-in 0.6s var(--ease) forwards;
}
@keyframes fade-in {
  to { opacity: 1; transform: translateY(0); }
}

.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.19s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   Legal: Privacy & Terms pages
   ======================================== */

.legal-hero {
  padding: var(--space-lg) var(--space-md) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.legal-hero .t-heading {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.legal-hero .t-small {
  color: var(--text-mid);
}

.legal-content {
  padding: var(--space-md);
  overflow-y: auto;
  flex: 1;
}

/* Legal pages: single unified scroll via main */
.legal-page main {
  overflow-y: auto;
  justify-content: flex-start;
}

.legal-page .legal-content {
  overflow-y: visible;
  flex: unset;
  padding-bottom: var(--space-xl);
}

.legal-body {
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--text-mid);
}

.legal-body h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.legal-body ul {
  list-style: none;
  margin-bottom: var(--space-md);
  padding-left: 0;
}

.legal-body li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: var(--space-sm);
  padding-left: 20px;
  position: relative;
}

.legal-body li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ========================================
   Forms
   ======================================== */

.contact-form {
  max-width: var(--measure);
  margin: 0 auto var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-form h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--text);
  transition: border-color 0.15s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  align-self: flex-start;
}

.form-submit:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-field-error input,
.form-field-error textarea {
  border-color: var(--accent);
}

.form-error {
  color: var(--accent);
  font-size: 13px;
  margin-top: 4px;
}

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  padding: 14px 20px;
  max-width: 320px;
  z-index: 100;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast--success {
  border-left: 3px solid #14b8a6;
}

.toast--error {
  border-left: 3px solid var(--accent);
}

@media (max-width: 600px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* ========================================
   FAQ: Frequently Asked Questions
   ======================================== */

.faq-body {
  max-width: var(--measure);
  margin: 0 auto;
  color: var(--text-mid);
}

.faq-item {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--divider);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-item h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.faq-item p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-mid);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  :root {
    --space-xl: 80px;
  }

  .pillars { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header { padding: 14px var(--space-sm); }
  .footer { flex-direction: column; gap: var(--space-sm); }
}

@media (max-height: 700px) {
  html {
    height: auto;
    overflow: auto;
  }
  body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
}
