/* =============================================================
   Sonic Care — Landing Page Styles
   Mobile-first. Brand theme lives in :root custom properties.
   ============================================================= */

/* ---------- Theme tokens ---------- */
:root {
  --brand: #0b5fb0;          /* professional blue */
  --brand-dark: #084683;
  --brand-light: #e8f1fb;
  --accent: #f59e0b;         /* amber CTA */
  --accent-dark: #d97f06;
  --ink: #11203a;            /* headings */
  --body: #44546b;           /* body text */
  --muted: #7b8aa0;
  --line: #e4e9f1;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(11, 95, 176, 0.10);
  --shadow-sm: 0 4px 14px rgba(17, 32, 58, 0.08);
  --container: 1140px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section__head p { color: var(--muted); margin: 0; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); background: var(--brand-light);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer; border: 2px solid transparent;
  padding: 13px 22px; border-radius: var(--radius-sm); transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(245,158,11,.30); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-light); }
.btn--light { background: #fff; color: var(--brand); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.logo svg { color: var(--brand); }
.nav { display: none; align-items: center; gap: 26px; }
.nav a { color: var(--body); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--brand); }
.header__cta { display: none; }
.menu-toggle {
  display: inline-flex; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ink);
}
.mobile-nav {
  display: none; flex-direction: column; gap: 4px; padding: 8px 20px 16px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 10px 4px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, var(--brand-light), #fff 70%); padding: 40px 0 48px; }
.hero__grid { display: grid; gap: 28px; align-items: center; }
.hero__kicker { font-family: var(--font-head); font-weight: 700; color: var(--brand); font-size: clamp(1rem, 3.4vw, 1.3rem); letter-spacing: .01em; margin: 0 0 10px; text-shadow: 0 1px 2px rgba(11,95,176,.12); }
.hero__kicker i { color: var(--accent); font-style: normal; margin: 0 4px; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); text-shadow: 0 2px 6px rgba(17,32,58,.10); }
.hero__sub { font-size: 1.1rem; color: var(--body); max-width: 540px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

/* Photo-ready media slot (hero & about) */
.hero__media, .about__media { width: 100%; }
.media-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; min-height: 240px; padding: 24px;
  background: linear-gradient(135deg, #fff, var(--brand-light));
  border: 2px dashed #c3d6ee; border-radius: var(--radius); color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.media-ph span { font-weight: 600; color: var(--muted); max-width: 260px; font-size: .92rem; }

/* Trust strip (shared) */
.trust-strip { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.trust-strip li { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); font-size: .92rem; }
.trust-strip svg { color: var(--ok); flex: none; }

/* Trust bar below hero */
.trust-bar { background: var(--ink); color: #fff; padding: 16px 0; }
.trust-strip--bar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.trust-strip--bar li { color: #e7eefb; font-size: .88rem; justify-content: flex-start; white-space: nowrap; }
.trust-strip--bar svg { color: var(--accent); }

/* ---------- Booking form ---------- */
.booking { scroll-margin-top: 80px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.form-grid { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; color: var(--ink); font-size: .9rem; }
.field label .req { color: var(--err); }
.field input, .field select, .field textarea {
  font: inherit; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; width: 100%;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--err); }
.field__error { color: var(--err); font-size: .8rem; min-height: 1em; display: none; }
.field.invalid .field__error { display: block; }
.form-note { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }

.form-success {
  display: none; text-align: center; padding: 18px;
  background: #ecfdf3; border: 1px solid #abefc6; border-radius: var(--radius); color: #05603a;
}
.form-success.show { display: block; }
.form-success .bid {
  display: inline-block; font-weight: 800; font-size: 1.25rem; color: var(--ink);
  background: #fff; border: 1px dashed var(--ok); padding: 8px 16px; border-radius: var(--radius-sm); margin: 8px 0;
}

/* ---------- OTP verification step ---------- */
.otp-panel { display: none; text-align: center; position: relative; padding: 4px 4px 6px; }
.otp-panel.show { display: block; }
.otp-back {
  position: absolute; left: 0; top: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--brand); padding: 4px;
}
.otp-icon { margin-top: 8px; }
.otp-panel h3 { font-size: 1.25rem; }
#otpCode {
  font: inherit; font-weight: 800; font-size: 1.6rem; letter-spacing: .5em; text-indent: .5em;
  width: min(260px, 100%); text-align: center; padding: 12px 10px; margin: 0 auto;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); color: var(--ink);
}
#otpCode:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.otp-panel .field__error { display: none; margin-top: 8px; }
.otp-demo {
  margin: 12px auto 0; max-width: 320px; font-size: .85rem; font-weight: 600; color: var(--accent-dark);
  background: #fff7ea; border: 1px dashed var(--accent); border-radius: var(--radius-sm); padding: 8px 12px;
}
#otpTimer { color: var(--muted); }

/* ---------- Generic card grids ---------- */
.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--brand);
}
.card:active { transform: translateY(-2px); }
.card:hover .icon-badge { transform: scale(1.08) rotate(-3deg); }
.icon-badge {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand); margin-bottom: 14px;
  transition: transform .2s ease;
}
.card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card p { margin: 0; color: var(--body); font-size: .95rem; }

