/* AlarmPulse website (alarmpulse.co.in). One stylesheet for every page.
   Colours and type follow the console and the Rev 3 collateral:
   navy, fire orange, Barlow Semi Condensed headings, IBM Plex body. */

:root {
  --bg: #0b1220;
  --bg-2: #0f172a;
  --panel: #131c2e;
  --panel-2: #182338;
  --line: #24314a;
  --line-2: #2f3e5c;
  --ink: #f1f5f9;
  --ink-2: #cbd5e1;
  --mute: #8b9ab3;
  --fire: #ef4444;
  --orange: #f97316;
  --amber: #f59e0b;
  --teal: #14b8a6;
  --green: #22c55e;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --wrap: 1200px;
  --head: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-2);
  font-family: var(--body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }
h1 em, h2 em { font-style: normal; color: var(--orange); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--orange); font-weight: 500; display: inline-block; margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; }
.mute { color: var(--mute); }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .86); backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.brand .name { font-family: var(--head); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.brand .name b { color: var(--orange); }
.brand .sub { font-family: var(--mono); font-size: .58rem; letter-spacing: .32em; color: var(--mute); margin-top: 3px; }
.menu { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  white-space: nowrap; color: var(--ink-2); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--panel-2); }
.head-cta { display: flex; gap: 10px; align-items: center; }
.site-head .head-signin { display: none; margin-left: auto; }  /* beats .btn, which comes later */
#signin { scroll-margin-top: 90px; }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line-2); color: var(--ink);
  border-radius: 8px; width: 42px; height: 42px; cursor: pointer; font-size: 1.2rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem/1 var(--body); padding: 13px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #1a0d03; }
.btn-primary:hover { background: #fb8a3c; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--orange); }
.btn-sm { padding: 9px 14px; font-size: .88rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, rgba(249, 115, 22, .16), transparent 70%); pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .22; pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .85fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.pulse-line { display: flex; gap: 22px; flex-wrap: wrap; font-size: .9rem; color: var(--mute); }
.pulse-line span::before { content: "●"; color: var(--green); margin-right: 7px; font-size: .7rem; vertical-align: 2px; }

/* ---------- sign-in card ---------- */
.signin {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2);
  border-radius: 18px; padding: 30px; box-shadow: var(--shadow); position: relative;
}
.signin::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--fire), var(--orange), var(--amber));
}
.signin h2 { font-size: 1.7rem; margin-bottom: 4px; }
.signin .hint { font-size: .9rem; color: var(--mute); margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; font: 400 1rem/1.3 var(--body);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249, 115, 22, .2); }
.field .row { display: flex; justify-content: space-between; align-items: baseline; }
.field .row a { font-size: .82rem; }
.signin .btn { width: 100%; padding: 14px; font-size: 1rem; }
.signin .msg { min-height: 1.4em; font-size: .9rem; margin: 12px 0 0; }
.signin .msg.err { color: #fca5a5; }
.signin .msg.ok { color: #86efac; }
.signin .code-field[hidden] { display: none; }
.signin .foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--mute); }
.signin .secure { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--mute); margin-top: 14px; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 44px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.stat { padding: 26px 24px; }
.stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stat .n { font-family: var(--head); font-size: 2.6rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat .n small { font-size: 1.2rem; color: var(--orange); margin-left: 2px; }
.stat .l { color: var(--mute); font-size: .9rem; margin-top: 8px; }
.footnote { font-size: .8rem; color: var(--mute); margin-top: 14px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: border-color .15s ease, transform .15s ease;
}
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--orange); text-decoration: none; transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.card .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; color: var(--orange); text-transform: uppercase; margin-bottom: 10px; display: block; }
.icon {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(249, 115, 22, .12); color: var(--orange); border: 1px solid rgba(249, 115, 22, .3);
}
.icon svg { width: 22px; height: 22px; }
.more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .92rem; }

/* screenshot frame */
.shot {
  border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; background: #0d1424; box-shadow: var(--shadow);
}
.shot .bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.shot .bar i:first-child { background: var(--fire); }
.shot .bar i:nth-child(2) { background: var(--amber); }
.shot .bar i:nth-child(3) { background: var(--green); }
.shot .bar span { margin-left: 10px; font: 500 .74rem/10px var(--mono); color: var(--mute); }
figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--mute); margin-top: 12px; }
figcaption b { color: var(--ink-2); }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; padding: 64px 0; border-top: 1px solid var(--line); }
.feature:first-child { border-top: 0; padding-top: 0; }
.feature.flip { grid-template-columns: 1.25fr 1fr; }
.feature.flip .copy { order: 2; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px;
  border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg);
}
.ticks b { color: var(--ink); font-weight: 600; }

