/* ============================================================
   Cubiqcloud Demo Clinic — styles
   Theme colours are injected per-clinic by render.js as CSS vars.
   ============================================================ */
:root {
  --brand: #0e8f8a;
  --brand-dark: #0a6f6b;
  --accent: #c9a24b;
  --ink: #14303a;
  --tint: #eaf6f5;

  --bg: #ffffff;
  --muted: #5b6b72;
  --line: #e6ecee;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -24px rgba(20, 48, 58, 0.35);
  --shadow-sm: 0 6px 20px -10px rgba(20, 48, 58, 0.28);
  --maxw: 1140px;
  --ff-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ff-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--ff-serif); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, iframe { max-width: 100%; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.ico { width: 24px; height: 24px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 0.5rem;
}
.eyebrow--center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--ghost:hover { background: rgba(0, 0, 0, 0.04); }
.btn--block { width: 100%; }
.btn.is-loading { opacity: 0.75; cursor: progress; }
.btn:disabled { cursor: not-allowed; }

/* ---------- Demo banner ---------- */
.demo-banner {
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  padding: 0.5rem 1.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
}
/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 0.75rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { font-size: 1.5rem; }
.brand__name { font-family: var(--ff-serif); font-weight: 600; font-size: 1.25rem; }
.nav { margin-left: auto; display: flex; gap: 1.6rem; }
.nav a { color: var(--ink); font-weight: 500; font-size: 0.96rem; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.nav__cta { padding-block: 0.6rem; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--tint), transparent 60%),
    linear-gradient(180deg, var(--tint) 0%, #fff 55%);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.hero__copy h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.hero__intro { font-size: 1.12rem; color: var(--muted); max-width: 34ch; margin-bottom: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.75rem; }
.hero__badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.hero__badges li { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.hero__badges .ico { color: var(--brand); width: 20px; height: 20px; }

/* ---------- Lead form card ---------- */
.hero__card { }
.lead-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 1.9rem);
}
.lead-form__title { font-size: 1.4rem; margin-bottom: 0.25rem; scroll-margin-top: 100px; }
.lead-form__sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.1rem; }
.field { margin-bottom: 0.85rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field textarea { resize: vertical; }
.lead-form .btn--block { margin-top: 0.4rem; }
.lead-form__consent { font-size: 0.76rem; color: var(--muted); text-align: center; margin-top: 0.75rem; }
.form-status {
  margin-top: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
}
.form-status--success { background: #e7f6ee; color: #1a6b3f; border: 1px solid #bfe6cf; }
.form-status--error { background: #fdecec; color: #a5282a; border: 1px solid #f3c6c6; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tint { background: var(--tint); }
.section__title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  text-align: center;
  margin-bottom: 2.5rem;
}
.section__title--left { text-align: left; margin-bottom: 1.25rem; }

/* ---------- Cards (services) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card__ico {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--brand);
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Features (why us) ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; }
.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature__ico {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.feature h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.member {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
}
.member__avatar {
  display: inline-grid;
  place-items: center;
  width: 76px; height: 76px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 600;
}
.member h3 { font-size: 1.15rem; }
.member p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.quote {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.quote__stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 0.6rem; }
.quote blockquote { margin: 0 0 1rem; font-size: 1rem; }
.quote figcaption { font-weight: 600; font-size: 0.9rem; }
.quote figcaption span { color: var(--muted); font-weight: 400; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact__list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; }
.contact__list li { display: flex; gap: 0.7rem; align-items: baseline; }
.contact__ico { flex: none; }
.contact__subhead { font-size: 1.1rem; margin-bottom: 0.6rem; }
.hours { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.hours th, .hours td { text-align: left; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.hours th { color: var(--ink); font-weight: 600; }
.hours td { text-align: right; color: var(--muted); }
.hours tr.is-closed td { color: #b23; }
.contact__map iframe {
  width: 100%;
  min-height: 380px;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #dfe8ea; padding-block: 2.5rem; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer .brand__name { color: #fff; }
.site-footer__note { color: #9fb3b8; font-size: 0.88rem; margin-top: 0.35rem; }
.site-footer__note a { color: #fff; text-decoration: underline; }
.site-footer__copy { color: #9fb3b8; font-size: 0.88rem; }

/* ---------- Chat widget ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; }
.chat-widget__bubble {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.2s ease;
}
.chat-widget__bubble:hover { transform: scale(1.06); background: var(--brand-dark); }
.chat-widget__panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(340px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: chatIn 0.16s ease;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chat-widget__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}
.chat-widget__header strong { display: block; font-size: 0.98rem; }
.chat-widget__header small { opacity: 0.85; font-size: 0.75rem; }
.chat-widget__avatar { font-size: 1.4rem; }
.chat-widget__close {
  margin-left: auto;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}
.chat-widget__close:hover { opacity: 1; }
.chat-widget__body { padding: 1rem; font-size: 0.92rem; color: var(--muted); display: grid; gap: 0.6rem; }
.chat-widget__footer { padding: 0.6rem 1rem; border-top: 1px solid var(--line); font-size: 0.72rem; color: var(--muted); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__card { order: -1; }
  .cards, .team, .quotes { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .site-header.is-open .nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-header.is-open .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .cards, .team, .quotes, .features { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Accessibility ---------- */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
