/* ============================================================
   reknitAI — Glassy Dusk overrides (v2)
   Layered on TOP of the bundled CSS. No destructive changes.

   Changes vs v1:
   - Caveat now loaded via preconnect-aware Google Fonts <link>
     (see note at bottom — you must also update index.html)
   - Hero heading selector targets .font-heading directly so it
     actually wins over the compiled Instrument Serif rule
   - Body/hero paragraph opacity raised to hit WCAG AA
   - Line-height tightened from 1.78 → 1.6 for comfortable reading
   - Fraunces promoted to H2s (it's already loaded)
   ============================================================ */


/* ============================================================
   FOOTER LINKS GRID — hide the placeholder Product/Company/Support
   columns. Pre-launch waitlist doesn't have any of those pages,
   and 12 dead links make the footer look like a graveyard.
   ============================================================ */
footer .grid.grid-cols-2.md\:grid-cols-3 {
  display: none !important;
}

/* ============================================================
   FOOTER BOTTOM BAR — align copyright / legal / social row
   ============================================================ */
/* Copyright: match the 12px links instead of inheriting the global p bump */
footer .flex.flex-wrap.items-center.gap-5 > p {
  font-size: 0.75rem !important;
  line-height: 1 !important;
  color: rgba(255, 255, 255, 0.45) !important;
  font-family: 'DM Sans', sans-serif !important;
  margin: 0 !important;
  white-space: nowrap;
}
/* Keep copyright + legal links on a single row at sm+ so nothing wraps
   awkwardly under the horizontal divider */
@media (min-width: 640px) {
  footer .flex.flex-wrap.items-center.gap-5 {
    flex-wrap: nowrap !important;
    gap: 1.25rem !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Center the whole bottom bar — social icons are hidden, so the legal
   cluster should sit centered instead of flush-left under justify-between. */
footer .sm\:justify-between {
  justify-content: center !important;
}
/* Hide the "Built on Perplexity Computer" builder branding — it was
   jammed into the social-icon cluster and breaking the right-side layout */
footer .flex.items-center.gap-4 > p {
  display: none !important;
}

/* Hide the placeholder social icons — they all point to href="#" and
   we don't have real Twitter/Instagram/LinkedIn profiles to link to yet. */
footer a[aria-label="Instagram"],
footer a[aria-label="LinkedIn"],
footer a[aria-label="Twitter"],
footer a[aria-label="X"] {
  display: none !important;
}


/* ============================================================
   BRAND LOGO — swap inline SVG for logo.png, hide wordmark text
   Selector uses *= so it keeps matching after JS extends the aria-label.
   ============================================================ */
svg[aria-label*="reknitAI"] {
  width: 127px !important;
  height: 44px !important;
  background: url('./logo.png') center/contain no-repeat;
  flex-shrink: 0;
}
svg[aria-label*="reknitAI"] > * {
  display: none !important;
}
/* Hide the "reknitAI" wordmark span that sits next to the logo.
   Two forms: before JS wraps the svg in <a>, and after. */
svg[aria-label*="reknitAI"] + span,
a[data-brand-home] + span {
  display: none !important;
}


/* ============================================================
   PAGE BACKGROUND — unchanged from v1
   ============================================================ */
html, body {
  background: transparent !important;
}
body {
  background:
    radial-gradient(1200px 800px at 12% -10%, rgba(229,165,114,0.14), transparent 60%),
    radial-gradient(1000px 700px at 90% 20%, rgba(157,180,200,0.14), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(200,124,74,0.10), transparent 60%),
    linear-gradient(180deg, #1a2030 0%, #151a26 40%, #121620 100%) !important;
  color: #e4e6ea !important;

  /* Boosted base font size — less eye strain */
  font-size: 18px !important;
  line-height: 1.65 !important;              /* was 1.72 — too airy */
  font-family: "DM Sans", "Barlow", system-ui, sans-serif !important;
}

/* Subtle film grain — unchanged */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#root { position: relative; z-index: 1; }


/* ============================================================
   BODY COPY — readable contrast, relaxed but not sloppy
   ============================================================ */

p {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem) !important;
  line-height: 1.65 !important;                /* was 1.78 */
}

/* Hero sub-paragraph — biggest contrast fix */
section.min-h-screen p,
section.min-h-svh p {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem) !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.78) !important;   /* was 0.52 / 0.44 — WCAG fail */
  font-style: normal !important;
}

