/* Habitat PMS — habitatpms.com */
:root {
  --ink: #141A2E;
  --text: #2A3147;
  --muted: #555E78;
  --line: #E3E6EF;
  --bg: #FFFFFF;
  --paper: #F5F6FB;
  --brand: #2F3FB8;
  --brand-ink: #24319A;
  --brand-soft: #E9ECFB;
  --coral: #FF8A65;
  --coral-ink: #B4431F;
  --night: #121735;
  --night-2: #1C2350;
  --on-night: #EEF0FA;
  --on-night-muted: #B9BFDD;
  --ok: #0B7A55;
  --ok-soft: #DDF4EA;
  --sim: #8A5300;
  --sim-soft: #FDEFD6;
  --cfg: #3B4C86;
  --cfg-soft: #E6EAF7;
  --r: 16px;
  --r-s: 10px;
  --shadow: 0 18px 50px rgba(20, 26, 46, .10);
  --f: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --header-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f); font-size: 17px; line-height: 1.8; overflow-x: hidden; }
html[lang="en"] body { line-height: 1.65; font-size: 16.5px; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; margin: 0; font-weight: 650; }
html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--brand-ink); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark { display: block; border-radius: 9px; }
.brand-word { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; direction: ltr; unicode-bidi: isolate; }
.brand-pms { font-weight: 500; font-size: 12px; margin-inline-start: 6px; padding: 2px 6px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); vertical-align: 3px; letter-spacing: .06em; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { font: inherit; font-size: 15px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.lang:hover { border-color: var(--brand); }
html[lang="en"] .lang { font-size: 16px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; border: 2px solid var(--brand); transition: background .2s, border-color .2s, transform .2s; }
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); transform: translateY(-1px); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 15px; white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--brand-ink); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-ink); }
.btn-light { background: #fff; color: var(--brand-ink); border-color: #fff; }
.btn-light:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-ink); }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1000px 500px at 85% -10%, var(--brand-soft), transparent 60%), radial-gradient(700px 400px at 0% 110%, #FFF1EB, transparent 60%); padding-block: 72px 80px; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--brand-ink); font-weight: 600; font-size: 15px; margin-bottom: 12px; }
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); margin-bottom: 20px; }
.lead { font-size: 19px; color: var(--text); }
html[lang="en"] .lead { font-size: 18.5px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 22px; color: var(--muted); font-size: 15px; }

.flow { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 26px 26px 18px; }
.flow-cap { font-weight: 600; color: var(--ink); font-size: 16px; margin-bottom: 14px; }
.flow-list { list-style: none; margin: 0; padding: 0; position: relative; }
.flow-list::before { content: ""; position: absolute; inset-inline-start: 9px; top: 14px; bottom: 30px; width: 2px; background: linear-gradient(var(--brand), var(--coral)); opacity: .35; }
.flow-list li { position: relative; padding-inline-start: 36px; padding-bottom: 16px; display: grid; }
.flow-list strong { color: var(--ink); font-weight: 600; }
.flow-list li > span:last-child { color: var(--muted); font-size: 15px; line-height: 1.6; }
.flow-dot { position: absolute; inset-inline-start: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--brand-soft); }
.d1 { background: #2F3FB8; } .d2 { background: #4E5BD0; } .d3 { background: #7A6FD6; } .d4 { background: #C878A8; } .d5 { background: #FF8A65; }

/* ---------- Sections ---------- */
.section { padding-block: 88px; }
.section h2, .band h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 16px; }
.section > .wrap > .lead, .band .lead { margin-bottom: 8px; }
.alt { background: var(--paper); }
.band { padding-block: 80px; background: var(--paper); border-block: 1px solid var(--line); }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.step-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps h3, .card h3, .how h3, .who h3 { font-size: 19px; margin-bottom: 8px; }
.steps p, .card p, .how p, .who p { color: var(--muted); font-size: 16px; }
html[lang="en"] .steps p, html[lang="en"] .card p, html[lang="en"] .how p, html[lang="en"] .who p { font-size: 15.5px; }

