/* ==========================================================
   Maggocare — shared styles
   Palette adapted from the shared inspiration: sky-blue gradient,
   navy buttons, near-white page, bold Poppins headings.
   ========================================================== */
:root {
  --navy: #0b2a55;
  --navy-deep: #071d3e;
  --ink: #0a1428;
  --body: #3d4b63;
  --muted: #6b7a92;
  --sky: #6fb0dc;
  --sky-mid: #3f82bb;
  --sky-deep: #1f5a94;
  --mist: #eaf3fb;
  --page: #f7fafd;
  --white: #ffffff;
  --line: #d9e4f0;
  --heal: #2f9e7a;
  --larva: #f6ecd4;
  --larva-line: rgba(11, 42, 85, .45);
  --radius-l: 28px;
  --radius-m: 18px;
  --radius-s: 10px;
  --shadow: 0 18px 50px rgba(11, 42, 85, .16);
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-deep); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--sky-mid); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.1rem; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.small { font-size: .875rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 600 .95rem/1 var(--font);
  padding: .95rem 1.5rem; border-radius: var(--radius-s);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 10px 26px rgba(11, 42, 85, .35); }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { color: var(--navy); box-shadow: 0 10px 26px rgba(11, 42, 85, .18); }
.btn-line { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }
.btn-wa { background: #1fa855; color: #fff; box-shadow: 0 10px 26px rgba(31, 168, 85, .35); }
.btn-wa:hover { background: #178a45; color: #fff; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.03em;
  flex-shrink: 0;
}

.brand img {
  width: auto;
  height: 42px;
  max-width: 150px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 1.9rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-color: var(--sky); }
.nav-links a[aria-current="page"] { border-color: var(--navy); font-weight: 600; }
.nav-links a.btn { color: #fff; border-bottom: 1.5px solid transparent; padding: .8rem 1.3rem; font-weight: 600; }
.nav-links a.btn:hover { color: #fff; border-color: transparent; }
.nav-cta { padding: .8rem 1.3rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(115deg, var(--sky-deep) 0%, var(--sky-mid) 48%, var(--sky) 100%); color: #fff; overflow: hidden; }
.hero .crawl-strip { position: absolute; left: 0; right: 0; bottom: 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3rem; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255, 255, 255, .92); font-size: 1.1rem; max-width: 46ch; }
/* Hero image - full bleed with no card border */
.hero-frame {
  position: relative;
  aspect-ratio: 4 / 4.4;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.hero-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* Remove the floating white template card */
.hero-chip {
  display: none;
}
.hero-chip strong { display: block; color: var(--ink); font-size: .95rem; margin-bottom: .15rem; }
.hero-chip .walk { position: absolute; left: 10px; right: 10px; top: -22px; height: 24px; pointer-events: none; }

/* page banner for inner pages */
.banner { background: linear-gradient(115deg, var(--sky-deep), var(--sky-mid) 60%, var(--sky)); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 7vw, 5rem); position: relative; overflow: hidden; }
.banner h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.3rem); max-width: 20ch; }
.banner p { color: rgba(255, 255, 255, .92); font-size: 1.1rem; max-width: 56ch; margin: 0; }
.banner .crawl-strip { position: absolute; left: 0; right: 0; bottom: 0; }

/* ---------- Icon columns ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 3rem; text-align: left; }
.trio .icon, .icon-box { width: 52px; height: 52px; color: var(--navy); margin-bottom: 1rem; }
.trio h3 a { color: inherit; text-decoration: none; }
.trio h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.trio p { font-size: .95rem; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.split.flip > :first-child { order: 2; }
.eyebrow { color: var(--sky-mid); font-weight: 600; font-size: .9rem; margin-bottom: .6rem; display: block; }
.tick { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.tick li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; }
.tick li::before { content: ""; position: absolute; left: 0; top: .5em; width: 1.05rem; height: .55rem; border-left: 2.5px solid var(--heal); border-bottom: 2.5px solid var(--heal); transform: rotate(-48deg) scale(.9); transform-origin: center; }

.stack { position: relative; padding: 0 0 3.5rem 3.5rem; }
.stack .back { border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.stack .back img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.stack .front { position: absolute; left: 0; bottom: 0; width: 44%; border-radius: var(--radius-m); overflow: hidden; border: 6px solid var(--page); box-shadow: var(--shadow); }
.stack .front img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

/* ---------- Facts band ---------- */
.band { background: var(--mist); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 2.5rem; }
.fact { border-top: 3px solid var(--sky); padding-top: 1rem; }
.fact b { display: block; color: var(--ink); font-size: 1.55rem; line-height: 1.2; letter-spacing: -.02em; margin-bottom: .35rem; }
.fact span { font-size: .95rem; }

/* ---------- Cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.7rem; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .icon-box { width: 44px; height: 44px; margin-bottom: .8rem; }
.note { background: #fff; border-left: 4px solid var(--sky-mid); border-radius: 0 var(--radius-m) var(--radius-m) 0; padding: 1.3rem 1.6rem; box-shadow: 0 6px 24px rgba(11, 42, 85, .06); }
.note.warn { border-color: #d9912b; }
.note h3 { margin-bottom: .3rem; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 2.2rem 0 0; counter-reset: s; display: grid; gap: 1.1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: 1.1rem; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.2rem 1.4rem; }
.steps li::before { content: counter(s); width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 600; }
.steps h3 { margin-bottom: .15rem; font-size: 1.05rem; }
.steps p { margin: 0; font-size: .95rem; }

/* ---------- Larvae (animated, stylised) ---------- */
.larva { width: 64px; height: 18px; display: block; overflow: visible; }
.larva .seg { fill: var(--larva); stroke: var(--larva-line); stroke-width: .9; transform-box: fill-box; transform-origin: center; animation: ripple 1.15s ease-in-out infinite; animation-delay: calc(var(--i) * -.095s); }
.larva .mouth { fill: var(--navy); }
@keyframes ripple {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-1.3px) scale(.93, 1.07); }
}
.crawl-strip { position: relative; height: 26px; overflow: hidden; pointer-events: none; }
.crawl-strip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; border-bottom: 2px dotted rgba(11, 42, 85, .22); }
.banner .crawl-strip::after, .hero .crawl-strip::after { border-color: rgba(255, 255, 255, .35); }
.hero .larva, .banner .larva { width: 76px; height: 21px; }
.crawl-strip .lw { position: absolute; bottom: 3px; left: -90px; animation: crawl var(--d, 26s) linear infinite; animation-delay: var(--delay, 0s); }
.crawl-strip .lw.rev { animation-name: crawlRev; left: auto; right: -90px; }
.crawl-strip .lw.rev .larva { transform: scaleX(-1); }
@keyframes crawl { from { left: -90px; } to { left: 100%; } }
@keyframes crawlRev { from { right: -90px; } to { right: 100%; } }
.walk .larva { width: 84px; height: 24px; }
.walk .lw { position: absolute; left: 0; bottom: 0; animation: walk 16s ease-in-out infinite; }
@keyframes walk {
  0% { left: 0; transform: scaleX(1); }
  48% { left: calc(100% - 84px); transform: scaleX(1); }
  50% { left: calc(100% - 84px); transform: scaleX(-1); }
  98% { left: 0; transform: scaleX(-1); }
  100% { left: 0; transform: scaleX(1); }
}

