/* MetaGenius AI — style.css  v2 light theme */

/* ─── TOKENS ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:       #ffffff;
  --bg-alt:   #fafafa;
  --surface:  #f9fafb;
  --surface2: #f3f4f6;

  /* Text */
  --text:       #0a0a0a;
  --text-muted: #6b7280;
  --text-dim:   #9ca3af;

  /* Borders */
  --border:     #e5e7eb;
  --border-md:  #d1d5db;

  /* Cards */
  --card-bg:           #ffffff;
  --card-border:       #e5e7eb;
  --card-border-hover: #008060;

  /* Accent (Shopify green) */
  --accent:       #008060;
  --accent-hover: #006e52;
  --accent-light: #e6f4f0;   /* tint for backgrounds/tags */
  --accent-mid:   #00a376;   /* mid-point for subtle gradients */

  /* Monospace label color */
  --mono-label: #6b7280;

  /* Shared gradient (used sparingly — hero headline only) */
  --grad: linear-gradient(135deg, #008060, #00a376);

  /* Typography */
  --fh: 'Outfit', sans-serif;    /* headings */
  --fu: 'Inter', sans-serif;     /* body / UI */
  --fm: 'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace; /* labels */

  /* Layout */
  --wrap:          1200px;
  --container-px:  24px;
  --gap:           var(--container-px);
  --pill:          100px;

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

  /* Radii */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);

  /* Section vertical rhythm */
  --section-py:        96px;
  --section-py-tablet: 64px;
  --section-py-mobile: 48px;
}

/* ─── RESET ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-rendering: optimizeSpeed; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fu);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }

/* Anchor scroll offset for sticky nav */
section[id], [id] { scroll-margin-top: 80px; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--fh); line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(40px, 5.5vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.25; }
h4 { font-size: 18px; font-weight: 600; line-height: 1.3; }
p  { font-size: 16px; color: var(--text-muted); font-weight: 400; line-height: 1.75; }
small { font-size: 14px; }

/* ─── HELPERS ────────────────────────────────────────────────────────── */
/* Accent-coloured text (replaces dark-theme gradient text) */
.gradient-text {
  color: var(--accent);
}

/* Monospace label — used for eyebrow / section labels */
.mono-label {
  font-family: var(--fm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--mono-label);
}

/* WP screen reader utility */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px;
  word-wrap: normal !important;
}

