/* =========================================================
   Huely — shared stylesheet
   A new color challenge, every day.
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #0C0D10;
  --surface: #16181D;
  --surface-alt: #1F222A;
  --border: #272A33;

  /* Brand */
  --primary: #8B7CFF;
  --secondary: #36D1DC;

  /* Text */
  --text: #F5F6FA;
  --muted: #8A8F9C;

  /* Signature spectrum */
  --spectrum: linear-gradient(90deg, #FB7185, #FBBF24, #4ADE80, #36D1DC, #8B7CFF);
  --btn-gradient: linear-gradient(180deg, #9D8BFF, #8B7CFF);

  /* Geometry */
  --radius-card: 20px;
  --radius-md: 16px;
  --radius-btn: 14px;
  --radius-pill: 999px;

  /* Shadow & glow */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
  --glow-primary: 0 0 0 1px rgba(139, 124, 255, 0.25), 0 18px 50px rgba(139, 124, 255, 0.28);

  /* Layout */
  --maxw: 1120px;
  --gutter: 24px;
}

/* ----------------------------- Reset ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(620px 420px at 82% -8%, rgba(139, 124, 255, 0.16), transparent 70%),
    radial-gradient(560px 380px at 4% 8%, rgba(54, 209, 220, 0.12), transparent 70%);
}

h1, h2, h3, h4 {
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1em; }

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--primary); }

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

/* ----------------------------- Layout ----------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { position: relative; }

.section-pad {
  padding: 88px 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 14px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.section-head p {
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0;
}

/* Spectrum wordmark */
.wordmark {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.spectrum-text {
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 22px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--btn-gradient);
  color: #fff;
  box-shadow: var(--glow-primary);
}
.btn-primary:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(139, 124, 255, 0.4), 0 22px 60px rgba(139, 124, 255, 0.36);
}

.btn-ghost {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--text);
}

/* App store badges */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-radius: var(--radius-btn);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.store-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: var(--shadow-md);
}
.store-btn svg { flex-shrink: 0; }
.store-btn .store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.store-btn .store-label small {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.store-btn .store-label strong {
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
}

/* ----------------------------- Nav ----------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 16, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.nav-logo:hover { color: inherit; }
.nav-logo .logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: var(--spectrum);
  box-shadow: 0 0 14px rgba(139, 124, 255, 0.55);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.96rem;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ----------------------------- Hero ----------------------------- */
.hero {
  padding: 76px 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  margin-bottom: 22px;
}
.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 30ch;
  margin-bottom: 30px;
}
.hero-cta { margin-bottom: 22px; }
.hero-note {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note .check { color: var(--secondary); }

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

/* ----------------------------- Phone mockup ----------------------------- */
.phone {
  position: relative;
  width: 290px;
  background: #050608;
  border-radius: 44px;
  padding: 13px;
  border: 1px solid #2c2f38;
  box-shadow: var(--shadow-lg), var(--glow-primary);
}
.phone::after { /* side glow */
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(139, 124, 255, 0.28), transparent 75%);
  filter: blur(8px);
}
.phone-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 26px;
  background: #050608;
  border-radius: 14px;
  z-index: 3;
}
.phone-screen {
  position: relative;
  border-radius: 33px;
  background: linear-gradient(180deg, #101218, #0C0D10);
  padding: 22px 18px 20px;
  overflow: hidden;
  min-height: 540px;
  display: flex;
  flex-direction: column;
}

.screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  margin-top: 14px;
}
.screen-brand {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
}
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 11px;
}

.screen-day {
  text-align: center;
  margin-bottom: 4px;
}
.screen-day .day-label {
  font-family: "Sora", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
}
.screen-day .day-sub {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.screen-meta {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 14px 0 18px;
}
.screen-meta .meta-item { text-align: center; }
.screen-meta .meta-val {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}
.screen-meta .meta-lbl {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.screen-meta .meta-val.cyan { color: var(--secondary); }
.screen-meta .meta-val.violet { color: var(--primary); }

/* Tile grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 18px;
}
.tile {
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.tile.odd {
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.play-btn {
  margin-top: auto;
  display: block;
  width: 100%;
  text-align: center;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--btn-gradient);
  border-radius: var(--radius-btn);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(139, 124, 255, 0.4);
}

/* ----------------------------- Positioning strip ----------------------------- */
.positioning {
  padding: 26px 0 4px;
}
.positioning-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(120deg, var(--surface), var(--surface-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 34px;
  box-shadow: var(--shadow-sm);
}
.positioning-swatches {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.positioning-swatches span {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.positioning-inner p {
  margin: 0;
  font-size: 1.12rem;
}
.positioning-inner strong { color: var(--text); }
.positioning-inner .muted { color: var(--muted); }

/* ----------------------------- Features ----------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 124, 255, 0.5);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}
.feature-card .mini-swatches {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}
.feature-card .mini-swatches span {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

/* ----------------------------- How it works ----------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 26px;
  position: relative;
}
.step-num {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  background: var(--btn-gradient);
  box-shadow: 0 8px 22px rgba(139, 124, 255, 0.35);
  margin-bottom: 18px;
}
.step h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
  margin: 0;
  font-size: 0.98rem;
}

/* ----------------------------- Final CTA ----------------------------- */
.cta-final {
  text-align: center;
}
.cta-card {
  background:
    radial-gradient(700px 360px at 50% -30%, rgba(139, 124, 255, 0.22), transparent 70%),
    linear-gradient(160deg, var(--surface), var(--surface-alt));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 64px 32px;
  box-shadow: var(--shadow-lg);
}
.cta-card h2 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-bottom: 14px;
}
.cta-card p {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 44ch;
  margin: 0 auto 30px;
}
.cta-card .store-buttons {
  justify-content: center;
}

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 54px 0 38px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 38px;
}
.footer-brand .nav-logo { font-size: 1.4rem; margin-bottom: 12px; }
.footer-brand p {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 32ch;
  margin: 0;
}
.footer-col h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-col a {
  color: var(--text);
  font-size: 0.96rem;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

/* ----------------------------- Legal / doc pages ----------------------------- */
.doc {
  padding: 60px 0 30px;
}
.doc-inner {
  max-width: 780px;
  margin: 0 auto;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 26px;
}
.back-link:hover { color: var(--primary); }

.doc h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin-bottom: 8px;
}
.doc .updated {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 36px;
}
.doc h2 {
  font-size: 1.4rem;
  margin: 40px 0 12px;
  padding-top: 8px;
}
.doc h3 {
  font-size: 1.12rem;
  margin: 26px 0 8px;
}
.doc p,
.doc li {
  color: #d3d6df;
  font-size: 1.02rem;
}
.doc ul,
.doc ol {
  padding-left: 22px;
  margin: 0 0 1.1em;
}
.doc li { margin-bottom: 8px; }
.doc a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc a:hover { color: var(--primary); }
.doc strong { color: var(--text); }

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 22px 0;
}
.doc-card p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text);
}
.faq-item p { margin: 0; color: var(--muted); }
.faq-item p + p { margin-top: 8px; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }
  .hero-sub { max-width: none; margin-left: auto; margin-right: auto; }
  .hero-cta .store-buttons { justify-content: center; }
  .hero-note { justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .positioning-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(12, 13, 16, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a {
    border-bottom: none;
    margin-top: 8px;
  }
  .nav-links .btn { width: 100%; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section-pad { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .store-buttons { flex-direction: column; }
  .store-btn { width: 100%; }
  .cta-card { padding: 44px 22px; }
  .positioning-inner { padding: 24px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
