/* ======================================================
   AURORA — приватні орбітальні експедиції
   Спільна дизайн-система сайту
====================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --void: #0a0b16;
  --void-soft: #0f1120;
  --void-elevated: #151830;
  --border: rgba(244,242,240,0.10);
  --border-strong: rgba(244,242,240,0.20);
  --ink: #f4f2ef;
  --mist: #a8a4bf;
  --mist-dim: #6e6b85;
  --aurora-green: #6fe6ab;
  --aurora-violet: #a684f5;
  --ember: #ff9d5c;
  --gradient: linear-gradient(120deg, var(--aurora-green), var(--aurora-violet));
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.16,.84,.44,1);
  --header-h: 76px;
}

/* ---------- Typography ---------- */
h1, h2, h3, .serif { font-family: 'Fraunces', serif; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 4vw + 1.2rem, 4.6rem); font-weight: 480; }
h2 { font-size: clamp(1.9rem, 2.3vw + 1.1rem, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1vw + 0.9rem, 1.45rem); font-weight: 500; }
h1 em, h2 em { font-style: italic; color: var(--aurora-green); }
p { color: var(--mist); }
.lead { font-size: 1.08rem; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--aurora-green); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 8px var(--aurora-green); flex-shrink: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 1.5rem; }
main { position: relative; z-index: 1; }
.section { padding-block: clamp(4rem, 8vw, 6.5rem); position: relative; }
.section-tight { padding-block: clamp(2.2rem, 5vw, 3.6rem); }
.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'IBM Plex Mono', monospace; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .95rem 1.6rem; border-radius: var(--radius-sm); white-space: nowrap;
  transition: transform .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.btn-primary { background: var(--ember); color: #1a0f04; font-weight: 500; }
.btn-primary:hover { transform: translateY(-2px); background: #ffb37e; }
.btn-ghost { border: 1px solid var(--border-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--aurora-green); color: var(--aurora-green); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-block: 1.3rem; border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10,11,22,.82); backdrop-filter: blur(14px);
  border-bottom-color: var(--border); padding-block: .85rem;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.3rem; display: flex; align-items: center; gap: .55rem; }
.logo::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 10px var(--aurora-green); flex-shrink: 0; }
.nav-menu { display: flex; gap: 2rem; align-items: center; font-family: 'IBM Plex Mono', monospace; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.nav-link { position: relative; color: var(--mist); padding-block: .3rem; transition: color .3s; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--aurora-green); transition: width .35s var(--ease); }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 1.2rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .4rem; z-index: 60; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-menu {
    position: fixed; inset: 0 0 0 22%; top: 0;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.8rem;
    padding: 2rem 2.2rem; background: rgba(10,11,22,.98); backdrop-filter: blur(18px);
    border-left: 1px solid var(--border); transform: translateX(100%);
    transition: transform .45s var(--ease); overflow-y: auto;
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-menu .nav-link { font-size: 1.15rem; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Hero / aurora scene ---------- */
.hero { position: relative; overflow: hidden; min-height: 100vh; display: flex; align-items: center; padding-top: var(--header-h); }
.aurora-scene { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse at 50% 0%, #131632 0%, var(--void) 68%); }
.stars { position: absolute; inset: 0; overflow: hidden; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .5; animation: twinkle 3.6s ease-in-out infinite; }
.star.big { width: 3px; height: 3px; box-shadow: 0 0 6px rgba(255,255,255,.7); }
@keyframes twinkle { 0%, 100% { opacity: .18; } 50% { opacity: .9; } }
.ribbons { position: absolute; inset: 0; width: 100%; height: 100%; }
.ribbon { transform-box: fill-box; transform-origin: center; animation: ribbonDrift 12s ease-in-out infinite; }
.ribbon-2 { animation-duration: 16s; animation-delay: -5s; }
.ribbon-3 { animation-duration: 20s; animation-delay: -9s; }
@keyframes ribbonDrift { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(10px) scaleY(1.05); } }
.horizon { position: absolute; bottom: 0; left: 0; width: 100%; height: 24%; z-index: 1; }
.horizon path { fill: var(--void); }
.hero-content { position: relative; z-index: 2; max-width: 680px; }
.hero-content::before {
  content: ''; position: absolute; inset: -2.5rem -4rem; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(10,11,22,.6), transparent 72%); filter: blur(6px);
}
.hero-content p { margin-block: 1.3rem 2.1rem; max-width: 540px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-1.is-visible { transition-delay: .12s; }
.reveal-2.is-visible { transition-delay: .24s; }
.reveal-3.is-visible { transition-delay: .36s; }

/* ---------- Manifest strip ---------- */
.manifest { border-top: 1px dashed var(--border-strong); border-bottom: 1px dashed var(--border-strong); padding-block: 1.3rem; overflow-x: auto; }
.manifest-inner { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; justify-content: center; font-size: .82rem; color: var(--mist); }
.manifest-item { white-space: nowrap; }
.manifest-item span[data-count] { color: var(--ink); font-weight: 500; }
.manifest-divider { color: var(--aurora-green); opacity: .55; }

/* ---------- Editorial list (features / values) ---------- */
.edit-list { margin-top: .5rem; }
.edit-row { display: grid; grid-template-columns: 170px 1fr; gap: 2rem; padding-block: 2rem; border-top: 1px solid var(--border); align-items: start; }
.edit-row:last-child { border-bottom: 1px solid var(--border); }
.edit-tag { color: var(--aurora-green); font-size: .78rem; letter-spacing: .1em; padding-top: .35rem; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; }
.edit-body h3 { margin-bottom: .5rem; }
.edit-body p { max-width: 520px; }
@media (max-width: 640px) { .edit-row { grid-template-columns: 1fr; gap: .6rem; } }

/* ---------- Destination chips ---------- */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.chip {
  background: var(--void-soft); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.chip:hover { border-color: var(--aurora-green); transform: translateY(-5px); }
.chip-swatch { aspect-ratio: 16 / 10; position: relative; display: flex; align-items: flex-end; padding: 1rem; }
.chip-swatch::after {
  content: ''; position: absolute; inset: 0; mix-blend-mode: overlay; opacity: .5;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0px, rgba(0,0,0,.1) 1px, transparent 1px, transparent 3px);
}
.chip-code { position: relative; z-index: 1; background: rgba(10,11,22,.55); padding: .25rem .6rem; border-radius: 3px; font-size: .72rem; letter-spacing: .08em; color: #fff; font-family: 'IBM Plex Mono', monospace; }
.chip-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.chip-body p { flex: 1; font-size: .94rem; margin-block: .5rem 1.2rem; }
.chip-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--mist-dim); padding-top: 1rem; border-top: 1px solid var(--border); font-family: 'IBM Plex Mono', monospace; }
.chip-meta span:last-child { color: var(--aurora-green); }
.badge { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 3px; background: rgba(255,157,92,.15); color: var(--ember); margin-bottom: .8rem; border: 1px solid rgba(255,157,92,.3); }

.swatch-orbit { background: linear-gradient(135deg, #2c5384, #182849); }
.swatch-suborbital { background: linear-gradient(135deg, #7f5a2c, #4a3016); }
.swatch-moon { background: linear-gradient(135deg, #96969f, #48454f); }
.swatch-mars { background: linear-gradient(135deg, #bd5c33, #5c2011); }
.swatch-venus { background: linear-gradient(135deg, #d6a751, #7a5a1c); }

/* ---------- Filter tabs ---------- */
.filter-tabs { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.filter-tab {
  font-family: 'IBM Plex Mono', monospace; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .55rem 1.1rem; border: 1px solid var(--border); border-radius: 100px; color: var(--mist);
  transition: all .3s var(--ease);
}
.filter-tab.is-active, .filter-tab:hover { border-color: var(--aurora-green); color: var(--ink); }

/* ---------- Timeline ---------- */
.timeline { margin-top: 2.3rem; }
.timeline-item { display: grid; grid-template-columns: 76px 1fr; gap: 1.6rem; padding-block: 2.1rem; border-top: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-marker { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; color: var(--aurora-violet); padding-top: .15rem; }
.timeline-body h3 { margin-bottom: .5rem; }
.timeline-body p { max-width: 560px; }
@media (max-width: 640px) { .timeline-item { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- Crew roster ---------- */
.roster { margin-top: .5rem; }
.roster-row { display: grid; grid-template-columns: 110px 1fr 1.7fr; gap: 1.5rem; align-items: center; padding-block: 1.3rem; border-top: 1px solid var(--border); }
.roster-row:last-child { border-bottom: 1px solid var(--border); }
.roster-code { color: var(--aurora-green); font-size: .78rem; letter-spacing: .08em; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; }
.roster-name { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--ink); }
.roster-role { color: var(--mist-dim); font-size: .88rem; }
@media (max-width: 700px) {
  .roster-row { grid-template-columns: 1fr; gap: .3rem; padding-block: 1.4rem; }
  .roster-code { order: 1; } .roster-name { order: 2; } .roster-role { order: 3; }
}

/* ---------- CTA band ---------- */
.cta-band { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(2.4rem, 5vw, 4rem); text-align: center; position: relative; overflow: hidden; background: var(--void-soft); }
.cta-band::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(111,230,171,.08), rgba(166,132,245,.08)); pointer-events: none; }
.cta-band .eyebrow { justify-content: center; position: relative; }
.cta-band h2 { margin-block: .6rem 1rem; position: relative; }
.cta-band p { max-width: 480px; margin-inline: auto; margin-bottom: 1.8rem; position: relative; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Quote ---------- */
.quote { max-width: 720px; margin-inline: auto; text-align: center; }
.quote blockquote { font-family: 'Fraunces', serif; font-style: italic; font-size: clamp(1.3rem, 1.6vw + 1rem, 1.9rem); color: var(--ink); line-height: 1.4; }
.quote cite { display: block; margin-top: 1.4rem; font-family: 'IBM Plex Mono', monospace; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mist-dim); font-style: normal; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mist); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--void-soft);
  border: 1px solid var(--border); color: var(--ink); transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--aurora-green); box-shadow: 0 0 0 3px rgba(111,230,171,.15); }
.field textarea { resize: vertical; min-height: 130px; }
.contact-form { background: var(--void-soft); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(1.7rem, 4vw, 2.6rem); }
.form-success { display: none; text-align: center; padding: 2.5rem 1rem; }
.contact-form.is-success .form-fields, .contact-form.is-success .form-submit { display: none; }
.contact-form.is-success .form-success { display: block; }
.form-success .check { width: 58px; height: 58px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.3rem; }
.form-success h3 { margin-bottom: .5rem; }
.form-reset { margin-top: 1.5rem; }

.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; padding-block: 1.3rem; border-top: 1px solid var(--border); }
.contact-info-item:last-child { border-bottom: 1px solid var(--border); }
.contact-info-item .label { font-family: 'IBM Plex Mono', monospace; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mist-dim); margin-bottom: .3rem; }
.contact-info-item .value { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.5rem; text-align: left; font-family: 'Fraunces', serif; font-size: 1.08rem; font-weight: 500; color: var(--ink); }
.faq-question .icon { width: 20px; height: 20px; position: relative; flex-shrink: 0; }
.faq-question .icon::before, .faq-question .icon::after { content: ''; position: absolute; top: 50%; left: 50%; background: var(--aurora-green); transform: translate(-50%, -50%); transition: transform .3s var(--ease), opacity .3s; }
.faq-question .icon::before { width: 12px; height: 1.5px; }
.faq-question .icon::after { width: 1.5px; height: 12px; }
.faq-item.is-open .icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq-answer p { padding-bottom: 1.5rem; font-size: .95rem; max-width: 560px; }
.faq-item.is-open .faq-answer { max-height: 260px; }

/* ---------- Page header (inner pages) ---------- */
.page-header { padding-top: calc(var(--header-h) + 5rem); padding-bottom: 2.5rem; position: relative; overflow: hidden; }
.page-header::before {
  content: ''; position: absolute; top: -20%; right: -8%; width: 50%; height: 140%;
  background: radial-gradient(circle, rgba(111,230,171,.12), transparent 65%); filter: blur(40px); pointer-events: none;
}
.page-header .eyebrow, .page-header h1, .page-header p { position: relative; }
.page-header h1 { max-width: 700px; }
.page-header p { max-width: 600px; margin-top: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 3.5rem 2rem; margin-top: 2rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-blurb { max-width: 280px; margin-top: 1rem; font-size: .9rem; }
.footer-nav { display: flex; gap: 1.8rem; flex-wrap: wrap; font-family: 'IBM Plex Mono', monospace; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-nav a { color: var(--mist); transition: color .3s; }
.footer-nav a:hover { color: var(--aurora-green); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .8rem; padding-top: 1.8rem; border-top: 1px solid var(--border); color: var(--mist-dim); font-size: .78rem; font-family: 'IBM Plex Mono', monospace; }
.social-links { display: flex; gap: .8rem; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--mist); transition: all .3s var(--ease); }
.social-links a:hover { border-color: var(--aurora-green); color: var(--aurora-green); }
.social-links svg { width: 15px; height: 15px; }

/* ---------- Grid utility ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Accessibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--aurora-green); outline-offset: 3px; border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
