/* =========================================================================
   Medusa AI — one-page WhatsApp lead automation landing
   Mobile-first. RTL. No frameworks.
   ========================================================================= */

/* ----------------------------- Tokens ----------------------------- */
:root {
  --navy:   #070D2C;   /* deep navy — dark section backgrounds */
  --coral:  #FF255D;   /* primary accent — CTAs and key highlights */
  --pink:   #FF7093;   /* light pink — accents, business chat bubbles */
  --orange: #E97E11;   /* gradient start on primary CTAs */
  --coral-ink: #C2003D; /* darkened coral for small text on light bg (AA) */

  --light:  #F4F8FA;   /* soft light section background */
  --text:   #10212F;   /* dark text */
  --muted:  #4A6070;   /* secondary text on light bg (AA on --light) */
  --muted-d:#C3CEDA;   /* secondary text on navy bg (AA on --navy) */
  --white:  #FFFFFF;

  --grad: linear-gradient(90deg, var(--orange), var(--coral));

  --radius:   16px;
  --radius-s: 10px;
  --wrap:     1120px;
  --shadow:   0 10px 30px rgba(7, 13, 44, .10);
  --shadow-d: 0 14px 40px rgba(0, 0, 0, .28);

  --font: "Heebo", "Assistant", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;      /* 17px base */
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 6.2vw, 3.4rem); font-weight: 900; letter-spacing: -.5px; }
h2 { font-size: clamp(1.45rem, 4.2vw, 2.2rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(11,27,43,.06);
  padding: .1em .35em;
  border-radius: 5px;
}

/* ------------------------- Focus visibility ------------------------- */
:focus-visible {
  outline: 3px solid var(--coral-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
/* On dark bands a bright coral outline gives the needed separation */
.section--navy :focus-visible,
.site-header :focus-visible { outline-color: var(--pink); }

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------------------------- Layout ---------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.15rem; }
.wrap--narrow { max-width: 780px; }
.center { text-align: center; }

.section { padding: clamp(3.2rem, 8vw, 5.5rem) 0; }
.section--tight { padding-block: clamp(2.6rem, 6vw, 4rem); }
.section--light { background: var(--light); }
.section--navy {
  background: var(--navy);
  color: var(--white);
}
.section--navy h2, .section--navy h3 { color: var(--white); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.2rem); color: var(--muted); margin-bottom: 1.5rem; }
.lead--light { color: var(--muted-d); }

.section-outro {
  margin-top: 2.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}
.section--navy .section-outro { color: var(--muted-d); }
.section-outro--strong { font-weight: 700; color: var(--text); }
.section--navy .section-outro--strong { color: #fff; }

.prose-list { padding-inline-start: 1.15rem; margin-bottom: 1.25rem; }
.prose-list li { margin-bottom: .6rem; }
/* ---------------------------- Buttons ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn--wa {
  background: var(--grad);
  background-origin: border-box;  /* gradient covers the transparent border, no color bleed at the edges */
  border: 0;
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 10px 22px -8px rgba(255, 37, 93, .55);  /* glow sits under the button, no colored rim on the sides */
}
.btn--wa:hover {
  background: linear-gradient(90deg, #F58B1C, #FF4A78);  /* slightly brighter */
  background-origin: border-box;
  color: var(--navy);
  transform: translateY(-2px);
}
.btn--wa:active { transform: translateY(0); }
.btn--sm { padding: .55rem 1.05rem; font-size: .9rem; }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.1rem; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-block;
  font-weight: 700;
  color: var(--coral-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--coral);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease;
}
.link-arrow:hover { color: var(--navy); border-color: var(--navy); }
.section--navy .link-arrow { color: var(--pink); }
.section--navy .link-arrow:hover { color: #fff; border-color: #fff; }
.link-arrow--light { color: var(--pink); }

/* ---------------------------- Header ---------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 8, 44, .94);
  backdrop-filter: blur(8px);
  color: #fff;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand tag cta";
  align-items: center;
  gap: .75rem;
  min-height: 62px;
  padding-block: .6rem;
}
/* Brand logo (SVG is 838x183, ratio 4.6:1) — 36px on mobile, 44px on desktop */
.brand { grid-area: brand; justify-self: start; display: flex; align-items: center; gap: .85rem; text-decoration: none; color: #fff; }
.brand-logo {
  display: block;
  width: auto;
  height: 36px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 1.02rem; }
.header-tagline { grid-area: tag; display: none; margin: 0; text-align: center; font-size: 1.1rem; font-weight: 500; letter-spacing: .01em; color: #E6E9F5; white-space: nowrap; }
.header-cta { grid-area: cta; justify-self: end; }

/* Header CTA label: long by default, shortened on narrow screens */
.cta-short { display: none; }
@media (max-width: 399px) {
  .header-cta { padding-inline: .9rem; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}

/* ---------------------------- Hero ---------------------------- */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 37, 93, .22) 0%, rgba(255, 37, 93, 0) 60%),
    var(--navy);
  color: #fff;
  padding: clamp(2.6rem, 7vw, 4.5rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}
.hero-inner { display: grid; gap: clamp(2.2rem, 6vw, 3.5rem); align-items: center; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: var(--muted-d); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.35rem; }
.hero-note { margin-top: 1.1rem; color: var(--muted-d); font-size: .95rem; }

/* --------------------- Phone mockup (CSS only) --------------------- */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative;
  width: min(300px, 84vw);
  background: #F0F4F7;
  border: 9px solid #101A3D;
  border-radius: 38px;
  box-shadow: var(--shadow-d);
  padding: 0 0 1rem;
  overflow: hidden;
}
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 20px;
  background: #101A3D;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.phone-bar {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: #0A1240;   /* WhatsApp-style header bar */
  color: #fff;
  padding: 1.6rem .9rem .7rem;
}
.phone-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}
.phone-name { font-weight: 500; font-size: .92rem; }