/* Secondary paragraphs (moments, feature descriptions) */
section p[style*="rgba(255,255,255,0.35)"],
section p[style*="rgba(255,255,255,0.44)"],
section p[style*="rgba(255,255,255,0.52)"] {
  color: rgba(255, 255, 255, 0.72) !important;   /* floor for all body text */
}

/* Eyebrow labels — slightly larger, better spaced */
[style*="0.62rem"],
[style*="0.63rem"] {
  font-size: 0.8rem !important;
  letter-spacing: 0.18em !important;
}

/* Card body text */
[style*="fontSize: \"0.75rem\""],
[style*="font-size: 0.75rem"] {
  font-size: 1rem !important;
  line-height: 1.58 !important;
}

[style*="fontSize: \"0.88rem\""],
[style*="font-size: 0.88rem"] {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* Stat numbers */
.stat-number {
  font-family: "Fraunces", serif !important;
  font-size: clamp(3.5rem, 7vw, 5.5rem) !important;
}

/* Waitlist input */
.waitlist-input {
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
}


/* ============================================================
   CARDS & CTA — unchanged from v1
   ============================================================ */
.signal-card {
  background: linear-gradient(
    155deg,
    rgba(255,255,255,0.07) 0%,
    rgba(255,255,255,0.03) 100%
  ) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  backdrop-filter: blur(22px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 20px 60px rgba(5,10,20,0.35) !important;
}
.signal-card:hover {
  border-color: rgba(229,165,114,0.35) !important;
  background: linear-gradient(
    155deg,
    rgba(255,255,255,0.10) 0%,
    rgba(229,165,114,0.06) 100%
  ) !important;
}

.join-btn {
  background: linear-gradient(135deg, #E5A572 0%, #C87C4A 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 10px 30px rgba(229,165,114,0.25) !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
}
.join-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #EEB587 0%, #D48957 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18) inset,
    0 14px 36px rgba(229,165,114,0.40) !important;
}

.bg-background { background-color: transparent !important; }

input[type="email"] {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  color: #f2f4f7 !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
}
input[type="email"]::placeholder { color: rgba(255,255,255,0.55) !important; }
input[type="email"]:focus {
  border-color: rgba(229,165,114,0.55) !important;
  box-shadow: 0 0 0 3px rgba(229,165,114,0.15) !important;
}


/* ============================================================
   GSAP reveal states — unchanged
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  will-change: opacity, transform;
}
[data-reveal-word] {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(10px);
  will-change: opacity, transform, filter;
}
[data-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}

.reknit-network {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

h1 [data-reveal-word],
h2 [data-reveal-word] { line-height: inherit; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-word], [data-stagger] > * {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
}


/* ============================================================
   MOBILE — readability at narrow viewports
   ============================================================ */
@media (max-width: 640px) {
  body {
    font-size: 18px !important;
  }

  p {
    font-size: 1.15rem !important;   /* ~20-21px — comfortable thumb-scroll reading */
    line-height: 1.7 !important;
  }

  section.min-h-screen p,
  section.min-h-svh p {
    font-size: 1.2rem !important;    /* hero sub-copy — punchy and clear */
    line-height: 1.65 !important;
  }

  /* Eyebrow labels */
  [style*="0.62rem"],
  [style*="0.63rem"] {
    font-size: 0.82rem !important;
    letter-spacing: 0.16em !important;
  }

  /* Card body text */
  [style*="font-size: 0.75rem"] {
    font-size: 1.02rem !important;
    line-height: 1.6 !important;
  }

  /* Waitlist input */
  input[type="email"] {
    font-size: 16px !important;      /* prevents iOS auto-zoom */
  }

  /* CTA button */
  .join-btn {
    font-size: 17px !important;
  }

  /* ----------------------------------------------------------
     HERO RHYTHM — pull the email form up so "Get early access"
     and "287+ early members" sit above the fold on phones.
     The h1 ships with mb-7 (28px) and the "Life is relentless"
     paragraph adds its own bottom margin; on small screens that
     stacks too much air between the headline and the form.
     ---------------------------------------------------------- */
  section.min-h-screen h1,
  section.min-h-svh h1 {
    margin-bottom: 0.85rem !important;
  }
  section.min-h-screen p.font-heading.italic,
  section.min-h-svh p.font-heading.italic {
    margin-bottom: 0.6rem !important;
    line-height: 1.55 !important;
  }
}


/* ============================================================
   IMPORTANT — update index.html <head>

   Replace the existing Google Fonts <link> with this one so
   Caveat loads as a first-class font (not via slow @import):

   <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400;1,9..144,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap" rel="stylesheet" />

   The @import at the top of this file is kept as a fallback but
   should be removed once index.html is updated.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&display=swap');


/* ============================================================
   GRADIENT TEXT — bundle CSS gives each BlurText word-span its
   own private gradient context, so the "e" in "circle" landed
   at the boundary of its span's local gradient and looked faded.
   Fix: keep the per-span gradient (so text stays visible across
   nested divs/spans) but anchor each span's background to the
   viewport with background-attachment:fixed + a viewport-sized
   gradient. Every span then shows its own slice of the SAME
   continuous gradient frame.
   ============================================================ */
.gradient-text,
.gradient-text span,
.gradient-text div {
  background: linear-gradient(94deg, #f09c4c, #ec6c48 24%, #ef8ecc 65%, #d1a4f2) !important;
  background-attachment: fixed !important;
  background-size: 100vw 100vh !important;
  background-repeat: no-repeat !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* Italic Fraunces glyphs (especially the lowercase "e") have tails that
   extend past the character box. Force every ancestor that could clip
   them to overflow:visible. Keep horizontal padding minimal so the
   line doesn't wrap on narrow mobile widths and push the CTA below
   the fold. */
.gradient-text {
  overflow: visible !important;
  padding-right: 0.06em !important;
}
.gradient-text span,
.gradient-text div {
  overflow: visible !important;
}
section.min-h-screen h1,
section.min-h-svh h1,
section.min-h-screen h1 *,
section.min-h-svh h1 * {
  overflow: visible !important;
}


/* ============================================================
   COUNT DISPLAY — prevent last digit getting clipped
   Tagged by theme-animations.js when it sees text like
   "267+ early members" or position messages.
   ============================================================ */
.reknit-count {
  overflow: visible !important;
  padding-right: 0.12em !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.reknit-count-parent {
  overflow: visible !important;
}




/* ============================================================
   HERO TYPEWRITER — caret + stable layout
   The .gradient-text span is replaced by theme-animations.js with
   <span class="reknit-tw-text"></span><span class="reknit-tw-caret">|</span>.
   We give the text node enough min-height so the line doesn't
   collapse mid-delete, and animate the caret blink.
   ============================================================ */
.reknit-tw-text {
  display: inline;
  white-space: pre;
  line-height: inherit;
}
.reknit-tw-caret {
  display: inline;
  margin: 0;
  font-weight: 200;
  vertical-align: baseline;
  line-height: inherit;
  /* Tighten so the caret doesn't add width that could push wrapping */
  letter-spacing: -0.08em;
  animation: reknit-tw-blink 1.05s steps(1) infinite;
}
@keyframes reknit-tw-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}


/* ============================================================
   FAQ SECTION — injected between hero and "How it feels".
   Dark espresso background to match the hero fade-out tone
   instead of showing the lighter body gradient. Amber accents
   on the questions + a glowing dot give it warmth and match
   the rest of the site's palette.
   ============================================================ */
.reknit-faq {
  position: relative;
  padding: clamp(28px, 3vw, 44px) 24px clamp(80px, 9vw, 128px);
  /* Solid warm espresso. A fade-to-transparent here just reveals the
     body's blue-grey gradient and reintroduces the seam, so we keep
     this solid and paint the sections below espresso too (rule below). */
  background: #0a0806 !important;
  overflow: hidden;
  isolation: isolate;
}

/* Every section after the FAQ (VALUES DECK / "How it feels" / etc.)
   sits on warm espresso instead of the body's cool blue gradient —
   eliminates the hard band between FAQ and what follows. */
#reknit-faq ~ section {
  background-color: #0a0806 !important;
}
/* No top amber wash — it was creating a visible highlight seam
   where cards meets FAQ. Keep the section flat so cards and FAQ
   read as one continuous espresso ribbon. */
.reknit-faq-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.reknit-faq-eyebrow {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase;
  color: rgba(229, 165, 114, 0.85) !important;
  margin: 0 0 12px !important;
}
.reknit-faq-title {
  font-family: 'Fraunces', serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  color: #fff !important;
  margin: 0 0 clamp(32px, 3.5vw, 48px) !important;
}
.reknit-faq-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 1.6vw, 22px);
}
.reknit-faq-item {
  position: relative;
  padding: 0 0 clamp(16px, 1.6vw, 22px) 22px;
  border-bottom: 1px solid rgba(229, 165, 114, 0.12);
}
.reknit-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
/* Amber dot to the left of each question */
.reknit-faq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E5A572;
  box-shadow: 0 0 14px rgba(229, 165, 114, 0.55);
}
.reknit-faq-q {
  font-family: 'Fraunces', serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(1.1rem, 2.1vw, 1.35rem) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  color: #E5A572 !important;
  margin: 0 0 6px !important;
}
.reknit-faq-a {
  font-family: 'DM Sans', sans-serif !important;
  font-size: clamp(0.97rem, 1.5vw, 1.03rem) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: rgba(255, 255, 255, 0.72) !important;
  margin: 0 !important;
}

