/* ============================================================
   Meow Bot - styles.css
   Mobile-first, no framework, no imports, CSS custom props
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors - white bg, Hyperliquid arc background */
  --bg-base:   #ffffff;
  --bg-dark-1: #f5f8f5;
  --bg-dark-2: #eef4ee;
  --bg-dark-3: #e6f0e6;
  --bg-dark-4: #d8e8d8;
  --bg-dark-5: #c4d8c4;

  --accent:       #04251F;
  --accent-light: #0a5a3c;
  --accent-dark:  #021a14;

  --text-primary:   #04251F;
  --text-secondary: #3a5c40;
  --text-muted:     #54775c;

  --border: #ccd8cc;

  --success: #0a7a50;
  --error:   #b52020;
  --warning: #a85200;
  --pending: #527854;

  /* Typography */
  --font-sans:        system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  --font-mono:        "SF Mono", "Cascadia Code", "Fira Code", ui-monospace, monospace;

  --text-base:        1rem;
  --lh-base:          1.6;
  --lh-heading:       1.15;

  /* Spacing */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   24px;
  --space-6:   32px;
  --space-7:   48px;
  --space-8:   64px;
  --space-9:   80px;

  --section-py:       48px;
  --max-width:        1200px;
  --container-max:    342px;
  --radius-sm:        4px;
  --radius-md:        8px;
}

html {
  font-size: var(--text-base);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: #ffffff;
  color: var(--text-primary);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Typography helpers ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.75rem, 7vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); }

p { margin-bottom: 0; }

.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--accent); }
.text-mono      { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

/* ── Arc background (contour lines of the HL mark) ──────────── */
.arc-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  /* Very subtle liquid sway: a slow drift + faint breathing, anchored
     where the contour curves are densest (lower right). */
  transform-origin: 80% 88%;
  will-change: transform;
  animation: arc-wave 17s ease-in-out infinite;
}

.arc-bg svg {
  width: 100%;
  height: 100%;
}

@keyframes arc-wave {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(-11px, 13px, 0) scale(1.02);
  }
  66% {
    transform: translate3d(9px, 19px, 0) scale(1.03);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Sections above arc layer; transparent backgrounds let arcs show through */
section, footer {
  position: relative;
  z-index: 1;
}

section {
  padding-block: var(--section-py);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-5);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-dark-1);
}

.btn-primary:hover {
  background-color: var(--accent-light);
  color: var(--bg-dark-1);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
  background-color: rgba(151, 252, 228, 0.08);
  color: var(--accent-light);
  border-color: var(--accent-light);
  text-decoration: none;
}

.btn-lg {
  padding: 13px var(--space-7);
  font-size: 1rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(4, 25, 20, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding-left: 20px;
  padding-right: 20px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo-mark {
  width: 34px;
  height: 38px;
  flex-shrink: 0;
}

.nav-wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Hyperliquid-style mixed wordmark */
.wm-sans {
  font-weight: 300;
  letter-spacing: -0.03em;
  font-style: normal;
  font-family: system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
}

.wm-serif {
  font-family: Georgia, "Times New Roman", "Book Antiqua", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Nav overrides: light text on dark nav background */
.site-nav .nav-wordmark,
.site-nav .wm-sans,
.site-nav .wm-serif {
  color: #f0f8f2;
}

.site-nav .nav-cta {
  background-color: #97FCE4;
  color: #04251F;
}

.site-nav .nav-cta:hover {
  background-color: #B8FFF0;
  color: #04251F;
  text-decoration: none;
}

.site-nav .nav-toggle {
  color: rgba(240, 248, 242, 0.85);
}

.site-nav .nav-toggle:hover {
  color: #f0f8f2;
  background-color: rgba(240, 248, 242, 0.07);
}

.site-nav .nav-mobile-links {
  background-color: rgba(4, 25, 20, 0.98);
  border: 1px solid rgba(240, 248, 242, 0.12);
}

.site-nav .nav-mobile-links li a {
  color: rgba(240, 248, 242, 0.75);
}

.site-nav .nav-mobile-links li a:hover {
  color: #f0f8f2;
  background-color: rgba(240, 248, 242, 0.06);
}

/* Desktop nav links - hidden on mobile, shown on tablet+ */
.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-5);
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  color: rgba(240, 248, 242, 0.65);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: #f0f8f2;
  text-decoration: none;
}

/* Right-side actions group: CTA + hamburger */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.nav-cta { flex-shrink: 0; }

/* Mobile hamburger via <details> - hidden on desktop */
.nav-mobile {
  position: relative;
  display: block;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-sm);
  user-select: none;
  transition: background-color 0.15s, color 0.15s;
}