.phone-chat {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .9rem .7rem .3rem;
  min-height: 250px;
}
.msg {
  max-width: 84%;
  margin: 0;
  padding: .55rem .75rem;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.5;
  box-shadow: 0 1px 1px rgba(0,0,0,.09);
}
/* In RTL, "in" = customer (white), "out" = business reply (light pink) */
.msg--in  { background: #fff; color: var(--text); align-self: flex-start; border-start-start-radius: 4px; }
.msg--out { background: var(--pink); color: var(--navy); align-self: flex-end; border-start-end-radius: 4px; }

.phone-caption {
  margin: .6rem .9rem 0;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

/* Staggered hero chat reveal */
.reveal { animation: rise .45s ease both; animation-delay: var(--d, 0s); }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-on-scroll.is-visible { opacity: 1; transform: none; }
/* ---------------------------- Cards / grids ---------------------------- */
.grid { display: grid; gap: 1rem; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
  background: #fff;
  border: 1px solid rgba(11,27,43,.08);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35rem; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

/* Cards on the navy band */
.section--navy .card--dark {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: none;
}
.section--navy .card--dark h3 { color: #fff; font-size: 1.08rem; margin: 0; }
.card--feature h3 { color: var(--navy); position: relative; padding-inline-start: 1.1rem; }
/* Small coral tick as a key highlight on feature headings */
.card--feature h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .3em;
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: var(--coral);
}

/* ---------------------------- Steps ---------------------------- */
.steps { list-style: none; display: grid; gap: 1rem; }
.step {
  position: relative;
  background: #fff;
  border: 1px solid rgba(11,27,43,.08);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
}
.step-num {
  position: absolute;
  top: -14px;
  inset-inline-start: 1.25rem;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: var(--navy);
  font-weight: 900;
  font-size: 1.05rem;
}
.step h3 { margin-bottom: .3rem; }
.step p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------------------------- Icon grid ---------------------------- */
.icon-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem;
}
.icon-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--light);
  border: 1px solid rgba(11,27,43,.07);
  border-radius: var(--radius-s);
  padding: .95rem .9rem;
  font-weight: 500;
  font-size: .97rem;
}
.icon { width: 26px; height: 26px; flex: none; color: var(--coral-ink); }

/* ---------------------------- FAQ accordion ---------------------------- */
.faq { display: grid; gap: .7rem; }
.faq-item {
  background: #fff;
  border: 1px solid rgba(11,27,43,.08);
  border-radius: var(--radius-s);
  overflow: hidden;
}
.faq-item h3 { margin: 0; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  text-align: start;
  padding: 1.05rem 1.1rem;
  cursor: pointer;
}
.faq-q:hover { background: rgba(255, 37, 93, .08); }
.faq-icon {
  position: relative;
  flex: none;
  width: 16px; height: 16px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  background: var(--coral-ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); opacity: 0; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
}
.faq-a p {
  margin: 0;
  padding: 0 1.1rem 1.1rem;
  color: var(--muted);
  font-size: .98rem;
}

