/* ============================================================================
   Tapyme marketing — Apple-style refinement layer (2026)
   Loaded LAST so it settles the competing scales in home.css.
   One type system (SF Pro), one spacing rhythm, quiet navigation.
   Brand teal/lime survive as accents only.
   ============================================================================ */

:root {
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --hair: #d2d2d7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --brand: #127884;
  --brand-ink: #0d5f5a;
  --lime: #cdee45;
  --shell: 1040px;
  --gutter: 22px;
  --section-y: clamp(64px, 7.5vw, 104px);
  --radius: 18px;
}

/* ---- Type system: one scale, everywhere -------------------------------- */
.home-v2,
.home-v2 input,
.home-v2 button,
.home-v2 select,
.home-v2 textarea { font-family: var(--sf); }

.home-v2 { color: var(--ink); -webkit-font-smoothing: antialiased; background: var(--surface); }

.home-v2 h1, .home-v2 h2, .home-v2 h3, .home-v2 h4 {
  font-family: var(--sf);
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

/* Weight + family normalization.
   home.css/styles.css request weights of 550–950 in ~45 places. For any
   requested weight above 500 the CSS font-matching algorithm searches UPWARD
   first, so 620/650/680/720 all resolve to SF Bold and 850/950 to SF Black —
   that snapping, not just the px sizes, is what made the page read as heavy.
   Apple's marketing pages top out at 600. These two rules are deliberately
   !important: the offending declarations are spread across two stylesheets at
   higher specificity, and normalizing them individually is what let the mix
   drift in the first place. */
body.home-v2 h1, body.home-v2 h2, body.home-v2 h3, body.home-v2 h4,
body.home-v2 .mosaic-headline, body.home-v2 .marketing-brand { font-weight: 600 !important; }
body.home-v2, body.home-v2 h1, body.home-v2 h2, body.home-v2 h3, body.home-v2 h4,
body.home-v2 p, body.home-v2 li, body.home-v2 span, body.home-v2 strong,
body.home-v2 small, body.home-v2 em, body.home-v2 a, body.home-v2 button,
body.home-v2 input, body.home-v2 .mosaic-headline { font-family: var(--sf) !important; }

/* The specific oversized/heavy rules the audit found still winning on
   specificity after the base-file cleanup. `body` + the same class chain
   out-specifies the originals without another round of !important. */
body.home-v2 .story-section > .section-heading h2,
body.home-v2 .freedom-copy h2,
body.home-v2 .booking-copy h2,
body.home-v2 .mosaic-headline {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
}
body.home-v2 .story-copy h3 { font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -0.012em; }
body.home-v2 .connecteam-header .marketing-nav a,
body.home-v2 .connecteam-header .marketing-menu-trigger,
body.home-v2 .connecteam-header .marketing-link { font-size: 13px; font-weight: 400; letter-spacing: -0.004em; }

/* Hero — Apple keeps this restrained, not screen-filling */
.home-v2 .hero-copy h1,
.home-v2 .connecteam-hero .hero-copy h1 {
  font-size: clamp(38px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 18px;
}
/* Kill the serif-italic mix — one typeface only */
.home-v2 .hero-copy h1 em,
.home-v2 .connecteam-hero .hero-copy h1 em,
.home-v2 h2 em, .home-v2 h3 em {
  font-family: var(--sf);
  font-style: normal;
  font-weight: 600;
  color: var(--brand-ink);
}

.home-v2 .hero-copy .marketing-lede,
.home-v2 .connecteam-hero .hero-copy .marketing-lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.47;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 34ch;
  margin: 0 0 26px;
}

/* Section headings — every section, one size */
.home-v2 .section-heading h2,
.home-v2 h2,
.home-v2 .device-showcase h2,
.home-v2 .journey-copy h2,
.home-v2 .freedom-copy h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0 0 14px;
}
.home-v2 h3 { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.2; letter-spacing: -0.012em; margin: 0 0 8px; }

.home-v2 p, .home-v2 li { font-size: 17px; line-height: 1.47; letter-spacing: -0.008em; color: var(--ink-2); }
.home-v2 .section-heading p { font-size: clamp(17px, 1.4vw, 19px); max-width: 60ch; margin-inline: auto; }
.home-v2 small, .home-v2 .marketing-footer a { font-size: 14px; line-height: 1.42; }

/* Eyebrow — Apple uses a quiet accent line, not a shouty tracked-out label */
.home-v2 .marketing-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brand);
  margin: 0 0 10px;
}

/* ---- Rhythm: one section padding, one shell width ---------------------- */
/* Only the vertical rhythm is normalized here. Each section keeps its own
   internal layout from home.css — never set margin-inline:auto on section
   children: it turns grid items from stretch to shrink-to-fit and collapses
   any column whose contents are absolutely positioned (e.g. the hero media). */
.home-v2 main > section { padding-block: var(--section-y); }
.home-v2 .section-heading {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(34px, 4vw, 54px);
}

/* Alternating surfaces, Apple-style */
.home-v2 .story-section,
.home-v2 .moments-section,
.home-v2 .pricing-section { background: var(--surface-2); }
.home-v2 .fit-strip,
.home-v2 .section-band,
.home-v2 .split-section,
.home-v2 .booking-section { background: var(--surface); }