/* Service tiles (compact) */
.service-tile { text-align: left; }
.service-tile .icon-badge { background: var(--brand); color: #fff; }

/* ---------- How it works ---------- */
.steps { counter-reset: step; }
.grid--4.steps { grid-template-columns: 1fr; }   /* mobile: single-column timeline */
.step { position: relative; padding-left: 70px; min-height: 40px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 22px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1.05rem;
  display: grid; place-items: center;
}
.step h3 { margin-top: 6px; }

/* ---------- Pricing (catalogue) ---------- */
.price-cat, .premium-box { display: flex; flex-direction: column; text-align: left; }
.price-cat__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.price-cat__head .icon-badge { width: 42px; height: 42px; margin-bottom: 0; }
.price-cat__head h3 { margin: 0; font-size: 1.1rem; }
.price-cat__head h3 small { font-weight: 600; color: var(--muted); font-size: .8rem; }
.price-list { margin: 0 0 16px; display: grid; }
.price-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .95rem;
}
.price-list li:last-child { border-bottom: 0; }
.price-list li span { color: var(--body); }
.price-list li b { color: var(--ink); font-weight: 800; white-space: nowrap; }
.price-cat .btn, .premium-box .btn { margin-top: auto; }
.premium-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 16px; }
.premium-list li { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink); }
.premium-list li svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
.price-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin-top: 24px; }
.price-rules li {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: .85rem; font-weight: 700; color: var(--ink);
}
.price-rules li small { font-weight: 500; color: var(--muted); }

/* ---------- Reviews ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; text-align: center; }
.stat__num { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 800; color: var(--brand); }
.stat__label { font-size: .85rem; color: var(--muted); }
.review .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 8px; }
.review__author { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; }
.review__author b { color: var(--ink); display: block; font-size: .92rem; }
.review__author span { font-size: .8rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit;
  font-weight: 700; color: var(--ink); padding: 16px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq-q .chev { transition: transform .2s ease; flex: none; color: var(--brand); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { margin: 0; padding: 0 18px 16px; color: var(--body); font-size: .95rem; }

/* ---------- About Sonic ---------- */
.about__grid { display: grid; gap: 28px; align-items: center; }

/* ---------- Reviews (honest CTA) ---------- */
.reviews-cta { max-width: 640px; margin: 0 auto; text-align: center; }
.reviews-cta p { color: var(--body); }
.reviews-cta p strong { color: var(--ink); }

/* ---------- Booking journey (success state) ---------- */
.journey { display: grid; gap: 8px; text-align: left; max-width: 360px; margin: 4px auto 0; }
.journey li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink); font-weight: 600; }
.journey svg { flex: none; color: var(--ok); width: 20px; height: 20px; }

/* ---------- Service area ---------- */
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }
.area-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 4px; }
.area-chips li {
  display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--brand);
  background: var(--brand-light); border: 1px solid #d4e4f7; border-radius: 999px; padding: 6px 12px;
}
.area-chips svg { width: 15px; height: 15px; flex: none; }
.coverage-note { display: flex; align-items: center; justify-content: center; text-align: center; gap: 10px; margin-top: 16px; font-weight: 600; color: var(--ink); }
.coverage-note svg { color: var(--brand); flex: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c4d0e0; padding: 48px 0 30px; }
.footer a { color: #c4d0e0; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer .logo svg { color: var(--accent); }
.footer ul { display: grid; gap: 9px; }
.footer__contact li { display: flex; gap: 9px; font-size: .92rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; font-size: .85rem; color: var(--muted);
}

/* ---------- Floating action buttons (Call + WhatsApp) ---------- */
.float-stack {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: flex; flex-direction: column; gap: 12px;
}
.float-btn {
  width: 56px; height: 56px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; transition: transform .15s ease;
}
.float-btn:hover { transform: scale(1.06); }
.call-float { background: var(--brand); box-shadow: 0 10px 24px rgba(11,95,176,.45); }
.wa-float { background: #25d366; box-shadow: 0 10px 24px rgba(37,211,102,.45); }

/* ---------- Booking modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(11,24,45,.55); backdrop-filter: blur(2px); }
.modal__dialog {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto;
  background: var(--bg); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(11,24,45,.35);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal__head {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
}
.modal__head h3 { margin: 0; font-size: 1.2rem; }
.modal__close {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--bg-soft); color: var(--ink); cursor: pointer; transition: background .15s ease;
}
.modal__close:hover { background: var(--line); }
.modal__body { padding: 18px 20px 22px; }
/* Inside the modal the form-card is flush (no double border/shadow) */
.modal__body .form-card { max-width: none !important; margin: 0 !important; border: 0; box-shadow: none; padding: 0; }

/* ---------- Invoice payment page (pay.html) ---------- */
.pay-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(160deg, var(--brand-light), #fff 70%); }
.pay-card { width: 100%; max-width: 460px; }
.pay-amount { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--ink);
  text-align: center; margin: 6px 0 14px; }
.pay-meta { display: grid; gap: 0; margin: 0 0 18px; }
.pay-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--line); font-size: .95rem; }
.pay-meta li:last-child { border-bottom: 0; }
.pay-meta li span { color: var(--muted); }
.pay-meta li b { color: var(--ink); }
.pay-muted { color: var(--muted); font-size: .9rem; }
.pay-secure { text-align: center; color: var(--muted); font-size: .82rem; margin: 14px 0 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .grid--4.steps { grid-template-columns: 1fr 1fr; }   /* tablet: 2 per row */
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
  .trust-strip--bar { grid-template-columns: repeat(3, 1fr); }
  .about__grid { grid-template-columns: 1fr 1fr; }
  /* Center a lone last card on the final row of a 3-column grid (e.g. Why Trust's 7th, Reviews' 10th) */
  #whyGrid .card:last-child:nth-child(3n+1),
  #reviewGrid .card:last-child:nth-child(3n+1) { grid-column: 2; }
}
@media (min-width: 900px) {
  .section { padding: 72px 0; }
  .nav, .header__cta { display: flex; }
  .menu-toggle { display: none; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--4.steps { grid-template-columns: repeat(4, 1fr); }   /* desktop: 4 in a row */
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; }
  .trust-strip--bar { grid-template-columns: repeat(6, 1fr); }
  .trust-strip--bar li { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
