/*
  NeuraBand Coming Soon — Styles
  A clean, minimal, Apple-like aesthetic with strong typography, generous whitespace,
  subtle motion, and full mobile responsiveness. Now with dark/light mode and aura effect.
*/

:root {
  --bg: #ffffff;
  --text: #0b0b0b;
  --muted: #6b7280; /* gray-500 */
  --accent: #007aff; /* More vibrant blue */
  --accent-2: #5ac8fa;
  --border: #e5e7eb; /* gray-200 */
  --elev: 0 10px 30px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --radius: 16px; /* Slightly larger */
  --container: 1120px;
  --font-size-sm: 14px;
  --error: #ff3b30;
  --success: #34c759;
}

[data-theme="dark"] {
  /* New dark palette */
  --bg: #0b0f14; /* deep ink */
  --text: #e6eef8; /* soft ice */
  --muted: #9fb0c3; /* desaturated blue-gray */
  --accent: #4da3ff; /* vivid azure */
  --accent-2: #6cd3ff; /* cyan tint */
  --border: rgba(108, 122, 137, 0.35);
  --elev: 0 16px 40px rgba(0,0,0,.6), 0 6px 20px rgba(0,0,0,.4);
}

/* Extended surface variables */
:root {
  --card-bg: #ffffff;
  --card-glow: rgba(0, 122, 255, 0.15);
}
[data-theme="dark"] {
  --card-bg: #111317; /* Deep slate */
}

* { box-sizing: border-box; }
html, body { height: 100%; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.7; /* Slightly more line height for readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Aura effect: subtle gradient */
  background: linear-gradient(135deg, var(--bg) 0%, rgba(0, 122, 255, 0.03) 50%, var(--bg) 100%);
  transition: background 0.4s ease; /* Smoother transition */
}

[data-theme="dark"] body {
  /* Layered gradient + subtle grid for depth */
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(77, 163, 255, 0.12), transparent 60%),
    radial-gradient(900px 600px at 90% 30%, rgba(108, 211, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #0a0e13 60%, #0b0f14 100%);
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.container.narrow { max-width: 820px; }

.section { padding: 120px 0; } /* More generous spacing */
.section + .section { border-top: 1px solid var(--border); }

.section-title {
  margin: 0 0 20px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.02em;
  font-weight: 600; /* Add weight */
}

.lead { font-size: clamp(19px, 2.3vw, 22px); color: var(--muted); margin: 0; font-weight: 500; }
.subtext { color: var(--muted); margin: 12px 0 28px; }
.micro { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.kicker { color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; margin: 0 0 8px; }

/* Header */
.site-header {
  position: sticky;
  top: 0; z-index: 10;
  backdrop-filter: saturate(180%) blur(10px);
  background: rgba(255,255,255,.75);
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: background 0.3s ease;
}

[data-theme="dark"] .site-header {
  background: rgba(11,15,20,.7);
  border-bottom: 1px solid rgba(108,122,137,.35);
  backdrop-filter: saturate(140%) blur(10px);
}

.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { font-weight: 700; letter-spacing: 0.08em; text-decoration: none; color: var(--text); }
.site-nav { display: flex; align-items: center; gap: 16px; }
.lang-select {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px;
  color: var(--text); font-size: 14px; cursor: pointer; outline: none;
  transition: border-color 0.2s ease;
}
.lang-select:hover { border-color: var(--accent); }
.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 8px; border-radius: 50%;
  color: var(--text); transition: background 0.2s ease;
}
.theme-toggle:hover { background: var(--border); }
.theme-toggle i { font-size: 18px; }
.theme-toggle .fa-sun { display: none; }
[data-theme="dark"] .theme-toggle .fa-sun { display: block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.btn.ghost { padding: 10px 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  border-radius: 999px; border: 1px solid var(--border);
  padding: 12px 18px; font-weight: 600; text-decoration: none; color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--elev); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--muted); }

/* Hero */
.hero { padding-top: 72px; }
.hero-grid {
  display: grid; gap: 60px; align-items: center; /* More gap for breathing room */
  grid-template-columns: 1fr 1fr;
}
.hero-copy .headline {
  margin: 0 0 12px;
  font-size: clamp(34px, 6.5vw, 64px);
  line-height: 1.06; letter-spacing: -0.02em;
  white-space: nowrap; /* Ensure title stays on one line */
}
/* Typewriter caret */
.typewriter { position: relative; display: inline-block; }
.typewriter::after {
  content: '';
  position: relative; display: inline-block; width: 1px; height: 1em; margin-left: 3px;
  background: currentColor; vertical-align: -0.1em; opacity: 0.8;
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Avoid layout shift by reserving height on mobile */
@media (max-width: 980px) {
  #hero-title { min-height: 1.2em; display: inline-block; }
}
.hero-copy .subhead { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); margin: 0 0 26px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { display: grid; place-items: center; }
.band-wrap {
  width: min(92%, 460px);
  aspect-ratio: 1;
  border-radius: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #f6f9ff 0%, #fff 60%, #f8fbff 100%);
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border), 0 20px 60px rgba(0,0,0,.06);
  transition: box-shadow 0.3s ease;
}

[data-theme="dark"] .band-wrap {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(77,163,255,0.10) 0%, rgba(11,15,20,0.9) 60%, rgba(11,15,20,1) 100%);
  box-shadow: inset 0 0 0 1px var(--border), 0 24px 80px rgba(0,0,0,.55);
}

