@import url('./tokens.css');

/* ══════════════════════════════════════════════════════════
 *  Tunegether — main stylesheet
 *  Bright-theme marketing site with neon-gradient accents.
 *  Companion: styles/maker.css (dark performance surface).
 * ══════════════════════════════════════════════════════════ */

/* ── reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--tg-bg);
  color: var(--tg-ink-soft);
  font-family: var(--tg-font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tg-purple); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--tg-purple); color: #fff; }

/* ── layout ────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--tg-maxw); margin: 0 auto; padding: 0 24px; }
.stack > * + * { margin-top: 16px; }

/* ── skip link ────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--tg-ink); color: #fff;
  padding: 12px 20px; border-radius: 8px;
  font-weight: 600; z-index: 200;
  transition: top var(--tg-dur) var(--tg-ease-out);
}
.skip-link:focus { top: 16px; }

/* ── typography ────────────────────────────────────────────── */
.display, h1, h2, h3 {
  font-family: var(--tg-font-display);
  color: var(--tg-ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-weight: 700;
}
h1 { font-size: clamp(40px, 6.4vw, 72px); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
h4 { font-family: var(--tg-font-display); font-weight: 600; font-size: 19px; color: var(--tg-ink); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--tg-font-body);
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--tg-purple);
  margin-bottom: 20px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tg-grad);
}
p { color: var(--tg-ink-soft); }
p + p { margin-top: 14px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--tg-ink-soft); max-width: 62ch; }

.gradient-text {
  background: var(--tg-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── nav ────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--tg-dur) var(--tg-ease-out),
              background var(--tg-dur) var(--tg-ease-out);
}
.nav.scrolled {
  border-bottom-color: var(--tg-rule);
  background: rgba(255, 255, 255, 0.96);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--tg-nav-h);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--tg-font-display);
  font-weight: 700; font-size: 20px; color: var(--tg-ink);
  letter-spacing: -0.02em;
}
.nav-brand img { height: 28px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 6px;
  list-style: none;
}
.nav-links a {
  display: inline-flex; align-items: center;
  padding: 10px 14px;
  font-size: 15px; font-weight: 500;
  color: var(--tg-ink-soft);
  border-radius: 8px;
  transition: color var(--tg-dur) var(--tg-ease-out),
              background var(--tg-dur) var(--tg-ease-out);
  min-height: 44px;
}
.nav-links a:hover { color: var(--tg-ink); background: var(--tg-surface-2); }
.nav-toggle {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--tg-ink);
  border-radius: 2px;
  transition: transform var(--tg-dur) var(--tg-ease-out),
              opacity var(--tg-dur) var(--tg-ease-out);
}
.nav-toggle span + span { margin-top: 5px; }