/* ---------- Therapy timeline (interactive) ---------- */
.sim { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1.3rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.bed { position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius-m); background: radial-gradient(circle at 50% 45%, #f7d9d3, #eec0b8 70%); overflow: hidden; border: 1px solid #e5b5ac; }
.bed .dead { position: absolute; background: #7d6b52; border-radius: 46% 54% 50% 50%; opacity: var(--dead, 1); transition: opacity .2s linear; filter: blur(.4px); }
.bed .dead:nth-child(1) { left: 8%; top: 14%; width: 30%; height: 34%; }
.bed .dead:nth-child(2) { left: 46%; top: 8%; width: 26%; height: 26%; border-radius: 55% 45% 40% 60%; }
.bed .dead:nth-child(3) { left: 60%; top: 44%; width: 30%; height: 38%; }
.bed .dead:nth-child(4) { left: 14%; top: 56%; width: 26%; height: 30%; border-radius: 40% 60% 55% 45%; }
.bed .dead:nth-child(5) { left: 40%; top: 46%; width: 16%; height: 18%; }
.bed .larva { width: 96px; height: 27px; }
.bed .lw{position:absolute;transform:translate(var(--dx,0),var(--dy,0)) scale(var(--size,.4)) rotate(var(--rot,0deg));transform-origin:left center;transition:transform .18s linear;filter:drop-shadow(0 3px 2px rgba(0,0,0,.18))}
.sim input[type=range] { width: 100%; accent-color: var(--navy); margin: 1.1rem 0 .3rem; }
.ticks { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.sim h3 { font-size: 1.5rem; margin-bottom: .3rem; }
.readout { display: flex; gap: 1.6rem; margin: 1rem 0 1.1rem; }
.readout div { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.readout b { display: block; font-size: 1.5rem; color: var(--ink); letter-spacing: -.02em; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: var(--radius-m); border: 1px solid var(--line); }
.gallery figcaption { font-size: .88rem; margin-top: .6rem; color: var(--body); }
.gallery figcaption b { color: var(--ink); display: block; font-weight: 600; }

/* ---------- FAQ ---------- */
details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 0 1.4rem; margin-bottom: .8rem; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 1.1rem 2rem 1.1rem 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--sky-mid); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding-bottom: .4rem; }

/* ---------- Order form ---------- */
.order-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink); margin: 1rem 0 .35rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--page);
  border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: .8rem .9rem;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(63, 130, 187, .35); border-color: var(--sky-mid); }
