/* ============================================================
   MERIDIAN — SaaS Landing Template
   Demo: Statlas (uptime monitoring)

   Customize everything from the tokens below.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --paper:        #F3F5FA;   /* page background */
  --surface:      #FFFFFF;   /* cards */
  --ink:          #0D1B2E;   /* headings, primary text */
  --ink-2:        #45536B;   /* body text */
  --ink-3:        #7C8AA3;   /* captions, faint text */
  --line:         #DDE4F0;   /* borders */
  --accent:       #2949E8;   /* primary action (cobalt) */
  --accent-deep:  #1E37B8;   /* hover */
  --panel:        #0C1626;   /* dark monitor panels */
  --panel-2:      #13233E;   /* dark panel surfaces */
  --panel-line:   #23375A;   /* borders on dark */
  --on-panel:     #E8EEFB;   /* text on dark */
  --on-panel-dim: #8FA3C6;   /* faint text on dark */
  --chart:        #7DA2FF;   /* chart line on dark */

  /* Semantic status */
  --up:   #1FA968;
  --warn: #E8960C;
  --down: #E5484D;

  /* Type */
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "Consolas", monospace;

  /* Layout */
  --container: 1140px;
  --radius: 14px;
  --radius-lg: 22px;
  --section-gap: clamp(84px, 12vw, 150px);
  --shadow: 0 1px 2px rgba(13, 27, 46, 0.05), 0 12px 32px -12px rgba(13, 27, 46, 0.12);
  --shadow-lg: 0 2px 4px rgba(13, 27, 46, 0.06), 0 32px 64px -24px rgba(13, 27, 46, 0.28);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 600; }
h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

.container--narrow { max-width: 760px; }

.section { padding-block: calc(var(--section-gap) / 2); }

.section__head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 14px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-3); }

.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--light:hover { background: #E7ECF7; }

.btn--sm { padding: 10px 18px; font-size: 0.875rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  gap: 26px;
  margin-inline: auto;
}

.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--ink); }

.nav__actions { display: flex; align-items: center; gap: 18px; }

.nav__signin {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
}
.nav__signin:hover { color: var(--ink); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav__burger span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.nav__mobile a {
  padding: 12px 4px;
  font-weight: 500;
  color: var(--ink);
}

.nav__mobile .btn { margin-top: 10px; }

@media (max-width: 860px) {
  .nav__links, .nav__signin { display: none; }
  .nav__burger { display: flex; }
  .nav__actions .btn { display: none; } /* CTA lives in the mobile menu instead */
  .nav.is-open .nav__mobile { display: flex; }
  .nav.is-open .nav__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.is-open .nav__burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 110px) clamp(40px, 6vw, 70px); }

.hero__copy {
  max-width: 720px;
  margin-bottom: clamp(44px, 6vw, 72px);
}

.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 4.35rem);
  font-weight: 700;
  margin-bottom: 22px;
}

.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__note { margin-top: 18px; color: var(--ink-3); }

/* ---------- Monitor panel (signature) ---------- */
.monitor {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3vw, 30px);
  color: var(--on-panel);
}

.monitor__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--panel-line);
}

.monitor__host { color: var(--on-panel-dim); }

.monitor__uptime {
  margin-left: auto;
  color: var(--on-panel);
  font-weight: 500;
}

.monitor__uptime em {
  font-style: normal;
  color: var(--on-panel-dim);
  margin-left: 6px;
}

.monitor__chart { position: relative; padding-block: 18px 6px; }

.monitor__chart svg { width: 100%; height: clamp(140px, 22vw, 190px); }

.chart-grid line { stroke: var(--panel-line); stroke-width: 1; stroke-dasharray: 3 6; }

.monitor__readout {
  position: absolute;
  top: 26px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

#chart-value { font-size: 1.5rem; font-weight: 500; color: var(--on-panel); }
#chart-value i { font-style: normal; font-size: 0.8rem; color: var(--on-panel-dim); margin-left: 3px; }
#chart-checked { color: var(--on-panel-dim); font-size: 0.75rem; }

.monitor__regions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--panel-line);
}

.region {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--panel-line);
  border-radius: 99px;
  color: var(--on-panel-dim);
  transition: border-color 0.3s, color 0.3s;
}

.region b { color: var(--on-panel); font-weight: 500; }

.region.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}
.status-dot--up   { background: var(--up);   box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.status-dot--warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.status-dot--down { background: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 22%, transparent); }

.region.is-warn .status-dot { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }

/* ---------- Logos ---------- */
.logos { padding-block: clamp(36px, 5vw, 60px); }

.logos__label {
  text-align: center;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin-bottom: 26px;
}

.logos__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 48px;
}

.logos__item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}

.logos__item--serif { font-family: Georgia, serif; font-style: italic; font-weight: 500; }
.logos__item--mono  { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; }
.logos__item--wide  { letter-spacing: 0.22em; font-size: 0.95rem; align-self: center; }

/* ---------- Feature rows ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
  padding-block: clamp(36px, 5vw, 60px);
}

.feature-row--flip .feature-row__copy { order: 2; }
.feature-row--flip .feature-row__visual { order: 1; }

.feature-row__copy h3 { margin-bottom: 14px; }
.feature-row__copy > p { margin-bottom: 22px; }

.feature-row__list { display: grid; gap: 10px; }

.feature-row__list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
}

.feature-row__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--up);
  border-bottom: 2px solid var(--up);
  transform: rotate(-45deg) scale(0.85);
}

@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature-row--flip .feature-row__copy { order: 1; }
  .feature-row--flip .feature-row__visual { order: 2; }
}

/* Feature visuals share a card base */
.checklog, .escalation, .statuspage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* Check log */
.checklog { display: grid; gap: 12px; font-size: 0.8125rem; }