.band { width: 100%; height: 100%; animation: slow-rotate 16s linear infinite; }
@keyframes slow-rotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.02); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Lists */
.bullet-list { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.bullet-list li { margin-bottom: 10px; }

/* Cards */
.cards .card-grid {
  display: grid; gap: 24px; /* More gap */
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
  transition: transform .3s ease, box-shadow .3s ease, border-color .2s ease, background .3s ease;
  will-change: transform, box-shadow;
  transform-style: preserve-3d;
  animation: floaty 10s ease-in-out infinite;
  animation-play-state: paused; /* run on mobile by default below */
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(80% 60% at 50% 0%, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 60%);
  opacity: .15;
  transition: opacity .3s ease;
}
.card:hover::before { opacity: .22; }
.card:hover {
  transform: translateY(-8px) scale(1.01) var(--tilt, none);
  box-shadow: 0 24px 70px rgba(0,0,0,.14), 0 8px 24px rgba(0,0,0,.08);
  border-color: var(--accent);
}
.card:active {
  transform: translateY(-3px) scale(0.995);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

[data-theme="dark"] .card {
  /* Completely new dark card look: glass + glow */
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)) , rgba(16,22,30,0.75);
  border-color: rgba(90, 200, 250, 0.18);
  box-shadow:
    0 10px 40px rgba(0, 34, 68, 0.55),
    0 2px 0 rgba(255,255,255,0.03) inset,
    0 0 0 1px rgba(255,255,255,0.02) inset;
  backdrop-filter: saturate(120%) blur(10px);
}
[data-theme="dark"] .card:hover {
  box-shadow:
    0 28px 90px rgba(32, 128, 255, 0.35),
    0 10px 30px rgba(0,0,0,.45),
    0 0 0 1px rgba(108,211,255,0.25) inset;
  border-color: rgba(108,211,255,0.45);
}
.icon { font-size: 28px; }
.card-title { margin: 10px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

/* Improve hoverless/mobile experience */
@media (hover: none) {
  .card { animation-play-state: running; }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; transition: none; }
}

/* Waitlist */
.waitlist-card {
  position: relative;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.45)), var(--bg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}
