/* ==========================================================================
   Memrico marketing site — shared stylesheet
   Brand: orange #F46C1C · Inter · warm, candid, family-centered
   Background #faf8f5 matches the image-factory render canvas so app
   screenshots blend into the page with no visible frame.
   ========================================================================== */

/* Inter — SELF-HOSTED variable font (PageSpeed 2026-07-20: removes the
   render-blocking fonts.googleapis.com round-trips). One file covers weights
   400–800. Source: Google Fonts Inter v20, latin subset. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --orange: #F46C1C;
  --orange-deep: #d95a10;
  --orange-text: #A14008;   /* primary-700 — accessible orange for small text on light bg (6.1:1 on cream); see brand/color-palette-audit.md */
  --orange-soft: rgba(244, 108, 28, 0.08);
  --orange-glow: rgba(244, 108, 28, 0.16);
  --ink: #1c1c1e;
  --muted: #6b6b70;
  --cream: #faf8f5;
  --card: #ffffff;
  --line: #e5e5e7;
  --dark: #1a1a1a;
  --radius: 20px;
  --shadow-card: 0 2px 8px rgba(28, 28, 30, 0.05), 0 12px 32px rgba(28, 28, 30, 0.07);
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--orange-text); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Type scale (fluid) ---------- */

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }

h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 700; }

.lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 42em;
  margin: 0 auto 1.5em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  /* small orange text on cream: #F46C1C is only 2.83:1 — use the 700 step */
  color: var(--orange-text);
  margin-bottom: 14px;
}

.center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  /* ≥18.66px bold: white-on-orange passes WCAG large-text (3:1) */
  font-size: 1.17rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 6px 20px rgba(244, 108, 28, 0.35);
}
.btn-primary:hover {
  background: var(--orange-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(244, 108, 28, 0.4);
  text-decoration: none;
}

.btn-ghost {
  color: var(--ink);
  border: 1.5px solid var(--line);
  background: var(--card);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); text-decoration: none; }

.btn-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 229, 231, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo img { height: 30px; width: auto; }
/* anchor jumps (Features / Meetups) land below the 68px sticky header */
html { scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0 28px 0 auto;
  padding: 0;
}
.nav-links a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--orange); text-decoration: none; }