.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::marker { display: none; }

/* Icon swap: hamburger when closed, X when open */
.nav-icon-close { display: none; }
.nav-mobile[open] .nav-icon-menu  { display: none; }
.nav-mobile[open] .nav-icon-close { display: block; }

/* Dropdown card - absolutely positioned so it never affects the flex row */
.nav-mobile-links {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 200;
  min-width: 190px;
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.nav-mobile-links li a {
  display: block;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

/* ── Hero (experimental: left-aligned, two-column with terminal) ──── */
#hero {
  background-color: transparent;
  padding-block: var(--space-8) var(--space-9);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

.hero-copy { text-align: left; }

#hero h1 {
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-tagline {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-light);
  margin-bottom: var(--space-5);
}

.hero-tagline span + span::before {
  content: "·";
  margin-right: var(--space-3);
  color: var(--text-muted);
  font-weight: 400;
}

.hero-sub {
  max-width: 540px;
  margin-bottom: var(--space-7);
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* CTA pair - solid + ghost, left-aligned */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: flex-start;
  align-items: center;
  margin-bottom: var(--space-7);
}

.hero-secondary-link .arrow { transition: transform 0.15s; }
.hero-secondary-link:hover .arrow { transform: translateX(3px); }

/* ── Hero product screenshot (MeowBot in Telegram, iPhone) ── */
.hero-visual { width: 100%; }

.hero-phone {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-inline: auto;
}

/* ── Section shared ───────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-header h2 {
  margin-bottom: var(--space-3);
  text-wrap: balance;
}

.section-sub {
  max-width: 560px;
  margin-inline: auto;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}


/* Sections are mostly transparent - the contour canvas flows continuously
   over white. Two band exceptions break the monotony: a soft tint behind
   Rewards and a dark closing band for the final CTA. */
section { background-color: transparent; }

#rewards {
  background-color: rgba(245, 248, 245, 0.88);
  border-top: 1px solid var(--bg-dark-3);
  border-bottom: 1px solid var(--bg-dark-3);
}

/* ── Token-discovery flow (horizontal, borderless - contrasts the card grid) ── */
.flow {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4);
  max-width: 880px;
  margin-inline: auto;
}

.flow-step {
  flex: 1 1 0;
  max-width: 240px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--bg-dark-2);
  color: var(--accent);
}

.flow-icon svg { width: 26px; height: 26px; }

.flow-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.flow-step p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.flow-arrow {
  flex: 0 0 auto;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-top: 16px; /* align with the icon circles */
}

.flow-arrow svg { width: 24px; height: 24px; }

