/* Layout: sticky brand header, one view shown at a time (hash routing), deep-blue hero bands with orange accents, wide footer. */
:root {
  --blue: #1050a6;
  --blue-deep: #0b3a7a;
  --orange: #f28c1e;
  --orange-ink: #b85c00;
  --green: #1f9d55;
  --bg: #ffffff;
  --bg-soft: #f3f6fb;
  --surface: #ffffff;
  --fg: #14213a;
  --muted: #55627a;
  --line: #dde4ef;
  --hero-bg: #0b3a7a;
  --hero-fg: #ffffff;
  --hero-muted: #c7d6f0;
  --ico-blue-bg: #e6eefa;
  --ico-orange-bg: #fdf0e1;
  --ico-green-bg: #e3f5ea;
  --shadow: 0 10px 30px rgba(16, 52, 110, 0.08);
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #6ea4f0; --blue-deep: #3d7ad6; --orange: #f5a04a; --orange-ink: #f5a04a; --green: #3cc47a;
    --bg: #0c1424; --bg-soft: #111c31; --surface: #15223a; --fg: #e8eef8; --muted: #a2b0c8; --line: #243453;
    --hero-bg: #0a2550; --hero-fg: #ffffff; --hero-muted: #b9cbe9;
    --ico-blue-bg: #1b2f52; --ico-orange-bg: #3a2a16; --ico-green-bg: #163a28;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --blue: #6ea4f0; --blue-deep: #3d7ad6; --orange: #f5a04a; --orange-ink: #f5a04a; --green: #3cc47a;
  --bg: #0c1424; --bg-soft: #111c31; --surface: #15223a; --fg: #e8eef8; --muted: #a2b0c8; --line: #243453;
  --hero-bg: #0a2550; --hero-fg: #ffffff; --hero-muted: #b9cbe9;
  --ico-blue-bg: #1b2f52; --ico-orange-bg: #3a2a16; --ico-green-bg: #163a28;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(48px, 7vw, 84px); }
.section-head { display: grid; gap: 8px; margin-bottom: 36px; max-width: 46rem; }
.eyebrow { font: 600 0.78rem/1.2 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-ink); }
.band { background: var(--bg-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 600 0.98rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-orange { background: #f28c1e; color: #1b1200; }
.btn-orange:hover { background: #ff9d33; box-shadow: 0 6px 18px rgba(242, 140, 30, .35); }
.btn-blue { background: #1050a6; color: #fff; }
.btn-blue:hover { background: #0b3a7a; }
.btn-whatsapp { background: #1f9d55; color: #fff; }
.btn-whatsapp:hover { background: #188046; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-ghost-dark { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost-dark:hover { border-color: var(--blue); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn-block { width: 100%; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font: 800 1.35rem/1 var(--font-display); letter-spacing: .02em; color: var(--blue); }
.brand-text small { font: 600 .72rem/1.3 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.x { color: var(--orange); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--fg); font-weight: 500; font-size: .95rem;
}
.site-nav a:not(.btn):hover { background: var(--bg-soft); }
.site-nav a.active:not(.btn) { color: var(--blue); box-shadow: inset 0 -2px 0 var(--orange); border-radius: 0; }
.nav-login { margin-left: 8px; padding: 9px 20px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--fg); border-radius: 2px; }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a.active:not(.btn) { box-shadow: inset 3px 0 0 var(--orange); padding-left: 14px; }
  .nav-login { margin: 12px 0 0; }
}

/* Home hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 460px; height: 460px; border-radius: 50%;
  border: 56px solid rgba(242, 140, 30, .16); pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 96px); position: relative; z-index: 1; }
.hero-copy { display: grid; gap: 18px; min-width: 0; }
.hero .eyebrow { color: #ffb466; }
.hl { color: #ffa53d; }
.tagline { display: flex; flex-wrap: wrap; gap: 6px 12px; font: 600 1.05rem/1.3 var(--font-display); color: #fff; }
.tagline i { color: #ffa53d; font-style: normal; }
.lead { color: var(--hero-muted); font-size: 1.06rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); border-radius: 20px;
  padding: 26px; display: grid; gap: 18px; min-width: 0;
}
.hero-card-title { font: 600 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--hero-muted); }
.app-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.app-pills a {
  display: inline-block; padding: 9px 16px; border-radius: 999px; background: #fff; color: #0b3a7a;
  font-weight: 600; font-size: .92rem; text-decoration: none;
}
.app-pills li:nth-child(2n) a { background: #f28c1e; color: #1b1200; }
.hero-call { display: grid; gap: 2px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; }
.hero-call span { font-size: .85rem; color: var(--hero-muted); }
.hero-phone { font: 700 1.6rem/1.2 var(--font-display); color: #fff; text-decoration: none; font-variant-numeric: tabular-nums; }

/* Grids & cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature {
  display: grid; gap: 12px; align-content: start; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--fg);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.feature:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.feature p { color: var(--muted); }
.ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; flex: none; }
.ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-blue { background: var(--ico-blue-bg); color: var(--blue); }
.ico-orange { background: var(--ico-orange-bg); color: var(--orange-ink); }
.ico-green { background: var(--ico-green-bg); color: var(--green); }

.why-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.why-list li { display: grid; gap: 4px; padding-left: 18px; border-left: 3px solid var(--orange); }
.why-list strong { font-family: var(--font-display); font-size: 1.1rem; }
.why-list span { color: var(--muted); }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta p { color: var(--muted); margin-top: 6px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-inline { margin-top: 56px; padding: 28px; border-radius: var(--radius); background: var(--bg-soft); }

/* Inner page hero */
.page-hero { background: var(--hero-bg); color: var(--hero-fg); }
.page-hero .wrap { padding-block: clamp(40px, 6vw, 72px); display: grid; gap: 12px; }
.page-hero .eyebrow { color: #ffb466; }
.page-lead { color: var(--hero-muted); font-size: 1.06rem; max-width: 40rem; }
.page-hero-wa { background: linear-gradient(120deg, var(--hero-bg) 55%, #0f6a43); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.memorial { margin: 0; display: grid; gap: 16px; position: sticky; top: 100px; }
.memorial-frame { padding: 10px; border-radius: 18px; background: linear-gradient(135deg, #1050a6, #f28c1e); }
.memorial-frame img { border-radius: 10px; width: 100%; aspect-ratio: 1 / 1.02; object-fit: cover; }
.memorial figcaption { text-align: center; display: grid; gap: 2px; }
.memorial-label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.memorial figcaption strong { font: 700 1.25rem/1.3 var(--font-display); }
.about-copy { display: grid; gap: 18px; max-width: 40rem; min-width: 0; }
.about-copy p { font-size: 1.05rem; }
.name-origin { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg-soft); display: grid; gap: 14px; }
.name-origin-title { font: 600 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.name-parts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.part { display: grid; gap: 2px; text-align: center; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 92px; }
.syll { font: 800 1.6rem/1 var(--font-display); letter-spacing: .04em; }
.part-blue .syll { color: var(--blue); }
.part-orange .syll { color: var(--orange-ink); }
.src { font-size: .85rem; color: var(--muted); }
.src b { color: var(--fg); }
.plus { font: 700 1.4rem/1 var(--font-display); color: var(--muted); }
.name-result { font: 600 1.1rem/1 var(--font-display); }
.name-result strong { font-size: 1.7rem; letter-spacing: .03em; color: var(--blue); }
.signoff { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.signoff span { font-family: var(--font-body); font-weight: 400; font-size: .92rem; color: var(--muted); }
.values h3 { color: var(--blue); margin-bottom: 8px; }
.values p { color: var(--muted); }

/* Services */
.group-title { margin: 0 0 22px; display: flex; align-items: center; gap: 14px; }
.group-title::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.services-grid + .group-title { margin-top: 56px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.service {
  display: grid; gap: 12px; align-content: start; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; min-width: 0;
}
.service ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.service li { position: relative; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.service li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.service p { color: var(--muted); }
.service-link { border-style: dashed; transition: border-color .15s; }
.service-link:hover { border-color: var(--green); }
.more { color: var(--green); font-weight: 600; font-size: .92rem; }

/* WhatsApp & SMS */
.msg-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.msg-cols { display: grid; gap: 36px; }
.msg-col h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; color: var(--muted); }
.ticks li strong { color: var(--fg); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--ico-green-bg); color: var(--green);
}
.phone-demo { display: grid; gap: 10px; justify-items: center; }
.phone { width: 100%; max-width: 320px; border-radius: 28px; border: 8px solid #1b2433; overflow: hidden; background: #e8dfd4; box-shadow: var(--shadow); }
.phone-top { display: flex; align-items: center; gap: 10px; background: #0f6a43; color: #fff; padding: 12px 14px; font-weight: 600; }
.phone-top small { display: block; font-weight: 400; font-size: .75rem; opacity: .8; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #f28c1e; color: #1b1200; display: grid; place-items: center; font-weight: 800; }
.chat { padding: 16px 12px 22px; display: grid; gap: 10px; min-height: 230px; align-content: start; }
.bubble { background: #ffffff; color: #1b2433; padding: 10px 12px; border-radius: 4px 12px 12px 12px; font-size: .9rem; line-height: 1.45; max-width: 92%; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.demo-note { font-size: .82rem; color: var(--muted); text-align: center; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.contact-cards { display: grid; gap: 18px; }
.contact-card { display: flex; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.contact-card > div { display: grid; gap: 8px; min-width: 0; }
.contact-card p { color: var(--muted); }
.contact-card .big { font: 700 1.3rem/1.3 var(--font-display); overflow-wrap: anywhere; }
.contact-card .big a { color: var(--fg); text-decoration: none; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.text-link { font-weight: 600; text-decoration: none; }
.enquiry { display: grid; gap: 8px; padding: 28px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line); }
.enquiry h2 { margin-bottom: 2px; }
.form-note { color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.enquiry label { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.enquiry input, .enquiry select, .enquiry textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 1rem;
}
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
.enquiry .btn-block { margin-top: 12px; }
.form-error { color: #c0392b; font-size: .9rem; font-weight: 600; }
.form-fallback { font-size: .9rem; color: var(--muted); }

/* Login */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.app-tile {
  display: grid; justify-items: center; gap: 10px; padding: 28px 18px; text-align: center; cursor: pointer;
  border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--fg); font: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.app-tile:hover, .app-tile.selected { border-color: var(--orange); transform: translateY(-2px); box-shadow: var(--shadow); }
.app-tile .ico { width: 60px; height: 60px; border-radius: 16px; }
.app-tile .ico svg { width: 32px; height: 32px; }
.app-tile strong { font: 700 1.2rem/1.2 var(--font-display); }
.app-tile small { color: var(--muted); font-size: .85rem; }
.login-status { margin-top: 26px; padding: 18px 20px; border-radius: 12px; background: var(--ico-orange-bg); border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent); }
.login-status strong { font-family: var(--font-display); }
.login-status a { font-weight: 600; }
.login-help { margin-top: 26px; color: var(--muted); }

/* Footer */
.site-footer { background: #08214a; color: #c7d6f0; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ffa53d; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 32px; padding-block: 48px 32px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; background: #fff; }
.footer-brand strong { color: #fff; font: 700 1.15rem/1.3 var(--font-display); }
.footer-brand p { font-size: .88rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; align-content: start; }
.footer-contact { display: grid; gap: 8px; font-size: .95rem; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); padding-block: 18px 24px; font-size: .85rem; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; z-index: 40;
  right: calc(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: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.25);
}
.wa-float svg { width: 32px; height: 32px; }

/* Page switch animation */
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner, .about-grid, .msg-layout, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .memorial { position: static; max-width: 380px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .why-list { grid-template-columns: minmax(0, 1fr); }
  .brand-text strong { font-size: 1.15rem; }
  .hero-phone { font-size: 1.35rem; }
  .contact-card { flex-direction: column; }
  .cta-actions .btn { flex: 1 1 auto; }
  .part { min-width: 0; padding: 8px 12px; }
  .syll { font-size: 1.35rem; }
}