.nav-cta {
  background: var(--orange);
  /* ink-on-orange = 5.68:1 — passes AA at this small size (white here is only 3.0:1) */
  color: var(--ink) !important;
  padding: 10px 22px;
  border-radius: 999px;
  /* never let the label wrap — a two-line pill breaks out of the 68px header on
     narrow / large-text mobile viewports */
  white-space: nowrap;
  line-height: 1;
}
.nav-cta:hover { background: var(--orange-deep); color: #fff !important; }

/* Hamburger — hidden on desktop, shown at <=820px */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav { position: relative; }
  .nav-toggle { display: flex; }
  /* Logo + pill + hamburger stay in the bar; the four links live in the dropdown panel */
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  /* tighten the pill so it fits beside the logo even when the user's browser
     text size is larger than default */
  .nav-cta { padding: 8px 16px; font-size: 0.9rem; }

  /* Dropdown panel: the same <ul>, re-laid-out below the header when open */
  body.nav-open .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(229, 229, 231, 0.9);
    box-shadow: 0 12px 24px rgba(28, 28, 30, 0.08);
    padding: 8px 0 12px;
  }
  body.nav-open .nav-links a {
    display: block;
    padding: 14px 24px;   /* >=44px tap target */
    font-size: 1.05rem;
  }
  body.nav-open .nav-links a:hover,
  body.nav-open .nav-links a:focus-visible { background: rgba(244, 108, 28, 0.08); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar { transition: none; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(56px, 8vw, 96px) 0 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* continues the factory renders' orange radial glow */
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 90%;
  background: radial-gradient(ellipse 60% 50% at 50% 35%, var(--orange-glow), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; }

.hero h1 { max-width: 15em; margin-left: auto; margin-right: auto; }

.hero-media { margin-top: clamp(32px, 5vw, 56px); }
.hero-media img { margin: 0 auto; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Conversation, reimagined (framing strip) ---------- */
/* Slim glance-strip under the hero — deliberately lighter than .crisis-card
   boxes. The lead is an h2 styled as a lead line (heading order: h1 → h2 → h3s). */

.convo-lead {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--muted);
  max-width: none;
  margin: 0 0 28px;
}
.convo-lead strong { color: var(--ink); font-weight: 700; }

.convo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.convo-item { text-align: center; padding: 12px; }
.convo-item .convo-icon { display: block; font-size: 1.75rem; }
.convo-item h3 { margin: 8px 0 4px; font-size: 1rem; }
.convo-item p { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--muted); }

@media (max-width: 640px) {
  .convo-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Crisis grid ---------- */

.crisis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.crisis-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.crisis-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.crisis-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--orange-soft);
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.crisis-card h3 { margin-bottom: 6px; }
.crisis-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.crisis-closing {
  text-align: center;
  font-weight: 600;
  margin-top: 40px;
  font-size: 1.1rem;
}

/* ---------- Feature rows ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
}
.feature-row.flip .feature-media { order: 2; }

.feature-media img { margin: 0 auto; width: min(100%, 460px); }

.feature-badge {
  display: inline-block;
  background: var(--orange-soft);
  color: var(--orange-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.feature-copy h2 { max-width: 12em; }
.feature-copy > p { color: var(--muted); font-size: 1.08rem; }

.check-list { list-style: none; margin: 24px 0 0; padding: 0; }
.check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-weight: 500;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F46C1C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Contextual "learn more" links from a feature into an explainer blog post.
   Subtle inline text link — deliberately NOT a button, so it never competes with
   the primary CTA. Uses --orange-text (#A14008, 6.1:1 on cream) for AA at small size.
   The .learn-link class is a stable GTM click-trigger hook. */
.learn-link {
  color: var(--orange-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(161, 64, 8, 0.4);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.learn-link:hover { color: var(--orange-deep); text-decoration-color: currentColor; }

@media (max-width: 820px) {
  .feature-row, .feature-row.flip { grid-template-columns: 1fr; }
  .feature-row.flip .feature-media { order: 0; }
  .feature-media img { width: min(100%, 380px); }
}

/* ---------- Video showcase ---------- */

.video-section { text-align: center; }

.video-frame {
  width: min(100%, 380px);
  margin: 0 auto;
}
.video-frame video {
  width: 100%;
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(28, 28, 30, 0.18);
}

.video-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  text-align: left;
}
@media (max-width: 820px) {
  .video-split { grid-template-columns: 1fr; text-align: center; }
  .video-split .check-list { text-align: left; display: inline-block; }
}

/* ---------- Steps ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 48px;
  text-align: left;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.showcase-media { margin: 48px auto 0; }
.showcase-media img {
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(28, 28, 30, 0.16);
}

/* ---------- Stats + testimonials ---------- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.stat {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 20px;
}
.stat-value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--orange); line-height: 1; }
.stat-label { color: var(--muted); font-weight: 600; margin-top: 8px; font-size: 0.95rem; }

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.quote-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  font-size: 1.02rem;
}
.quote-card::before { content: '“'; font-size: 2.6rem; line-height: 0.5; display: block; color: var(--orange); margin-bottom: 14px; font-family: Georgia, serif; }
.quote-card p { margin: 0; }
.quote-attr { margin-top: 14px !important; color: var(--muted); font-size: 0.9rem; font-weight: 600; }

.pull-quote {
  max-width: 640px;
  margin: 56px auto 0;
  text-align: center;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.4;
}
.pull-quote .quote-attr { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin-top: 12px; }

/* ---------- Beta / CTA band ---------- */

.beta-band {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  box-shadow: var(--shadow-card);
}
@media (max-width: 820px) { .beta-band { grid-template-columns: 1fr; } }

.cta-final {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: '';
  position: absolute;
  inset: auto -10% -30%;
  height: 80%;
  background: radial-gradient(ellipse 55% 60% at 50% 100%, var(--orange-glow), transparent 70%);
  pointer-events: none;
}
.cta-final > .container { position: relative; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 32px;
  font-size: 0.95rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.75); }
.site-footer a:hover { color: #fff; text-decoration: none; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand img { height: 28px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-tagline { font-weight: 700; color: #fff; margin: 0 0 8px; }
.footer-brand p { max-width: 30em; }

/* h3.footer-heading (was h4 — Lighthouse: heading levels must not skip h2→h4) */
.footer-col h4,
.footer-col .footer-heading {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }

.social-row { display: flex; gap: 14px; margin-top: 8px; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease;
}
.social-row a:hover { background: var(--orange); }
.social-row svg { width: 18px; height: 18px; fill: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: 0.85rem;
}
.footer-legal { display: flex; gap: 24px; }

/* ---------- YouTube facade (click-to-load — no YouTube requests until play) ---------- */

.yt-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 880px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 24px 64px rgba(28, 28, 30, 0.18);
  background: #000;
}
.yt-facade img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.yt-facade:hover img, .yt-facade:focus-visible img { transform: scale(1.03); }
.yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  pointer-events: none;
}
.yt-facade:hover .yt-play { transform: translate(-50%, -50%) scale(1.08); background: var(--orange-deep); }
.yt-play svg { width: 30px; height: 30px; fill: #fff; margin-left: 5px; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Content pages (legal, 404) ---------- */

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 24px;
}
.page-content h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-content h2 { font-size: 1.4rem; margin-top: 2em; }
.page-content h3 { font-size: 1.1rem; margin-top: 1.6em; }
.page-content table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.page-content td, .page-content th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

/* ---------- Signup page ---------- */

.signup-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 24px;
}
.signup-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-card);
  margin-top: 32px;
}

/* ® mark (registered 2026-07-07, Reg. 8338421) — keep it from pushing line-height */
sup { font-size: 0.55em; line-height: 0; vertical-align: super; font-weight: 500; }