.checklog__row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
}

.checklog__row b { color: var(--ink); font-weight: 500; }
.checklog__row i { font-style: normal; color: var(--ink-3); margin-left: auto; }
.checklog__row--warn { color: var(--warn); }
.checklog__row--warn b { color: var(--warn); }
.checklog__row--note { color: var(--ink-3); padding-left: 18px; }

/* Escalation */
.escalation { display: grid; gap: 4px; }

.escalation__step {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.escalation__step b { color: var(--ink); font-weight: 600; }

.escalation__time { font-size: 0.75rem; color: var(--ink-3); flex: none; }

.escalation__step--active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  outline: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.escalation__step--active .escalation__what { color: var(--accent-deep); font-weight: 600; }
.escalation__step--dim { opacity: 0.55; }

/* Status page mock */
.statuspage { display: grid; gap: 0; padding: 0; overflow: hidden; }

.statuspage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 55%, var(--surface));
}

.statuspage__brand {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.statuspage__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--up);
}

.statuspage__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 0.9375rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.statuspage__row:last-child { border-bottom: 0; }
.statuspage__bars { color: var(--up); }

/* ---------- Compact grid ---------- */
.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(36px, 5vw, 60px);
}

.grid-features__item { background: var(--surface); padding: 26px 24px; }

.grid-features__item h4 { margin-bottom: 8px; }

.grid-features__item p { font-size: 0.9rem; color: var(--ink-2); }

@media (max-width: 860px) { .grid-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-features { grid-template-columns: 1fr; } }

/* ---------- Metrics band ---------- */
.band {
  background: var(--panel);
  color: var(--on-panel);
  padding-block: clamp(48px, 7vw, 84px);
  margin-block: calc(var(--section-gap) / 2);
}

.band__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}

.band__item { display: grid; gap: 8px; }

.band__num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--chart);
  line-height: 1;
}

.band__label { font-size: 0.9rem; color: var(--on-panel-dim); max-width: 200px; }

@media (max-width: 860px) { .band__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .band__grid { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.quote blockquote {
  font-size: 0.9846rem;
  color: var(--ink);
  line-height: 1.55;
}

.quote figcaption { display: grid; gap: 2px; font-size: 0.875rem; }
.quote figcaption b { color: var(--ink); font-weight: 600; }
.quote figcaption span { color: var(--ink-3); }

@media (max-width: 860px) { .testimonials__grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing__toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-3);
}

.pricing__toggle .is-active { color: var(--ink); }

.pricing__toggle em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--up);
  margin-left: 4px;
}

.toggle {
  width: 46px;
  height: 26px;
  border-radius: 99px;
  border: 0;
  background: var(--accent);
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle[aria-checked="false"] { background: var(--ink-3); }

.toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  transform: translateX(20px);
}

.toggle[aria-checked="false"] .toggle__knob { transform: translateX(0); }

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: start;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.plan--featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-lg);
  position: relative;
}

.plan__flag {
  position: absolute;
  top: -11px;
  left: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 99px;
}

.plan__name { font-size: 1.1rem; margin-bottom: 14px; }

.plan__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }

.plan__price span {
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}

.plan__price em { font-style: normal; color: var(--ink-3); font-size: 0.9rem; }

.plan__for { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 24px; }

.plan__list {
  display: grid;
  gap: 11px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  margin-bottom: 28px;
}

.plan__list li {
  position: relative;
  padding-left: 26px;
  font-size: 0.9375rem;
}

.plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--up);
  border-bottom: 2px solid var(--up);
  transform: rotate(-45deg) scale(0.85);
}

.plan__cta { margin-top: auto; width: 100%; }

.pricing__foot {
  text-align: center;
  color: var(--ink-3);
  margin-top: 36px;
}

@media (max-width: 900px) {
  .pricing__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

/* ---------- FAQ ---------- */
.faq__list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.faq__item + .faq__item { border-top: 1px solid var(--line); }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 22px 24px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.faq__icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}

.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  background: var(--ink-3);
  border-radius: 2px;
  transition: transform 0.25s;
}

.faq__icon::before { top: 6px; left: 0; width: 14px; height: 2px; }
.faq__icon::after  { top: 0; left: 6px; width: 2px; height: 14px; }

.faq__q[aria-expanded="true"] .faq__icon::after { transform: scaleY(0); }

.faq__a { padding: 0 24px 24px; max-width: 640px; }

.faq__a p { font-size: 0.9846rem; }

/* ---------- CTA ---------- */
.cta__box {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
  text-align: center;
}

.cta__box h2 { color: var(--on-panel); margin-bottom: 34px; }

.cta__box .eyebrow { color: var(--chart); }

.cta__actions { display: flex; justify-content: center; }

.cta__note { margin-top: 20px; color: var(--on-panel-dim); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: calc(var(--section-gap) / 2);
  padding-block: clamp(48px, 6vw, 72px) 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: clamp(36px, 6vw, 80px);
  padding-bottom: 48px;
}

.footer__brand p {
  margin-top: 16px;
  font-size: 0.9375rem;
  max-width: 300px;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer__col { display: grid; gap: 10px; align-content: start; }

.footer__col h5 {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.footer__col a {
  font-size: 0.9375rem;
  color: var(--ink-2);
  transition: color 0.2s;
}

.footer__col a:hover { color: var(--ink); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-3);
}

.footer__bottom .mono { font-size: 0.72rem; }

@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
