/* Alimaow Nursing Home public site.
   Layout: sticky header, full-width bands with a centred 1120px column, card grids that stack on phones.
   Brand: primary #0F4C81, secondary #14B8A6, background #F8FAFC, text #1E293B. */
:root {
  --primary: #0F4C81;
  --primary-ink: #ffffff;
  --primary-soft: #E2ECF6;
  --teal: #14B8A6;
  --teal-text: #0D8A7C;
  --teal-soft: #D6F5F0;
  --bg: #F8FAFC;
  --surface: #ffffff;
  --ink: #1E293B;
  --muted: #546278;
  --line: #DEE5EE;
  --warn-soft: #FEF3D6;
  --warn: #8A5300;
  --display: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #60A5E6; --primary-ink: #061628; --primary-soft: #142A42;
    --teal: #2DD4BF; --teal-text: #2DD4BF; --teal-soft: #0E3430;
    --bg: #0A111C; --surface: #111B2A; --ink: #E2E8F0; --muted: #94A3B8; --line: #243246;
    --warn-soft: #382A0A; --warn: #FBBF24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #60A5E6; --primary-ink: #061628; --primary-soft: #142A42;
  --teal: #2DD4BF; --teal-text: #2DD4BF; --teal-soft: #0E3430;
  --bg: #0A111C; --surface: #111B2A; --ink: #E2E8F0; --muted: #94A3B8; --line: #243246;
  --warn-soft: #382A0A; --warn: #FBBF24;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--teal-text); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* Header */
.top-line { background: var(--primary); color: var(--primary-ink); font-size: 15px; }
.top-line .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; padding-block: 7px; }
.top-line a { color: inherit; font-weight: 700; text-decoration: none; }
.top-line a:hover { text-decoration: underline; }
header.site { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand b { font-family: var(--display); font-size: 19px; display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 13px; }
nav.main { margin-left: auto; display: flex; gap: 4px; }
nav.main a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 8px; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 8px 12px; font: 600 15px var(--body); cursor: pointer; }
.theme-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 8px; }
.theme-btn:hover { background: var(--primary-soft); color: var(--ink); }
.theme-btn svg { width: 20px; height: 20px; display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 10px; font: 700 16px var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.wa { background: #25D366; color: #06331A; }
.btn svg { width: 20px; height: 20px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; right: -160px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: var(--teal-soft); opacity: .8; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding-block: 64px 72px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 700; margin-top: 12px; }
.hero h1 .accent { color: var(--teal-text); }
.hero .lead { font-size: 20px; color: var(--muted); margin-top: 18px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: 0 18px 40px -24px rgba(15, 76, 129, .35); }
.hero-card h2 { font-size: 20px; }
.hero-card ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.hero-card li { display: flex; gap: 12px; }
.hero-card .ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.hero-card .ico svg { width: 20px; height: 20px; }
.hero-card b { display: block; }
.hero-card span { color: var(--muted); font-size: 15px; }

/* Sections */
section.band { padding-block: 72px; }
section.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 8px; }
.section-head p { max-width: 36em; color: var(--muted); margin-top: 10px; }

.about { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; }
.about p.big { font-size: 20px; line-height: 1.6; color: var(--muted); margin-top: 16px; max-width: 34em; }
.mv { display: grid; gap: 16px; }
.mv .card h3 { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--body); }
.mv .card p { margin-top: 8px; font-size: 18px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; min-width: 0; }
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.svc { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
a.svc:hover { border-color: var(--primary); transform: translateY(-2px); }
.svc .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.svc .ico svg { width: 24px; height: 24px; }
.svc h3 { font-size: 20px; }
.svc p { color: var(--muted); font-size: 16px; }
.svc .more { margin-top: auto; font-weight: 700; color: var(--primary); font-size: 15px; }

.why { display: flex; gap: 16px; }
.why .dot { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-text); }
.why .dot svg { width: 22px; height: 22px; }
.why h3 { font-size: 18px; font-family: var(--body); font-weight: 700; }
.why p { color: var(--muted); font-size: 16px; margin-top: 4px; }

/* Services page detail */
.svc-detail { display: grid; grid-template-columns: auto 1fr; gap: 22px; scroll-margin-top: 100px; }
.svc-detail .ico { width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.svc-detail .ico svg { width: 28px; height: 28px; }
.svc-detail h2 { font-size: 26px; }
.svc-detail .sum { color: var(--teal-text); font-weight: 700; margin-top: 4px; }
.svc-detail p.body { color: var(--muted); margin-top: 10px; max-width: 46em; }
.svc-detail ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink); }
.svc-detail li { margin: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); }
.chips a:hover { border-color: var(--primary); color: var(--primary); }

/* Contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-text); }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list small { display: block; color: var(--muted); font-size: 14px; }
.contact-list a, .contact-list b { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; font-size: 18px; }
.contact-list a:hover { color: var(--primary); }
.map { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }
.map a { display: block; padding: 12px 16px; font-weight: 700; text-decoration: none; border-top: 1px solid var(--line); }
form.enquiry { display: grid; gap: 14px; }
label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 5px; }
input, textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 48px; }
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; }
.note { font-size: 14px; color: var(--muted); }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 14px 16px; font-weight: 600; }

.cta { background: var(--primary); color: var(--primary-ink); border-radius: 20px; padding: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta h2 { font-size: 28px; }
.cta p { opacity: .9; margin-top: 6px; }
.cta .btn.light { background: var(--primary-ink); color: var(--primary); }

.page-head { padding-block: 56px 24px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 50px); margin-top: 8px; }
.page-head p { font-size: 20px; color: var(--muted); margin-top: 12px; max-width: 38em; }

article.prose { max-width: 760px; }
article.prose h2 { font-size: 24px; margin-top: 34px; }
article.prose p { color: var(--muted); margin-top: 10px; }

/* Footer */
footer.site { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 32px; padding-block: 48px; }
footer.site h2 { font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-family: var(--body); margin-bottom: 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer.site a { color: var(--ink); text-decoration: none; }
footer.site a:hover { color: var(--primary); }
footer.site .base { border-top: 1px solid var(--line); padding-block: 16px; font-size: 14px; color: var(--muted); }

.wa-float { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #06331A; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0,0,0,.45); z-index: 30; }
.wa-float svg { width: 30px; height: 30px; }

@media (max-width: 900px) {
  .hero .wrap, .about { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  footer.site .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  nav.main { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px max(18px, env(safe-area-inset-left, 0px)) 16px; }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px; }
  .menu-btn { display: inline-flex; }
  .grid.three, .grid.two, .row2 { grid-template-columns: 1fr; }
  .hero .wrap { padding-block: 44px 52px; }
  section.band { padding-block: 52px; }
  .svc-detail { grid-template-columns: 1fr; }
  .cta { padding: 26px; }
  footer.site .cols { grid-template-columns: 1fr; }
  .top-line .wrap { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