@media (max-width: 840px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* mobile drawer */
.mobile-menu {
  position: fixed; inset: var(--tg-nav-h) 0 0 0;
  background: var(--tg-bg);
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 55;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center;
  padding: 16px 20px;
  font-size: 18px; font-weight: 500;
  color: var(--tg-ink);
  border-radius: 12px;
  min-height: 56px;
}
.mobile-menu a:hover { background: var(--tg-surface-2); }

/* ── buttons ────────────────────────────────────────────── */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--tg-font-display);
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: 999px;
  cursor: pointer;
  min-height: 48px;
  transition: transform var(--tg-dur) var(--tg-ease-out),
              box-shadow var(--tg-dur) var(--tg-ease-out),
              background var(--tg-dur) var(--tg-ease-out),
              color var(--tg-dur) var(--tg-ease-out);
  will-change: transform;
}
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta-primary {
  color: #fff; background: var(--tg-ink);
  box-shadow: var(--tg-shadow-1);
}
.cta-primary:hover { background: #171724; box-shadow: var(--tg-shadow-2); }
.cta-grad {
  color: #fff;
  background: var(--tg-grad);
  background-size: 200% 100%;
  box-shadow: 0 4px 16px rgba(122, 60, 255, 0.28);
}
.cta-grad:hover {
  background-position: 100% 0;
  box-shadow: 0 8px 24px rgba(122, 60, 255, 0.36);
}
.cta-outline {
  color: var(--tg-ink);
  background: transparent;
  border: 1.5px solid var(--tg-rule-strong);
}
.cta-outline:hover { background: var(--tg-surface-2); border-color: var(--tg-purple); }
.cta-lg { padding: 16px 28px; font-size: 16px; min-height: 54px; }

/* ── hero ────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 128px);
  background:
    var(--tg-grad-radial, radial-gradient(circle at 30% 20%, rgba(255, 45, 209, 0.10) 0%, transparent 55%),
                          radial-gradient(circle at 70% 60%, rgba(0, 245, 255, 0.10) 0%, transparent 55%)),
    linear-gradient(180deg, var(--tg-surface) 0%, var(--tg-bg) 100%);
}
.hero-video-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.14;
  filter: saturate(1.2);
}
.hero-video-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.85) 60%, rgba(255,255,255,1) 100%);
}
.hero-wave-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 30% 30%, rgba(255, 45, 209, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 80% 55% at 75% 65%, rgba(0, 245, 255, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 50% 90%, rgba(122, 60, 255, 0.16) 0%, transparent 55%);
  animation: heroWave 24s ease-in-out infinite;
}
@keyframes heroWave {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(0, -2%, 0) scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-wave-fallback { animation: none; }
  .hero-video { display: none; }
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-wordmark {
  display: block; margin: 0 auto 28px;
  max-width: min(720px, 82vw);
  width: 100%; height: auto;
}
.hero-tagline {
  font-family: var(--tg-font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.005em;
  color: var(--tg-ink);
  margin: 0 auto 12px;
  max-width: 20ch;
  line-height: 1.2;
}
.hero-tagline .dot { color: var(--tg-purple); font-weight: 400; padding: 0 8px; }
.hero-sub {
  font-family: var(--tg-font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.5vw, 18px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-ink-mute);
  margin-bottom: 36px;
}
.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-bottom: 44px;
}
.hero-meta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--tg-rule);
  border-radius: 999px;
  font-size: 13px; color: var(--tg-ink-mute);
  font-weight: 500;
}
.hero-meta .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--tg-magenta);
  box-shadow: 0 0 0 0 rgba(255, 45, 209, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 45, 209, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 45, 209, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 209, 0); }
}
@media (prefers-reduced-motion: reduce) { .hero-meta .pulse { animation: none; } }

/* ── grad rule ────────────────────────────────────────────── */
.grad-rule {
  height: 2px; width: 100%;
  background: var(--tg-grad);
  border: 0;
  opacity: 0.9;
}
.grad-rule-thin {
  height: 1px; width: 100%;
  background: var(--tg-grad);
  border: 0;
  opacity: 0.6;
}

/* ── app-store strip ────────────────────────────────────────────── */
.store-strip {
  padding: 56px 0;
  background: var(--tg-surface);
  border-top: 1px solid var(--tg-rule);
  border-bottom: 1px solid var(--tg-rule);
}
.store-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.store-copy .eyebrow { color: var(--tg-magenta); }
.store-copy h2 { font-size: clamp(24px, 2.6vw, 32px); }
.store-copy p { margin-top: 8px; color: var(--tg-ink-mute); }
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  min-width: 180px;
  border-radius: 12px;
  background: var(--tg-ink);
  color: #fff;
  font-family: var(--tg-font-body);
  transition: transform var(--tg-dur) var(--tg-ease-out), box-shadow var(--tg-dur) var(--tg-ease-out);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--tg-shadow-2); }
.store-badge .badge-lead { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.75; line-height: 1; }
.store-badge .badge-name { font-family: var(--tg-font-display); font-weight: 600; font-size: 18px; line-height: 1.15; margin-top: 2px; }
.store-badge .badge-icon { width: 26px; height: 26px; flex-shrink: 0; }
.store-notify {
  display: flex; gap: 8px; margin-top: 16px;
  max-width: 460px;
}
.store-notify input {
  flex: 1; min-width: 0;
  padding: 12px 16px;
  font: inherit; color: var(--tg-ink);
  background: #fff;
  border: 1.5px solid var(--tg-rule-strong);
  border-radius: 999px;
  transition: border-color var(--tg-dur) var(--tg-ease-out);
  min-height: 48px;
}
.store-notify input:focus { outline: 0; border-color: var(--tg-purple); }
.store-notify .cta { flex-shrink: 0; }
.store-notify-msg {
  margin-top: 10px; font-size: 14px; min-height: 20px;
  color: var(--tg-purple); font-weight: 500;
}
@media (max-width: 840px) {
  .store-inner { grid-template-columns: 1fr; }
  .store-badges { justify-content: flex-start; }
}