@media (max-width: 640px) {
  .reknit-faq {
    padding: 24px 20px 40px;
  }
  .reknit-faq-title {
    margin-bottom: 28px !important;
  }
  .reknit-faq-a {
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
  }
}


/* ============================================================
   CARDS SECTION — injected between hero and FAQ.
   "What it does / How it's different / Put simply" — three
   short beats. Espresso tone, amber accents, matches site.
   ============================================================ */
.reknit-cards {
  position: relative;
  padding: clamp(72px, 9vw, 112px) 24px clamp(28px, 3vw, 44px);
  /* Solid espresso top-to-bottom. The hero ends with a dark video
     overlay (≈#0c0a08) so there's no tonal jump, and the FAQ below
     is the same #0a0806 so cards + FAQ feel like one ribbon. */
  background: #0a0806 !important;
  overflow: hidden;
  isolation: isolate;
}
.reknit-cards-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.reknit-cards-eyebrow {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase;
  color: rgba(229, 165, 114, 0.85) !important;
  margin: 0 0 12px !important;
}
.reknit-cards-title {
  font-family: 'Fraunces', serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  color: #fff !important;
  margin: 0 0 clamp(32px, 3.5vw, 48px) !important;
}
.reknit-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  text-align: left;
}
.reknit-card {
  position: relative;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(229, 165, 114, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              background 0.35s ease;
}
.reknit-card:hover {
  border-color: rgba(229, 165, 114, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-3px);
}
.reknit-card-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #E5A572;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(229, 165, 114, 0.18);
}
.reknit-card-body {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.78) !important;
  margin: 0 !important;
}
.reknit-card-body strong {
  color: #fff;
  font-weight: 600;
}
.reknit-card-body em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  color: #E5A572;
  margin-right: 2px;
}

@media (max-width: 768px) {
  .reknit-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .reknit-cards {
    padding: 56px 20px 20px;
  }
  .reknit-cards-title {
    margin-bottom: 28px !important;
  }
  .reknit-card {
    padding: 22px 20px;
  }
}


/* ============================================================
   SCROLL REVEAL — fade + rise as sections enter the viewport.
   Applied by IntersectionObserver via the `.reknit-reveal` class;
   `.reknit-visible` is added when the element intersects.
   ============================================================ */
.reknit-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reknit-reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reknit-reveal.reknit-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reknit-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