.grid { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: #C9CFF2; box-shadow: var(--shadow); transform: translateY(-2px); }
.ico { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--brand-soft); fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-inline-start: 32px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230B7A55' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; transform: translateY(-2px); }
html[lang="en"] .ticks li::before { top: .3em; }

.statement { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.st-head, .st-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st-title { font-weight: 650; color: var(--ink); font-size: 18px; }
.st-row, .st-total { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; font-size: 15px; color: var(--muted); }
.st-total { border-top: 1px solid var(--line); padding-top: 14px; color: var(--ink); font-weight: 600; }
.st-bar { height: 10px; border-radius: 99px; background: linear-gradient(90deg, #C9CFF2, #DCE0F7); justify-self: end; }
html[dir="ltr"] .st-bar { justify-self: start; }
.st-bar.strong { background: linear-gradient(90deg, var(--brand), #6A75D8); }
.w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; } .w30 { width: 30%; } .w20 { width: 20%; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-sim { background: var(--sim-soft); color: var(--sim); }
.chip-cfg { background: var(--cfg-soft); color: var(--cfg); }
.chip-muted { background: var(--paper); color: var(--muted); }

.how { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: how; }
.how li { counter-increment: how; border-top: 3px solid var(--brand); padding-top: 18px; }
.how li::before { content: counter(how, arabic-indic); display: block; color: var(--brand-ink); font-weight: 700; font-size: 15px; margin-bottom: 6px; }
html[lang="en"] .how li::before { content: "0" counter(how); }

/* ---------- Integrations (dark) ---------- */
.dark { background: var(--night); color: var(--on-night-muted); }
.dark h2 { color: #fff; }
.dark .eyebrow { color: #FFB59C; }
.dark .lead { color: var(--on-night-muted); }
.table-wrap { margin-top: 36px; overflow-x: auto; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .12); background: var(--night-2); }
.table-wrap:focus-visible { outline-offset: 2px; }
.int { width: 100%; border-collapse: collapse; font-size: 16px; }
.int th, .int td { text-align: start; padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); vertical-align: top; }
.int thead th { color: var(--on-night-muted); font-weight: 500; font-size: 14px; background: rgba(255, 255, 255, .03); }
.int tbody th { color: #fff; font-weight: 600; min-width: 170px; }
.int tbody td:last-child { color: var(--on-night-muted); }
.int tbody tr:last-child th, .int tbody tr:last-child td { border-bottom: 0; }
.dark .chip-ok { background: rgba(43, 196, 138, .16); color: #7FE3BB; }
.dark .chip-sim { background: rgba(255, 176, 64, .16); color: #FFCB80; }
.dark .chip-cfg { background: rgba(150, 165, 255, .16); color: #C3CBFF; }
.fine { margin-top: 18px; font-size: 15px; color: var(--on-night-muted); }

.who { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.who li { padding: 24px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); }

.powered { padding-block: 0 88px; }
.powered-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 22px; padding: 32px 36px; background: linear-gradient(120deg, #fff, var(--paper)); }
.powered h2 { margin-bottom: 6px; font-size: 28px; letter-spacing: .08em; }

.cta { background: linear-gradient(135deg, var(--brand) 0%, #3A2C9A 100%); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta .lead { color: #E3E6FB; margin-bottom: 28px; }
.cta-in { max-width: 720px; }
.cta-mail { margin-top: 18px; }
.cta-mail a { color: #fff; display: inline-block; padding: 10px; }

/* ---------- Footer ---------- */
.foot { background: var(--night); color: var(--on-night-muted); padding-block: 56px 36px; }
.foot .brand { color: #fff; }
.foot .brand-pms { background: rgba(255, 255, 255, .12); color: #fff; }
.foot a { color: var(--on-night); }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.foot-lines { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; }
.foot-lines a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; }

.group { margin-top: 36px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .12); }
.group-h { font-size: 17px; color: #fff; margin-bottom: 16px; font-weight: 600; }
.group-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.group-list a { display: block; height: 100%; padding: 11px 14px; border-radius: var(--r-s); text-decoration: none; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s; }
.group-list a:hover { border-color: rgba(255, 138, 101, .6); background: rgba(255, 255, 255, .06); }
.group-list strong { display: block; color: #fff; font-size: 15.5px; font-weight: 600; }
.group-list span { display: block; color: var(--on-night-muted); font-size: 13.5px; line-height: 1.5; }
.group-parent a { border-color: rgba(255, 138, 101, .5); }
.group-line { margin-top: 16px; font-size: 15px; }
.group-line a { color: #FFB59C; display: inline-flex; align-items: center; min-height: 44px; }
.copyright { font-size: 14px; margin-top: 22px; text-align: center; }

.trust { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 34px; margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); }
.trust > img { height: 44px; width: auto; }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-item img { height: 48px; width: auto; }
.trust p { color: var(--on-night-muted); font-size: 14px; line-height: 1.55; text-align: start; }
.trust small { font-size: 12.5px; }
.trust bdi { font-variant-numeric: tabular-nums; }

/* ---------- Documents and 404 ---------- */
.doc { padding-block: 56px 80px; max-width: 780px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 10px; }
.doc-meta { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.doc section { margin-top: 32px; }
.doc h2 { font-size: 22px; margin-bottom: 10px; }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: 64px; }
.lost-mark { width: 88px; height: 88px; margin: 0 auto 22px; }
.lost h1 { font-size: clamp(30px, 6vw, 48px); margin-bottom: 12px; }
.lost p { color: var(--muted); margin-bottom: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid, .how, .who { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .top-actions { margin-inline-start: auto; }
}
@media (max-width: 860px) {
  .hero-in, .split { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .hero { padding-block: 48px 56px; }
  .section { padding-block: 64px; }
  .powered { padding-block: 0 64px; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .grid, .how, .who, .steps { grid-template-columns: 1fr; }
  .top-in { gap: 10px; }
  .btn-sm { padding: 8px 14px; font-size: 14.5px; }
  .lang { padding: 8px 12px; font-size: 14.5px; }
  .brand-word { font-size: 18px; }
  .brand-pms { display: none; }
  .lead { font-size: 17.5px; }
  .foot-lines { gap: 0 18px; }
  .foot-lines > span[aria-hidden] { display: none; }
  .flow, .statement { padding: 20px; }
  .powered-in { padding: 26px 22px; }
  .int th, .int td { padding: 14px; }
  .int thead { display: none; }
  .int, .int tbody, .int tr, .int th, .int td { display: block; width: 100%; }
  .int tr { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .int tbody tr:last-child { border-bottom: 0; }
  .int th, .int td { border: 0; padding: 4px 14px; }
  .int tbody th { min-width: 0; }
}
@media (max-width: 440px) {
  .top-actions .btn-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