textarea { min-height: 110px; resize: vertical; }
.err { color: #b3261e; font-size: .85rem; margin-top: .35rem; display: none; }
.invalid + .err { display: block; }
.invalid { border-color: #b3261e; }
.contact-card { background: var(--navy); color: #d6e4f6; border-radius: var(--radius-l); padding: 2rem; }
.contact-card h3 { color: #fff; font-size: 1.4rem; }
.contact-card a { color: #fff; }
.contact-card a.btn-light { color: var(--navy); }
.contact-card .num { font-size: 1.6rem; font-weight: 700; color: #fff; letter-spacing: -.01em; display: block; margin: .3rem 0 1.2rem; text-decoration: none; }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(115deg, var(--sky-deep), var(--sky-mid)); color: #fff; border-radius: var(--radius-l); padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; position: relative; overflow: hidden; }
.cta h2 { color: #fff; margin-bottom: .3rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta p { margin: 0; color: rgba(255, 255, 255, .92); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #b4c5de; padding: 4rem 0 2rem; font-size: .92rem; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #b4c5de; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer a.btn { color: #fff; text-decoration: none; }
.site-footer .brand { color: #fff; margin-bottom: .8rem; }
.legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.4rem; font-size: .82rem; color: #8ea3c2; }
.legal p { max-width: none; margin-bottom: .4rem; }

/* ---------- Floating WhatsApp ---------- */
.wa-float { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90; display: inline-flex; align-items: center; gap: .55rem; background: #1fa855; color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; padding: .85rem 1.15rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.wa-float:hover { background: #178a45; color: #fff; }
.wa-float svg { width: 22px; height: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .split, .order-grid, .sim { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .hero-frame { max-width: 520px; aspect-ratio: 4 / 3.6; }
  .hero-chip { left: 1rem; bottom: 1rem; }
  .trio, .facts, .grid-3, .gallery { grid-template-columns: 1fr; gap: 1.6rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > :first-child { grid-column: 1 / -1; }
  .stack { padding-left: 2rem; }
  .nav-toggle { display: block; }
  .nav-links { position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: .6rem 1.25rem 1.3rem; border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .8rem 0; }
  .nav-cta.desktop { display: none; }
}
@media (max-width: 600px) {
  .grid-2, .form .row, .gallery { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .wa-float span { display: none; }
  .wa-float { padding: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .larva .seg, .crawl-strip .lw, .walk .lw { animation: none !important; }
  .crawl-strip .lw { left: 12%; }
  .crawl-strip .lw:nth-child(2) { left: 45%; }
  .crawl-strip .lw:nth-child(3) { left: 75%; }
  .btn:hover { transform: none; }
}


/* Refined, calm visual language: keep illustrations still and let layout do the work. */
.larva .seg { animation: none !important; }
.crawl-strip, .walk { display: none !important; }
.card, .gallery figure, .form, .note { transition: box-shadow .18s ease, border-color .18s ease; }
.card:hover, .gallery figure:hover { transform: translateY(-2px); }
.btn { transition: background-color .18s ease, box-shadow .18s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