/* ── Feature grid (2×2) ───────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.feature-card {
  background-color: var(--bg-dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  flex-shrink: 0;
}

.feature-card h3 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Forward-looking roadmap callout - same card language as the grid */
.roadmap-note {
  max-width: 720px;
  margin: var(--space-7) auto 0;
  padding: var(--space-5) var(--space-6);
  background-color: var(--bg-dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.roadmap-label {
  display: block;
  width: fit-content;
  margin-bottom: var(--space-2);
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
  background-color: var(--bg-dark-4);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── Security trust strip (reuses feature-card language) ──── */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

/* ── Rewards (cashback tiers + referral) ──────────────────── */
.reward-block {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}

.reward-block + .reward-block {
  margin-top: var(--space-8);
}

.reward-block h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.reward-lead {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-inline: auto;
}

/* Referral stat card - matches the tier-table card language */
.referral-card {
  margin-top: var(--space-5);
  padding: var(--space-6) var(--space-6);
  background-color: var(--bg-dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.referral-stat {
  font-size: clamp(2.75rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.referral-stat-label {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Cashback tier table */
.tier-table-wrap {
  margin-top: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.tier-table th,
.tier-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.tier-table th {
  background-color: var(--bg-dark-4);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.tier-table th:last-child,
.tier-table td:last-child {
  text-align: right;
}

.tier-table tbody tr {
  background-color: var(--bg-dark-3);
}

.tier-table tbody tr.tier-top {
  background-color: var(--bg-dark-4);
}

.tier-table tbody tr:last-child td {
  border-bottom: none;
}

.tier-table td {
  color: var(--text-primary);
  font-weight: 500;
}

.tier-table td:nth-child(2) {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.tier-code {
  display: inline-block;
  min-width: 1.9em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
}

.tier-pct {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tier-table caption {
  caption-side: bottom;
  padding: var(--space-3) var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: left;
  background-color: var(--bg-dark-2);
  border-top: 1px solid var(--border);
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Cards match our feature-card language: light-green tint, solid subtle
   border, low radius - cohesive with the rest of the page. */
.faq-item {
  background-color: var(--bg-dark-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item[open] {
  border-color: var(--bg-dark-5);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  list-style: none;
  gap: var(--space-4);
  user-select: none;
  transition: color 0.15s;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }

.faq-item summary:hover { color: var(--accent); }

.faq-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 var(--space-5) var(--space-4);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Final CTA - dark band bookending the nav and footer ──── */
#cta-final {
  text-align: center;
  background-color: var(--accent);
  padding-block: var(--space-9);
}

#cta-final h2 {
  margin-bottom: var(--space-4);
  max-width: 600px;
  margin-inline: auto;
  color: #f0f8f2;
}

#cta-final .cta-sub {
  margin-inline: auto;
  margin-bottom: var(--space-6);
  color: rgba(240, 248, 242, 0.7);
}

#cta-final .btn-primary {
  background-color: #97FCE4;
  color: #04251F;
}

#cta-final .btn-primary:hover {
  background-color: #B8FFF0;
  color: #04251F;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background-color: rgba(4, 25, 20, 0.97);
  border-top: 1px solid rgba(240, 248, 242, 0.12);
  padding-block: var(--space-7);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: flex-start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.footer-logo-mark { height: 24px; width: auto; }

.footer-logo .wm-sans,
.footer-logo .wm-serif { color: #f0f8f2; }

.footer-wordmark {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #f0f8f2;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  list-style: none;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(240, 248, 242, 0.62);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: rgba(240, 248, 242, 0.95);
  text-decoration: none;
}

.footer-fine {
  font-size: 0.8125rem;
  color: rgba(240, 248, 242, 0.55);
  line-height: 1.6;
  max-width: 560px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(240, 248, 242, 0.55);
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .arc-bg { animation: none; transform: none; }
}

/* ── Responsive container max-width ──────────────────────── */
@media (min-width: 480px) {
  :root { --container-max: 432px; }
}
@media (min-width: 640px) {
  :root { --container-max: 576px; }
}

/* ── Tablet (768px+) ──────────────────────────────────────── */
@media (min-width: 768px) {
  :root {
    --section-py: 64px;
    --container-max: 704px;
  }

  .nav-mobile  { display: none; }
  .nav-inner   { flex-wrap: nowrap; }

  .nav-links {
    display: flex;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-bottom-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
  }
}

/* ── Laptop (1024px+) ─────────────────────────────────────── */
@media (min-width: 1024px) {
  :root {
    --section-py: 80px;
    --container-max: 960px;
  }

  /* Hero becomes a two-column split: copy left, chat mockup right */
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-9);
    align-items: center;
  }

  #hero { padding-block: var(--space-9) calc(var(--space-9) * 1.1); }

  .nav-inner {
    padding-block: var(--space-4);
  }
}

/* ── Desktop (1280px+) ────────────────────────────────────── */
@media (min-width: 1280px) {
  .container {
    --container-max: 1200px;
  }

  #hero { padding-block: calc(var(--space-9) * 1.25) var(--space-9); }
}

/* ── Mobile-only overrides ────────────────────────────────── */
@media (max-width: 767px) {
  /* Token-discovery flow stacks vertically; arrows point down */
  .flow {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }

  .flow-step { max-width: 320px; }

  .flow-arrow {
    margin-top: 0;
    transform: rotate(90deg);
  }

  /* Keep CTAs left-aligned and stretched on mobile */
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn { justify-content: center; }

  #hero h1 {
    font-size: 2rem;
  }
}