/* ---------------------------- Footer ---------------------------- */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 2.5rem 0 6rem;   /* extra bottom room for the floating button */
}
.footer-inner { text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.footer-logo { display: block; width: auto; height: 27px; }
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.4rem;
  margin-bottom: 1rem;
  font-size: .95rem;
  color: var(--muted-d);
}
.footer-links a { color: var(--pink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-slogan { margin: 0 0 .4rem; font-size: 1rem; font-weight: 500; color: var(--white); }
.footer-services { margin: 0 0 1.1rem; font-size: .9rem; color: var(--muted-d); }
.footer-copy { margin: 0; font-size: .88rem; color: var(--muted-d); }

/* --------------------- Floating WhatsApp button --------------------- */
.wa-float {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  inset-inline-start: 1rem;   /* bottom-LEFT in RTL */
  z-index: 150;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 32px; height: 32px; }
/* Soft halo pulse; disabled under reduced-motion (see below) */
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
/* ---------------------------- Breakpoints ---------------------------- */

/* Small phones: tighten the base a touch */
@media (max-width: 359px) {
  .icon-grid { grid-template-columns: 1fr; }
  .btn--lg { font-size: 1rem; padding: .95rem 1.5rem; }
}

@media (min-width: 900px) { .header-tagline { display: block; } }

/* Tablets and up */
@media (min-width: 600px) {
  /* Subtitle and the larger logo are desktop/tablet only */
  .brand-logo { height: 44px; }
  .icon-grid { grid-template-columns: repeat(3, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .btn--block { width: auto; }
}

/* Desktop: side-by-side hero, 4-up feature row */
@media (min-width: 900px) {
  body { font-size: 1.1rem; }
  .wrap { padding-inline: 1.75rem; }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .hero-inner { grid-template-columns: 1.05fr .95fr; }
  .hero h1 { max-width: 15ch; }
  .wa-float { width: 62px; height: 62px; inset-inline-start: 1.5rem; }
  .wa-float svg { width: 34px; height: 34px; }
}

/* Very wide: keep line lengths readable */
@media (min-width: 1200px) {
  .steps { gap: 1.5rem; }
}

/* --------------------- Reduced motion --------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .reveal-on-scroll { opacity: 1 !important; transform: none !important; }
  .wa-float::before { display: none; }
  .btn:hover, .wa-float:hover { transform: none; }
}

/* --------------------- Print --------------------- */
@media print {
  .site-header, .wa-float, .hero-visual { display: none; }
  body { color: #000; }
  .faq-a { max-height: none !important; }
}


/* Hero descriptor line */
.hero-eyebrow { margin: 0 0 .6rem; font-size: .95rem; font-weight: 500; letter-spacing: .02em; color: var(--pink); }
/* Floating WhatsApp button: hidden while the hero is on screen (mobile), so it never covers the phone mockup */
.wa-float { transition: transform .15s ease, opacity .2s ease; }
.wa-float.is-hidden { opacity: 0; pointer-events: none; transform: scale(.8); }

/* ================= Header v2 (2026-09-30): bigger, glowing, compacts on scroll ================= */
.header-inner {
  min-height: 84px;
  padding-block: .9rem;
  transition: min-height .3s ease, padding .3s ease;
}
.brand-logo {
  height: 46px;
  filter: drop-shadow(0 0 10px rgba(255, 112, 147, .28));
  transition: height .3s ease;
}
.header-cta { align-self: center; }
/* logo | tagline centered in the free space | CTA */
@media (min-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 1.5rem; }
  .header-tagline { justify-self: center; }
}
.header-tagline {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #fff;
  text-shadow:
    0 0 14px rgba(255, 112, 147, .55),
    0 0 36px rgba(255, 37, 93, .35);
  animation: tagline-glow 4.5s ease-in-out infinite;
  transition: font-size .3s ease;
}
@keyframes tagline-glow {
  0%, 100% { text-shadow: 0 0 14px rgba(255,112,147,.50), 0 0 36px rgba(255,37,93,.30); }
  50%      { text-shadow: 0 0 20px rgba(255,112,147,.75), 0 0 52px rgba(255,37,93,.50); }
}
/* soft coral line under the header */
.site-header { border-bottom: 1px solid rgba(255, 112, 147, .18); box-shadow: 0 6px 30px rgba(255, 37, 93, .08); }

@media (min-width: 600px) {
  .header-inner { min-height: 104px; }
  .brand-logo { height: 58px; }
}
@media (min-width: 900px) {
  .header-inner { min-height: 124px; padding-block: 1.1rem; }
  .brand-logo { height: 62px; }
  .header-tagline { font-size: 1.4rem; }
}
@media (min-width: 1100px) { .header-tagline { font-size: 1.65rem; } }
@media (min-width: 1200px) {
  .brand-logo { height: 76px; }
  .header-tagline { font-size: 1.95rem; }
}

/* After scrolling: compact bar so it doesn't eat the screen */
.site-header.is-scrolled .header-inner { min-height: 68px; padding-block: .55rem; }
.site-header.is-scrolled .brand-logo { height: 40px; }
.site-header.is-scrolled .header-tagline { font-size: 1.25rem; }
@media (min-width: 900px) {
  .site-header.is-scrolled .brand-logo { height: 46px; }
  .site-header.is-scrolled .header-tagline { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .header-tagline { animation: none; }
  .header-inner, .brand-logo, .header-tagline { transition: none; }
}