/* tabs for the screenshot tour */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  background: var(--panel); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 9px 16px; font: 600 .9rem/1 var(--body); cursor: pointer;
}
.tab:hover { color: var(--ink); border-color: var(--orange); }
.tab[aria-selected="true"] { background: var(--orange); color: #1a0d03; border-color: var(--orange); }
.tour-panel[hidden] { display: none; }
.tour-panel p { max-width: 820px; }

/* interfaces / tables */
.iface { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.iface .card { padding: 20px; }
.iface h4 { margin-bottom: 6px; }
.iface p { font-size: .9rem; }
table.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 500; background: var(--panel); }
.spec td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.spec td.c { text-align: center; }
.spec .yes { color: var(--green); font-weight: 700; }
.spec.wide { min-width: 680px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* flow diagram */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1.1fr auto 1fr; gap: 14px; align-items: stretch; }
.flow .col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.flow .col.core { border-color: var(--orange); background: linear-gradient(180deg, rgba(249, 115, 22, .12), var(--panel)); }
.flow .col h4 { font-size: 1rem; margin-bottom: 12px; }
.flow .col ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.flow .col li { padding: 7px 0; border-top: 1px dashed var(--line); }
.flow .col li:first-child { border-top: 0; }
.flow .col li b { color: var(--ink); display: block; font-weight: 600; }
.flow .arrow { align-self: center; color: var(--orange); font-size: 1.6rem; }
.badge { display: inline-block; font: 500 .68rem/1 var(--mono); letter-spacing: .1em; color: var(--green); border: 1px solid rgba(34, 197, 94, .4); border-radius: 999px; padding: 4px 8px; margin-top: 4px; }

/* editions */
.edition { display: flex; flex-direction: column; }
.edition.featured { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }
.edition .who { font-size: .9rem; color: var(--mute); margin-bottom: 16px; }
.edition .ticks { flex: 1; }
.edition .btn { margin-top: 20px; }

/* page hero (inner pages) */
.page-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(800px 300px at 80% 0%, rgba(249, 115, 22, .12), transparent); }
.page-hero .lead { margin-top: 10px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.jump a { font-size: .88rem; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; color: var(--ink-2); }
.jump a:hover { border-color: var(--orange); color: var(--ink); text-decoration: none; }

/* call to action band */
.cta {
  background: linear-gradient(135deg, #1b1310, #2a1408 60%, #3a1806); border: 1px solid rgba(249, 115, 22, .35);
  border-radius: 20px; padding: 48px; display: flex; gap: 30px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta h2 { margin-bottom: 8px; }
.cta p { margin: 0; color: var(--ink-2); }

.notice { border-left: 3px solid var(--amber); background: rgba(245, 158, 11, .08); padding: 16px 20px; border-radius: 0 10px 10px 0; font-size: .92rem; color: var(--ink-2); }
.notice b { color: var(--ink); }

/* downloads */
.dl { display: flex; gap: 18px; align-items: flex-start; }
.dl .doc { flex: 0 0 auto; width: 54px; height: 68px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-2); display: grid; place-items: center; font: 600 .7rem var(--mono); color: var(--fire); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 32px; background: #080d18; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-foot h4 { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 500; margin-bottom: 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--orange); }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--mute); font-size: .82rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, a.card { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .site-head .head-signin { display: inline-flex; }
  .menu-btn { margin-left: -16px; }
  .menu { display: none; }
  .site-head.open .menu {
    display: flex; flex-direction: column; align-items: stretch; gap: 14px; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 18px;
  }
  .site-head.open .nav { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-head.open .nav a { padding: 12px; }
  .site-head.open .head-cta .btn { flex: 1; }

  .iface { grid-template-columns: repeat(3, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); justify-self: center; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero .wrap, .grid-2, .feature, .feature.flip { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .copy { order: 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  .hero { padding: 44px 0 48px; }
  .grid-3, .grid-4, .iface { grid-template-columns: 1fr; }
  .signin { padding: 24px 20px; }
  .cta { padding: 30px 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .stat { padding: 20px 16px; }
  .stat .n { font-size: 2.1rem; }
  .brand .sub { display: none; }
}

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; color: var(--ink); position: relative; padding-right: 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--orange); font-size: 1.4rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 18px; margin: 0; }
