/* Noctis brand: charcoal + amber, Playfair serif + JetBrains Mono. */

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

:root {
  --bg: #050505;
  --bg-alt: #0a0a0a;
  --fg: #fafafa;
  --fg-muted: rgba(250, 250, 250, 0.65);
  --fg-faded: rgba(250, 250, 250, 0.4);
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --border: rgba(250, 250, 250, 0.08);
  --border-strong: rgba(250, 250, 250, 0.18);
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1100px;
  --pad: 24px;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--accent-hover); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

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

/* ----------- HEADER ----------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad);
}

.brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.flag {
  width: 22px;
  height: 14px;
  display: inline-block;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ----------- HERO ----------- */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7) saturate(0.95);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.6) 60%, rgba(5,5,5,0.95) 100%),
    radial-gradient(circle at 70% 40%, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 100px var(--pad) 80px;
  max-width: 900px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.95;
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--fg-muted);
  max-width: 720px;
  margin-bottom: 14px;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-faded);
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ----------- SECTIONS ----------- */

.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: 60px;
  max-width: 720px;
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -1px;
}

/* ----------- CARDS ----------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -0.5px;
}

.badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid currentColor;
}
.badge-live {
  color: #4ade80;
}
.badge-soon {
  color: #fbbf24;
}
.badge-beta {
  color: #60a5fa;
}

.card-desc {
  color: var(--fg-muted);
  margin-bottom: 24px;
  flex: 1;
}

.card-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.card-meta dt {
  text-transform: uppercase;
  color: var(--fg-faded);
  letter-spacing: 1.5px;
}
.card-meta dd {
  color: var(--fg-muted);
}

.card-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  align-self: flex-start;
}
.card-link:hover { color: var(--accent-hover); }
.card-link-disabled {
  color: var(--fg-faded);
  cursor: default;
}

.card-newsletter .card-desc {
  margin-bottom: 28px;
}

/* ----------- CONTACT ----------- */

.contact-wrap {
  max-width: 760px;
}

.contact-text {
  text-align: left;
}

.contact-body {
  color: var(--fg-muted);
  font-size: 19px;
  line-height: 1.7;
  margin: 30px 0 36px;
  max-width: 640px;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.contact-links li {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1px;
}
.contact-links a {
  color: var(--fg);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: all 0.15s;
}
.contact-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ----------- FOOTER ----------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-small {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fg-faded);
}

/* ----------- MOTION ----------- */

@keyframes noctis-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes noctis-glow {
  0%, 100% { text-shadow: 0 0 12px rgba(245, 158, 11, 0.25); }
  50%      { text-shadow: 0 0 26px rgba(245, 158, 11, 0.5); }
}

@keyframes noctis-aurora {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.55; }
  50%      { transform: translate(4%, -3%) scale(1.18); opacity: 1; }
}

@keyframes noctis-letter-in {
  from { opacity: 0; transform: translateY(44px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero entrance — runs on load, staggered. */
.hero-tagline { animation: noctis-rise 0.9s ease-out 0.85s both; }
.hero-sub     { animation: noctis-rise 0.9s ease-out 1.0s both; }
.hero-cta     { animation: noctis-rise 0.9s ease-out 1.15s both; }

/* NOCTIS wordmark: each letter rises in (staggered), filled with a white->amber
   gradient, with a light shimmer sweeping across the word. The 'I' stays solid amber. */
.ht-letter {
  display: inline-block;
  opacity: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f0e4cf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: noctis-letter-in 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ht-letter:nth-child(1) { animation-delay: 0.10s; }
.ht-letter:nth-child(2) { animation-delay: 0.18s; }
.ht-letter:nth-child(3) { animation-delay: 0.26s; }
.ht-letter:nth-child(4) { animation-delay: 0.34s; }
.ht-letter:nth-child(5) { animation-delay: 0.42s; }
.ht-letter:nth-child(6) { animation-delay: 0.50s; }

.ht-letter.amber {
  background: none;
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
  animation:
    noctis-letter-in 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both,
    noctis-glow 4.5s ease-in-out infinite;
  animation-delay: 0.42s, 0s;
}

/* Slow amber aurora drifting behind the hero. */
.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 40%, rgba(245, 158, 11, 0.2) 0%, transparent 55%);
  animation: noctis-aurora 13s ease-in-out infinite;
  pointer-events: none;
}

/* Scroll reveal — JS adds .in when the element enters the viewport (staggered). */
.reveal {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal:not(.fade-only) { transform: translateY(22px); }
.reveal.in { opacity: 1; }
.reveal.in:not(.fade-only) { transform: translateY(0); }

/* Cards fade only, so their hover lift stays snappy. */
.card.reveal {
  transition: opacity 0.8s ease-out, transform 0.2s ease, border-color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .ht-letter { opacity: 1 !important; transform: none !important; }
}

/* ----------- RESPONSIVE ----------- */

@media (max-width: 720px) {
  .nav-links a:not(.lang-toggle) { display: none; }
  .nav-links { gap: 14px; }
  .hero { min-height: 80vh; }
  .hero-content { padding-top: 60px; padding-bottom: 60px; }
  .section { padding: 70px 0; }
  .section-head { margin-bottom: 40px; }
  .card { padding: 24px 20px; }
}
