@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* Match bexo-web landing tokens: ink · paper · #2F6BFF */
:root {
  --bexo-ink: #0b1220;
  --bexo-ink-elevated: #070b14;
  --bexo-ink-deep: #05070f;
  --bexo-paper: #f7f4ef;
  --bexo-panel: rgba(255, 255, 255, 0.06);
  --bexo-border: rgba(255, 255, 255, 0.12);
  --bexo-text: #f8fafc;
  --bexo-muted: rgba(248, 250, 252, 0.62);
  --bexo-accent: #2f6bff;
  --bexo-accent-hover: #2558e0;
  --bexo-accent-soft: #9bb6ff;
  --bexo-sky: #2f6bff;
  --bexo-blue: #2f6bff;
  --bexo-indigo: #2558e0;
  --bexo-grad: linear-gradient(135deg, #4d82ff 0%, #2f6bff 52%, #2558e0 100%);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius-lg: 1.15rem;
  --shadow-glow: 0 14px 40px -14px rgba(47, 107, 255, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: var(--bexo-ink);
  color: var(--bexo-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

section {
  width: 100%;
  padding: 1em;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 5.75em 0;
}

h1,
h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--bexo-text);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  margin: 0.35em 0 0.35em;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--bexo-text);
  margin: 0.4em 0;
  letter-spacing: -0.01em;
}

p {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--bexo-muted);
}

p#callout,
.eyebrow {
  width: max-content;
  max-width: 100%;
  background: rgba(47, 107, 255, 0.12);
  padding: 0.35em 0.95em;
  border: 1px solid rgba(47, 107, 255, 0.28);
  border-radius: 999px;
  color: var(--bexo-accent-soft);
  margin: 0 0 1em;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  backdrop-filter: blur(8px);
}

a {
  text-decoration: none;
  color: var(--bexo-text);
  font-family: var(--font-sans);
}

.btn-primary,
button.btn-primary,
a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  background: var(--bexo-accent);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.85em 1.45em;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 55%);
  border-radius: inherit;
  pointer-events: none;
}

.btn-primary:hover {
  background: var(--bexo-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -12px rgba(47, 107, 255, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost,
a.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--bexo-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--bexo-text) !important;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85em 1.35em;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(155, 182, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.35);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--bexo-border),
    rgba(47, 107, 255, 0.35),
    var(--bexo-border),
    transparent
  );
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
}

.brand-link img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(47, 107, 255, 0.35);
}

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--bexo-ink-elevated);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 255, 0.28), transparent);
}

.site-footer .container {
  padding: 2.5em 0 1.5em;
}

.site-footer .f-tagline {
  margin-top: 0.75rem;
  max-width: 16rem;
  font-size: 0.85rem;
}

.site-footer .brand-link img {
  width: 28px;
  height: 28px;
}

.footer-links {
  padding: 1em 0 2em;
}

.site-footer a {
  color: var(--bexo-muted);
  font-size: 0.875rem;
  line-height: 2.2;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--bexo-accent-soft);
}

.site-footer .f-links-col p {
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

.f-row {
  display: flex;
  gap: 2rem;
}

.f-logo {
  flex: 2;
}

.f-links {
  flex: 4;
  display: flex;
  gap: 2em;
}

.f-links-col {
  flex: 1;
}

.f-ctext {
  padding: 1.25em 0 0.5em;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
}

.f-ctext::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 255, 0.22), transparent);
}

.f-ctext p {
  font-size: 0.8rem;
}

.f-domain span {
  color: var(--bexo-accent-soft);
  font-weight: 700;
}

@media (max-width: 900px) {
  .container {
    width: min(1120px, 92%);
    padding: 3.5em 0;
  }

  section {
    padding: 0.75em;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3.25rem);
  }

  .f-row {
    flex-direction: column;
  }

  .f-links {
    flex-direction: column;
    gap: 1.5em;
  }

  .f-ctext {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-primary,
  .btn-ghost,
  a.btn-primary,
  a.btn-ghost {
    min-height: 48px;
  }
}

/* ==========================================================================
   Site-wide mobile layer (all marketing pages import main.css)
   Fixes: horizontal overflow from decorative glows, hero rhythm under the
   floating pill nav, consistent gutters, and touch-friendly controls.
   ========================================================================== */
@media (max-width: 720px) {
  /* Root cause of "content shifted left": 600–800px decorative glows spill
     past a ~390px viewport. Clip horizontally instead of hiding (keeps
     vertical scroll healthy on iOS). */
  html,
  body {
    overflow-x: clip;
    max-width: 100%;
  }

  /* Every marketing section becomes its own horizontal clip boundary so a
     section's decorative ::before glow can never widen the page. */
  section {
    overflow-x: clip;
    padding: 0.5em 0;
  }

  /* One consistent gutter, honoring notches on both edges. */
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Inner-page heroes: tighten the top gap under the floating pill nav and
     calm the oversized decorative glows. */
  .stories-hero .container,
  .section-pricing-hero .container,
  .about-hero .container,
  .contact-hero .container,
  .blog-hero .container {
    padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: 1.75rem;
  }

  .stories-hero::before,
  .section-pricing-hero::before,
  .about-hero::before {
    width: min(120vw, 34rem);
    height: min(120vw, 34rem);
    opacity: 0.7;
  }

  /* Headlines: never let a long word push the page wide. */
  h1,
  h2,
  h3,
  .stories-hero h1,
  .about-hero h1,
  .section-pricing-hero h1 {
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  /* Card padding that reads generous on desktop is cramped-then-tall on
     phones — bring it into a comfortable single-column rhythm. */
  .story-card,
  .p-card,
  .journey-step,
  .about-body .panel {
    padding: 1.5rem 1.35rem;
    border-radius: 1.15rem;
  }

  .story-card blockquote {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
  }

  /* Bands stack cleanly and center. */
  .pricing-free-band .band,
  .lifetime-band {
    padding: 1.35rem 1.25rem;
    border-radius: 1.25rem;
  }

  /* Touch ergonomics + iOS zoom prevention on the contact form. */
  a,
  button,
  .btn,
  input,
  textarea,
  select,
  [role="button"] {
    touch-action: manipulation;
  }

  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .contact-form .btn-submit {
    min-height: 48px;
  }

  body {
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Honor reduced-motion for the shared hero-rise entrance across all pages. */
@media (prefers-reduced-motion: reduce) {
  [class*="hero"] .container,
  .stories-grid .container,
  .pricing-primary,
  .pricing-free-band,
  .pricing-lifetime,
  .pricing-note,
  .about-journey .container,
  .about-grid {
    animation: none !important;
  }
}