/* ─── SKIP LINK (a11y) ───────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: -9999px;
  background: var(--accent); color: #ffffff;
  padding: 12px 20px; border-radius: 0 0 12px 0;
  font-weight: 700; font-size: 14px;
  z-index: 10000;
}
.skip-link:focus,
.skip-link:focus-visible { left: 0; top: 0; }

/* ─── FOCUS STATES ───────────────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--container-px); }
.section { padding: var(--section-py) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

/* Section header block: eyebrow → H2 → descriptor */
.sec-label {
  display: inline-block;
  font-family: var(--fm);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.sec-hd { margin-bottom: var(--space-9); }
.sec-hd--c { text-align: center; }
.sec-hd--c .sec-desc { margin: var(--space-4) auto 0; max-width: 640px; }
.sec-desc {
  font-size: 17px; line-height: 1.6;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: var(--space-4);
}

/* ─── BUTTONS ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--fu); font-size: 15px; font-weight: 600;
  border-radius: var(--radius-md); padding: 13px 28px;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease,
              border-color .2s ease, color .2s ease;
  white-space: nowrap; cursor: pointer;
  min-height: 44px;
  letter-spacing: -.005em;
}

/* Primary — solid green, white text */
.btn--primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Ghost — bordered, transparent */
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-md);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* ─── NAV ────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px; display: flex; align-items: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--wrap); width: 100%; margin: 0 auto; padding: 0 var(--gap);
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  transition: opacity .2s ease;
}
.nav__logo:hover { opacity: 0.8; }
.nav__logo img { width: 32px; height: 32px; }
.nav__logo span {
  font-family: var(--fu);
  font-size: 16px; font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

/* Nav links are inside a <ul>, so target li > a */
.nav__links {
  display: flex; align-items: center; gap: 4px;
}
.nav__links li { list-style: none; }
.nav__links a {
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: color .2s ease, background .2s ease;
}
.nav__links a:hover { color: var(--text); background: var(--surface2); }

/* CTA pill inside nav */
.nav__cta {
  background: var(--accent) !important;
  color: #ffffff !important;
  font-family: var(--fu); font-size: 13px; font-weight: 700;
  padding: 8px 18px !important; border-radius: var(--radius-pill);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-xs);
}
.nav__cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ─── HAMBURGER ──────────────────────────────────────────────────────── */
.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; padding: 4px;
  justify-content: center; align-items: center;
}
.nav__burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── MOBILE DRAWER ──────────────────────────────────────────────────── */
.nav__drawer {
  display: none; position: fixed;
  top: 64px; left: 0; right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 16px var(--gap) 24px;
  flex-direction: column; z-index: 99;
}
.nav__drawer.open { display: flex; }
.nav__drawer a {
  font-size: 16px; font-weight: 500;
  color: var(--text-muted);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s ease;
  min-height: 44px; display: flex; align-items: center;
}
.nav__drawer a:last-child { border-bottom: none; }
.nav__drawer a:hover { color: var(--text); }
.nav__drawer .d-cta {
  margin-top: 12px;
  background: var(--accent); color: #ffffff;
  font-weight: 700; font-size: 15px; padding: 13px;
  border-radius: var(--radius-md); text-align: center;
  display: flex; align-items: center; justify-content: center;
  border-bottom: none; min-height: 44px;
}
.nav__drawer .d-cta:hover { background: var(--accent-hover); color: #ffffff; }

/* ─── SCROLL TO TOP ──────────────────────────────────────────────────── */
.scroll-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card-bg); border: 1.5px solid var(--border-md);
  color: var(--text-muted); font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s,
              border-color .2s, background .2s, box-shadow .2s, color .2s;
  box-shadow: var(--shadow-sm);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer__brand { max-width: 360px; }
.footer__brand-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.footer__brand img { width: 32px; height: 32px; }
.footer__brand-name {
  font-family: var(--fu);
  font-size: 16px; font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}
.footer__brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 20px;
}

/* Social icons */
.footer__social { display: flex; align-items: center; gap: 10px; }
.footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.footer__social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}
.footer__social svg { width: 18px; height: 18px; fill: currentColor; }

/* Footer nav columns */
.footer__col h4 {
  font-family: var(--fu);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: var(--space-4);
}
.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 0;
  transition: color .2s ease;
  line-height: 1.6;
}
.footer__col a:hover { color: var(--accent); }

/* Footer bottom bar */
.footer__bottom {
  display: flex;
  justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.footer__copyright { }
.footer__made {
  display: inline-flex; align-items: center; gap: 6px;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─── SCROLL-TRIGGERED FADE-IN ───────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
  will-change: opacity, transform;
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .section { padding: var(--section-py-tablet) 0; }
  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
  }
  .footer__brand { grid-column: 1 / -1; max-width: 540px; }
  .footer__brand p { max-width: 540px; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .section { padding: var(--section-py-mobile) 0; }

  h1 { font-size: clamp(34px, 8vw, 44px); }
  h2 { font-size: clamp(26px, 6.4vw, 36px); }
  h3 { font-size: 19px; }
  h4 { font-size: 16px; }
  body { font-size: 15px; }
  .sec-desc { font-size: 15px; }

  .footer { padding: 64px 0 28px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-7); }
  .footer__brand { grid-column: 1 / -1; max-width: none; }
  .footer__brand p { max-width: none; }
  .footer__col h4 { margin-bottom: var(--space-3); }
  .footer__bottom {
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.55;
  }
  .scroll-top { right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}