/* ---- Header: 48px, quiet, translucent --------------------------------- */
.home-v2 .marketing-header,
.home-v2 .connecteam-header {
  /* Apple's bar is edge-to-edge; home.css floats an inset pill
     (width: min(1240px, 100% - 40px)) which a full-bleed dropdown can't attach to. */
  position: sticky;
  top: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  height: 52px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 26px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none;
}
.home-v2 .marketing-brand { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; gap: 8px; }
.home-v2 .marketing-brand-mark { width: 26px; height: 26px; border-radius: 7px; font-size: 14px; }

.home-v2 .marketing-nav { display: flex; align-items: center; gap: 4px; margin: 0; }
.home-v2 .marketing-nav > a,
.home-v2 .marketing-menu-trigger {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.004em;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  opacity: .85;
  cursor: pointer;
  transition: opacity .18s ease, background .18s ease;
}
.home-v2 .marketing-nav > a:hover,
.home-v2 .marketing-menu-trigger:hover { opacity: 1; background: rgba(0, 0, 0, 0.045); }
.home-v2 .marketing-menu-trigger[aria-expanded="true"] { opacity: 1; background: rgba(0, 0, 0, 0.06); }
/* Drop the chevron rotation ornamentation from the old header */
.home-v2 .marketing-menu-trigger::after { display: none !important; }

.home-v2 .marketing-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.home-v2 .marketing-link { font-size: 13px; font-weight: 400; color: var(--ink); opacity: .85; }
.home-v2 .marketing-actions .marketing-button {
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.004em;
}

/* ---- The fix: a quiet dropdown, not a half-screen mega panel ----------- */
.home-v2 .mega-menu,
.home-v2 .connecteam-header .mega-menu {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  /* home.css floats a centered 1120px pill (left:50% + translateX(-50%));
     all three must be reset or the bar is narrow and off-centre. */
  width: 100%;
  max-width: none;
  transform: none;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .3);
  animation: home-menu-in .22s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes home-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.home-v2 .mega-menu-panel,
.home-v2 .connecteam-header .mega-menu-panel {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 14px var(--gutter) 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: block;
}
/* home.css sets the visible panel to a 2-column grid (for the old promo card);
   with a plain link list that left half the panel empty. Force a simple block. */
.home-v2 .connecteam-header .mega-menu-panel:not([hidden]),
.home-v2 .mega-menu-panel:not([hidden]) { display: block; grid-template-columns: none; }

/* Must out-specify BOTH the base [hidden] rule and this layer's display rule,
   or every panel renders at once and the dropdown becomes a full-screen wall. */
.home-v2 .mega-menu-panel[hidden],
.home-v2 .connecteam-header .mega-menu-panel[hidden] { display: none !important; }

.home-v2 .menu-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 380px; }
.home-v2 .menu-links li { font-size: inherit; }
.home-v2 .menu-links a {
  display: block;
  padding: 6px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-decoration: none;
  transition: color .16s ease;
}
.home-v2 .menu-links a:hover { color: var(--brand); }

/* ---- Buttons: Apple pill -------------------------------------------- */
.home-v2 .marketing-button {
  border-radius: 980px;
  font-family: var(--sf);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 12px 23px;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.home-v2 .marketing-button-dark { background: var(--brand); border-color: var(--brand); color: #fff; }
.home-v2 .marketing-button-dark:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.home-v2 .marketing-button-light { background: transparent; color: var(--brand); border-color: var(--hair); }
.home-v2 .marketing-button-light:hover { border-color: var(--brand); background: rgba(18, 120, 132, .05); }

/* ---- Cards & surfaces: calm, hairline borders ------------------------- */
.home-v2 .mosaic-tile,
.home-v2 .feature-card,
.home-v2 .pricing-card,
.home-v2 .story-row,
.home-v2 .moment-card {
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  box-shadow: none;
  background: var(--surface);
}

/* ---- Trust row / chips ------------------------------------------------ */
.home-v2 .trust-row { gap: 10px; margin-top: 22px; }
.home-v2 .trust-row span {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--hair);
  border-radius: 980px;
  padding: 7px 13px;
}

/* ---- Footer ----------------------------------------------------------- */
.home-v2 .marketing-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--hair);
  padding: 42px var(--gutter);
  font-size: 14px;
  color: var(--ink-2);
}
.home-v2 .marketing-footer a { color: var(--ink-2); text-decoration: none; }
.home-v2 .marketing-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---- Mobile ----------------------------------------------------------- */
@media (max-width: 833px) {
  .home-v2 .marketing-nav { display: none; }
  .home-v2 .marketing-header.mobile-open .marketing-nav,
  .home-v2 .connecteam-header.mobile-open .marketing-nav {
    display: flex;
    position: absolute;
    top: 52px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hair);
  }
  .home-v2 .marketing-header.mobile-open .marketing-nav > a,
  .home-v2 .marketing-header.mobile-open .marketing-menu-trigger {
    text-align: left;
    font-size: 17px;
    padding: 13px 4px;
    min-height: 46px;
    border-bottom: 1px solid var(--hair);
    border-radius: 0;
  }
  .home-v2 .desktop-login { display: none; }
  .home-v2 .mega-menu-panel { padding: 16px var(--gutter) 22px; }
  .home-v2 .menu-links a { font-size: 18px; padding: 9px 0; min-height: 44px; }
  .home-v2 .hero-copy .marketing-lede { max-width: none; }
  .home-v2 main > section { padding-block: clamp(48px, 9vw, 72px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-v2 .mega-menu { animation: none; }
}
