/* ═══════════════════════════════════════════════════════════
   LMC Healthcare — concept landing page
   Palette drawn from lmc.ca: olive green #97a822, lime #c0d127
   Type: Fraunces (display) + Inter (text)
   ═══════════════════════════════════════════════════════════ */

:root {
  --green: #97a822;
  --green-deep: #6d7a16;
  --lime: #c0d127;
  --ink: #171a0b;
  --night: #10120a;
  --night-2: #181c0e;
  --paper: #fbfcf5;
  --paper-2: #f3f5e8;
  --body: #3d4230;
  --muted: #6b7059;
  --line: rgba(23, 26, 11, 0.1);
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 24px 60px -24px rgba(23, 26, 11, 0.22);
  --font-d: "Fraunces", Georgia, serif;
  --font-t: "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-t);
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

h1, h2 { font-family: var(--font-d); font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; max-width: 21ch; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--green-deep); margin-bottom: 18px;
}
.eyebrow.light { color: var(--lime); }
.section { padding: 110px 0; }
.section-alt { background: var(--paper-2); }
.section-lead { max-width: 54ch; margin-top: 18px; font-size: 17px; line-height: 1.65; color: var(--muted); }

/* RTL-agnostic reveal animation (only when JS is running, so content
   is never hidden for a visitor whose script failed to load) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(0.2,0.6,0.2,1), transform 0.8s cubic-bezier(0.2,0.6,0.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ══════════ NAV ══════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.35s, box-shadow 0.35s, backdrop-filter 0.35s;
}
.nav.scrolled {
  background: rgba(251, 252, 245, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 9px; }
.brand-name { font-family: var(--font-d); font-size: 20px; font-weight: 600; color: var(--paper); transition: color 0.35s; }
.brand-name em { font-style: normal; font-weight: 400; opacity: 0.75; }
.nav.scrolled .brand-name { color: var(--ink); }
.nav-links { display: flex; gap: 26px; margin-inline-start: 12px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: rgba(251,252,245,0.82); transition: color 0.3s; }
.nav.scrolled .nav-links a { color: var(--body); }
.nav-links a:hover { color: var(--lime); }
.nav.scrolled .nav-links a:hover { color: var(--green-deep); }
.nav-right { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex; gap: 2px; padding: 3px;
  background: rgba(251,252,245,0.12); border-radius: 11px;
  transition: background 0.35s;
}
.nav.scrolled .lang-switch { background: rgba(23,26,11,0.06); }
.lang-switch button {
  padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  color: rgba(251,252,245,0.75); transition: all 0.25s;
}
.nav.scrolled .lang-switch button { color: var(--muted); }
.lang-switch button.active { background: var(--green); color: #fff !important; }
.lang-switch button:not(.active):hover { color: var(--lime); }

/* ══════════ BUTTONS ══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 12px;
  font-size: 15px; font-weight: 600; transition: all 0.3s;
}
.btn-sm { padding: 10px 20px; font-size: 13.5px; }
.btn-lg { padding: 18px 38px; font-size: 16.5px; }
.btn-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 12px 30px -10px rgba(151, 168, 34, 0.65);
}
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); }
.btn-voice {
  background: rgba(251,252,245,0.1); color: var(--paper);
  border: 1px solid rgba(251,252,245,0.28);
  backdrop-filter: blur(8px);
}
.btn-voice:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }
.mic-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.5; transform: scale(0.8);} }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-deep); }

/* ══════════ HERO ══════════ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  background: var(--night);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.blob-1 { width: 60vw; height: 60vw; background: radial-gradient(circle, #3d470f, transparent 65%); top: -18vw; inset-inline-end: -12vw; animation: drift1 22s ease-in-out infinite alternate; }
.blob-2 { width: 44vw; height: 44vw; background: radial-gradient(circle, rgba(151,168,34,0.5), transparent 65%); bottom: -14vw; inset-inline-start: -10vw; animation: drift2 26s ease-in-out infinite alternate; }
.blob-3 { width: 30vw; height: 30vw; background: radial-gradient(circle, rgba(192,209,39,0.35), transparent 60%); top: 30%; inset-inline-start: 42%; animation: drift3 19s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-6vw, 5vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(5vw, -6vh) scale(1.08); } }
@keyframes drift3 { to { transform: translate(-4vw, 6vh) scale(0.92); } }
.rings { position: absolute; top: 50%; inset-inline-end: -12vw; transform: translateY(-50%); width: 56vw; height: 56vw; pointer-events: none; }
.rings span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(192, 209, 39, 0.13);
  animation: breathe 9s ease-in-out infinite;
}
.rings span:nth-child(2) { inset: 12%; border-color: rgba(192, 209, 39, 0.18); animation-delay: 1.4s; }
.rings span:nth-child(3) { inset: 26%; border-color: rgba(151, 168, 34, 0.22); animation-delay: 2.8s; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.05); opacity: 1; } }
.grain {
  position: absolute; inset: 0; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 1180px; margin: 0 auto; padding: 140px 24px 90px; width: 100%; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--lime); margin-bottom: 26px; }
.hero h1 {
  color: var(--paper);
  font-size: clamp(2.7rem, 6.6vw, 5.2rem);
  line-height: 1.04; max-width: 15ch;
}
.hero h1 .accent { color: var(--lime); font-style: italic; }
.lead { margin-top: 28px; max-width: 52ch; font-size: clamp(16px, 1.7vw, 18.5px); line-height: 1.7; color: rgba(251,252,245,0.72); }
.hero-ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.pills { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; }
.pills li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: rgba(251,252,245,0.6); }
.pills li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--lime); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 1.5px solid rgba(251,252,245,0.25); border-radius: 14px; }
.scroll-hint span { position: absolute; top: 7px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 3px; background: var(--lime); animation: scrollhint 2s infinite; }
@keyframes scrollhint { 0% { transform: translateY(0); opacity: 1;} 70% { transform: translateY(12px); opacity: 0;} 100% { opacity: 0;} }

/* ══════════ STATS ══════════ */
.stats { background: var(--night-2); border-top: 1px solid rgba(192,209,39,0.14); padding: 58px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-d); font-size: clamp(2.1rem, 3.6vw, 3rem); font-weight: 500; color: var(--lime); }
.stat-label { display: block; margin-top: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: rgba(251,252,245,0.55); }