/* ── section base ────────────────────────────────────────────── */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-inner { position: relative; z-index: 2; }
.section-header { max-width: 780px; margin-bottom: 48px; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-surface { background: var(--tg-surface); }
.section-wash    { background: linear-gradient(180deg, var(--tg-surface-2) 0%, var(--tg-bg) 100%); }

/* ── maker section (dark performance surface) ─────────────── */
.maker-section {
  padding: clamp(80px, 10vw, 128px) 0;
  background: var(--tg-dark-bg);
  color: var(--tg-dark-ink);
  position: relative;
  overflow: hidden;
}
.maker-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(255, 45, 209, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 245, 255, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.maker-section .section-inner { position: relative; z-index: 2; }
.maker-section .eyebrow { color: var(--tg-cyan); }
.maker-section h2 { color: var(--tg-dark-ink); }
.maker-section p { color: var(--tg-dark-ink-soft); }
.maker-frame {
  margin-top: 32px;
  background: var(--tg-dark-surface);
  border: 1px solid var(--tg-dark-rule);
  border-radius: var(--tg-r-lg);
  overflow: hidden;
  box-shadow: var(--tg-shadow-3);
}
.maker-frame-bar {
  display: flex; align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--tg-dark-rule);
  background: var(--tg-dark-surface-2);
  font-family: var(--tg-font-display);
  font-size: 14px;
  color: var(--tg-dark-ink-soft);
}
.maker-frame-bar .lights { display: inline-flex; gap: 8px; }
.maker-frame-bar .lights span { width: 10px; height: 10px; border-radius: 50%; background: var(--tg-dark-rule); }
.maker-frame-bar .lights .live { background: var(--tg-magenta); box-shadow: 0 0 12px var(--tg-magenta); }
.maker-frame-body {
  min-height: 640px;
  padding: 20px;
  background: var(--tg-dark-bg);
  position: relative;
}
.maker-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--tg-dark-ink-soft);
  font-family: var(--tg-font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.maker-loading::before {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--tg-grad);
  margin-right: 12px;
  animation: pulse 2s infinite;
}
.maker-footnote {
  margin-top: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--tg-dark-rule);
  border-radius: var(--tg-r);
  font-size: 14px;
  color: var(--tg-dark-ink-soft);
  text-align: center;
}
.maker-footnote strong { color: var(--tg-dark-ink); font-weight: 600; }

/* ── modes bento ────────────────────────────────────────────── */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.mode-card {
  position: relative; overflow: hidden;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--tg-rule);
  border-radius: var(--tg-r-lg);
  box-shadow: var(--tg-shadow-1);
  transition: transform var(--tg-dur) var(--tg-ease-out), box-shadow var(--tg-dur) var(--tg-ease-out);
  display: flex; flex-direction: column;
  min-height: 320px;
}
.mode-card:hover { transform: translateY(-2px); box-shadow: var(--tg-shadow-2); }
.mode-card.wide { grid-column: span 8; }
.mode-card.half { grid-column: span 6; }
.mode-card.third { grid-column: span 4; }
.mode-card.full { grid-column: span 12; }
.mode-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tg-surface-2);
  color: var(--tg-purple);
  margin-bottom: 20px;
}
.mode-icon svg { width: 24px; height: 24px; }
.mode-card h3 { margin-bottom: 10px; }
.mode-card p { color: var(--tg-ink-soft); }
.mode-visual {
  margin: 20px -32px -32px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-top: 1px solid var(--tg-rule);
  background: var(--tg-surface-2);
}
.mode-visual picture, .mode-visual img { width: 100%; height: 100%; object-fit: cover; }
.mode-card.dark {
  background: var(--tg-dark-bg);
  color: var(--tg-dark-ink);
  border-color: var(--tg-dark-rule);
}
.mode-card.dark h3 { color: var(--tg-dark-ink); }
.mode-card.dark p { color: var(--tg-dark-ink-soft); }
.mode-card.dark .mode-icon { background: rgba(0, 245, 255, 0.14); color: var(--tg-cyan); }

@media (max-width: 900px) {
  .mode-card.wide, .mode-card.half, .mode-card.third { grid-column: span 12; }
}

/* ── feature strip ────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.feature {
  padding: 24px 0;
  border-top: 2px solid var(--tg-ink);
}
.feature-num {
  font-family: var(--tg-font-display);
  font-size: 32px; font-weight: 600;
  color: var(--tg-purple);
  margin-bottom: 12px;
  line-height: 1;
}
.feature h4 { margin-bottom: 6px; }
.feature p { font-size: 15px; color: var(--tg-ink-soft); }

/* ── footer ────────────────────────────────────────────── */
.footer {
  padding: 64px 0 32px;
  background: var(--tg-ink);
  color: rgba(255,255,255,0.72);
}
.footer .grad-rule { margin-bottom: 40px; opacity: 0.7; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { max-width: 320px; }
.footer-brand img { height: 32px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.6; }
.footer h5, .footer h3.footer-h, .footer .footer-h {
  font-family: var(--tg-font-display); font-weight: 600;
  color: #fff; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 16px;
  line-height: 1.1;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: rgba(255,255,255,0.68);
  font-size: 14px;
  transition: color var(--tg-dur) var(--tg-ease-out);
}
.footer ul a:hover { color: #fff; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: #fff; }
.powered-by {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.powered-by .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tg-grad); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}

/* ── reveal-on-scroll ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--tg-ease-out), transform 700ms var(--tg-ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