[data-theme="dark"] .waitlist-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)), rgba(16,22,30,0.6);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.waitlist-head { text-align: center; margin-bottom: 18px; }
.waitlist-badge {
  display: inline-block;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(77,163,255,0.12); color: var(--accent);
  padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(77,163,255,0.25);
}
.waitlist-form.enhanced { display: block; }
.waitlist-form .input-wrap {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  border: 1px solid var(--border); border-radius: 14px; padding: 10px 10px 10px 12px;
}
[data-theme="dark"] .waitlist-form .input-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}
.waitlist-form .input-wrap i { color: var(--muted); font-size: 18px; }
.waitlist-form .input-wrap input[type=email] {
  border: none; outline: none; background: transparent; color: var(--text);
  padding: 12px 10px; font-size: 16px; width: 100%;
}
.waitlist-form .input-wrap input[type=email]::placeholder { color: #9aa4b2; opacity: .9; }
[data-theme="dark"] .waitlist-form .input-wrap input[type=email]::placeholder { color: #91a3b6; }
.waitlist-form .input-wrap:focus-within { box-shadow: 0 0 0 4px rgba(77,163,255,.18); border-color: var(--accent); }
.waitlist-form.enhanced .btn.primary { border-radius: 10px; padding: 12px 18px; white-space: nowrap; }
.waitlist-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.form-message { min-height: 20px; font-size: 14px; }
.form-message.success { color: var(--success); }
.form-message.error { color: var(--error); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 20px;
  background: var(--bg);
}
.footer .container {
  max-width: none;
  padding-inline: 40px;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-column h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}
.footer-column a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}
.footer-column a:hover { color: var(--accent); }
.footer-brand .footer-logo {
  margin-bottom: 12px;
}
.footer-brand-name {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}
.footer-social-icons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer-social-icons a {
  color: var(--muted);
  font-size: 18px;
  transition: color 0.2s ease;
}
.footer-social-icons a:hover { color: var(--accent); }
.footer-newsletter .footer-form-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.footer-newsletter input[type=email] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
  color: var(--text);
}
[data-theme="dark"] .footer-newsletter input[type=email] {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}
.footer-newsletter input[type=email]::placeholder { color: #8a96a8; }
[data-theme="dark"] .footer-newsletter input[type=email]::placeholder { color: #8ea0b3; }
.footer-newsletter input[type=email]:focus { box-shadow: 0 0 0 4px rgba(77,163,255,.18); border-color: var(--accent); }
.btn-submit-footer {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-submit-footer:hover { background: var(--accent-2); }
.footer-gdpr-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.footer-gdpr-group input[type=checkbox] {
  margin-top: 2px;
}
.gdpr-label a { color: var(--accent); }
.copyright {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Utilities */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Back to top */
.back-to-top {
  position: fixed; right: 16px; bottom: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease, color .2s ease;
  z-index: 20;
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { box-shadow: var(--elev); }
[data-theme="dark"] .back-to-top { background: rgba(16,22,30,0.85); backdrop-filter: blur(8px); }

/* Responsive */
@media (min-width: 768px) {
  .footer-content { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .hero-copy .headline { white-space: normal; } /* Allow wrap on mobile */
}

@media (max-width: 780px) {
  .cards .card-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; } /* Adjusted for mobile */
  .site-header .container { height: 56px; }
  .footer-content { grid-template-columns: 1fr; }
  .waitlist-form .input-wrap { grid-template-columns: 24px 1fr; }
  .waitlist-form.enhanced .btn.primary { margin-top: 10px; grid-column: 1 / -1; }
}

/* Popup styles */
.newsletter-popup[hidden] { display: none; }
.newsletter-popup__overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
}
.newsletter-popup__content {
  position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: min(92vw, 540px);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.2);
}
[data-theme="dark"] .newsletter-popup__content {
  background: var(--card-bg);
}
.newsletter-popup__close {
  position: absolute; top: 8px; right: 10px;
  border: 0; background: transparent; color: var(--text);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.newsletter__subtitle { color: var(--muted); margin-top: 0; }
.mc-field-group { display: grid; gap: 6px; margin-bottom: 12px; }
.mc-field-group input { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--bg); color: var(--text); }
.mc-gdpr-group { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); }

</media>