/* ══════════ SERVICE CARDS ══════════ */
.cards { margin-top: 54px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: all 0.35s cubic-bezier(0.2,0.6,0.2,1);
  position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--green), var(--lime));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.card-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(151,168,34,0.12), rgba(192,209,39,0.2));
  display: flex; align-items: center; justify-content: center;
  color: var(--green-deep); margin-bottom: 20px;
}
.card-icon svg { width: 23px; height: 23px; }
.card h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin-bottom: 9px; font-family: var(--font-t); }
.card p { font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* ══════════ QUOTE ══════════ */
.quote-band { padding: 100px 0; background: var(--paper); }
.quote-band blockquote { max-width: 800px; margin: 0 auto; text-align: center; }
.quote-band p {
  font-family: var(--font-d); font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.35; color: var(--ink); font-style: italic; font-weight: 400;
}
.quote-band p::before { content: "“"; color: var(--green); }
.quote-band p::after { content: "”"; color: var(--green); }
.quote-band cite { display: block; margin-top: 24px; font-style: normal; font-size: 13.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ══════════ LOCATIONS ══════════ */
.loc-grid { margin-top: 46px; display: flex; flex-wrap: wrap; gap: 12px; }
.loc {
  padding: 13px 22px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--body);
  display: flex; align-items: center; gap: 9px; transition: all 0.3s;
}
.loc:hover { border-color: var(--green); color: var(--green-deep); transform: translateY(-2px); }
.loc::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.loc.province { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; }
.loc.province::before { background: var(--lime); }

/* ══════════ PORTAL ══════════ */
.portal { background: var(--night); padding: 110px 0; position: relative; overflow: hidden; }
.portal::before {
  content: ""; position: absolute; width: 46vw; height: 46vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(151,168,34,0.22), transparent 65%);
  filter: blur(70px); top: -10vw; inset-inline-end: -8vw;
}
.portal-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 70px; align-items: center; position: relative; }
.portal h2 { color: var(--paper); }
.portal-text > p:not(.eyebrow) { margin-top: 20px; font-size: 16.5px; line-height: 1.7; color: rgba(251,252,245,0.65); max-width: 50ch; }
.portal-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 10px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  background: rgba(251,252,245,0.08); color: rgba(251,252,245,0.85);
  border: 1px solid rgba(251,252,245,0.14);
}
.portal-card {
  background: rgba(251,252,245,0.05); border: 1px solid rgba(192,209,39,0.2);
  border-radius: 22px; padding: 34px; backdrop-filter: blur(10px);
}
.pc-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid rgba(251,252,245,0.07); }
.pc-dot { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, rgba(151,168,34,0.4), rgba(192,209,39,0.25)); flex-shrink: 0; }
.pc-line { height: 9px; border-radius: 5px; background: rgba(251,252,245,0.14); }
.w60 { width: 60%; } .w80 { width: 80%; } .w45 { width: 45%; }
.pc-btn {
  margin-top: 26px; padding: 14px; text-align: center; border-radius: 12px;
  background: var(--green); color: #fff; font-weight: 700; font-size: 14.5px;
}

/* ══════════ BOOK ══════════ */
.book { padding: 120px 0; background: var(--paper); }
.book-inner { text-align: center; }
.book h2 { margin: 0 auto; }
.book p { margin: 20px auto 0; max-width: 46ch; font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.book-ctas { margin-top: 40px; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ══════════ FOOTER ══════════ */
.footer { background: var(--night); padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.f-brand { display: flex; gap: 14px; align-items: center; }
.f-brand img { border-radius: 8px; }
.f-name { font-family: var(--font-d); font-size: 16px; color: var(--paper); }
.f-addr { font-size: 12.5px; color: rgba(251,252,245,0.45); margin-top: 3px; }
.f-demo { font-size: 12px; color: rgba(192,209,39,0.75); max-width: 40ch; text-align: end; }

/* ══════════ AI ASSISTANT ══════════ */
.agent-fab {
  position: fixed; bottom: 26px; inset-inline-end: 26px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--lime));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px -8px rgba(151,168,34,0.75);
  transition: transform 0.3s;
}
.agent-fab:hover { transform: scale(1.08); }
.agent-panel {
  position: fixed; bottom: 100px; inset-inline-end: 26px; z-index: 95;
  width: min(400px, calc(100vw - 32px));
  height: min(600px, calc(100dvh - 130px));
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 90px -20px rgba(23,26,11,0.4);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.98);
  transition: all 0.32s cubic-bezier(0.2,0.6,0.2,1);
}
.agent-panel.open { opacity: 1; visibility: visible; transform: none; }
.ap-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; background: var(--night); color: var(--paper);
}
.ap-id { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.ap-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--green), var(--lime)); display: flex; align-items: center; justify-content: center; }
.ap-avatar img { border-radius: 4px; }
.ap-name { font-size: 14px; font-weight: 700; }
.ap-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(251,252,245,0.55); margin-top: 2px; }
.ap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.ap-langs { display: flex; gap: 3px; }
.ap-langs button {
  padding: 5px 9px; border-radius: 8px; font-size: 11px; font-weight: 700;
  color: rgba(251,252,245,0.6); transition: all 0.2s;
}
.ap-langs button.active { background: var(--green); color: #fff; }
.ap-close { color: rgba(251,252,245,0.6); font-size: 15px; padding: 6px; }
.ap-close:hover { color: #fff; }
.ap-body { flex: 1; position: relative; overflow: hidden; background: var(--paper); }
.ap-messages { position: absolute; inset: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 16px; font-size: 13.8px; line-height: 1.55; }
.msg.bot { background: #fff; border: 1px solid var(--line); color: var(--body); border-start-start-radius: 5px; align-self: flex-start; }
.msg.user { background: var(--green); color: #fff; border-start-end-radius: 5px; align-self: flex-end; }
.msg a { color: var(--green-deep); text-decoration: underline; }
.msg.user a { color: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; } .typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0);} 30% { transform: translateY(-5px);} }

.ap-voice { position: absolute; inset: 0; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.av-orb {
  width: 110px; height: 110px; border-radius: 50%; position: relative;
  background: linear-gradient(135deg, var(--green), var(--lime));
  box-shadow: 0 0 60px -10px rgba(151,168,34,0.7);
  transition: transform 0.4s;
}
.av-orb.listening { animation: orbpulse 1.6s infinite; }
.av-orb.speaking { transform: scale(1.06); box-shadow: 0 0 80px -6px rgba(192,209,39,0.9); }
.av-orb.thinking { transform: scale(0.92); opacity: 0.8; }
@keyframes orbpulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.07);} }
.av-ring { position: absolute; inset: -14px; border: 1.5px solid rgba(151,168,34,0.3); border-radius: 50%; animation: ringx 2.4s infinite; }
.av-ring.r2 { inset: -28px; animation-delay: 0.5s; }
@keyframes ringx { 0% { transform: scale(0.9); opacity: 1;} 100% { transform: scale(1.15); opacity: 0;} }
.av-label { font-weight: 700; font-size: 16px; color: var(--ink); }
.av-sub { font-size: 13px; color: var(--muted); min-height: 18px; max-width: 90%; }
.ap-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #fff; border-top: 1px solid var(--line); }
.ap-mic {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: rgba(151,168,34,0.12); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center; transition: all 0.25s;
}
.ap-mic:hover { background: var(--green); color: #fff; }
#agentInput {
  flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 16px; font-size: 13.8px; font-family: inherit; color: var(--ink);
  outline: none; transition: border 0.25s; background: var(--paper);
}
#agentInput:focus { border-color: var(--green); }
.ap-send {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background 0.25s;
}
.ap-send:hover { background: var(--green-deep); }
.ap-note { padding: 8px 14px 12px; text-align: center; font-size: 10.5px; color: var(--muted); background: #fff; }

/* ══════════ RTL & responsive ══════════ */
[dir="rtl"] .msg.bot { border-radius: 16px; border-start-end-radius: 5px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .portal-inner { grid-template-columns: 1fr; gap: 44px; }
  .f-demo { text-align: start; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .section { padding: 78px 0; }
  .nav-inner { gap: 12px; }
  .brand-name { display: none; }
  .btn-sm { padding: 9px 14px; font-size: 12.5px; }
}
