/* ==========================================================================
   landing.css
   Styles used only by the landing page (index.html).
   Shared look and feel lives in base.css and components.css.
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */

.hero {
  padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-block: 28px 20px;
}

.hero__note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--slate);
}

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

/* Hero feed: one orchestrated moment on page load.
   A site flips to Offline, then the alerts arrive. */

.feed {
  margin: 0;
}

.feed__down .pill-swap {
  display: grid;
}

.feed__down .pill-swap > * {
  grid-area: 1 / 1;
}

.feed__down .pill--online {
  animation: fade-out 0.3s 1.6s forwards;
}

.feed__down .pill--offline {
  opacity: 0;
  animation: fade-in 0.3s 1.6s forwards;
}

.feed__messages {
  display: grid;
  gap: 12px;
  padding: 20px 24px 24px;
  background: var(--mist);
  border-top: 1px solid var(--line);
}

.bubble {
  padding: 14px 16px;
  font-size: 0.97rem;
  line-height: 1.45;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
  opacity: 0;
  transform: translateY(8px);
  animation: bubble-in 0.4s forwards;
}

.bubble--sms {
  animation-delay: 2.2s;
}

.bubble--telegram {
  background: var(--signal-soft);
  border-color: transparent;
  animation-delay: 3s;
}

.bubble__via {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate);
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes bubble-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed__down .pill--online {
    animation: none;
    opacity: 0;
  }

  .feed__down .pill--offline,
  .bubble {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Cost of downtime ------------------------------------------------------- */

.cost-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(32px, 6vw, 80px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cost-list li {
  padding-block: 24px;
  border-top: 1px solid var(--line-strong);
}

.cost-list h3 {
  margin-bottom: 6px;
}

.cost-list p {
  margin: 0;
  color: var(--slate);
}

.cost__close {
  margin: 40px 0 0;
  max-width: 44rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

@media (max-width: 720px) {
  .cost-list {
    grid-template-columns: 1fr;
  }
}

/* Timeline (a real sequence, so times lead each row) --------------------- */

.timeline__caption {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--slate);
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.timeline__time {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.timeline__item--alert .timeline__time {
  color: var(--outage-text);
}

.timeline__item--fixed .timeline__time {
  color: var(--online-text);
}

.timeline__item p {
  margin: 0;
}

/* How it works ----------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  background: var(--signal);
  border-radius: 50%;
}

.step p {
  margin: 0;
  color: var(--slate);
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 48px;
  padding: 22px 26px;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.callout p {
  flex: 1 1 320px;
  margin: 0;
}

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

/* FAQ -------------------------------------------------------------------- */

.faq {
  max-width: 48rem;
}

.faq details {
  padding-block: 20px;
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--signal);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 12px 0 0;
  color: var(--slate);
}

/* Closing call to action ------------------------------------------------- */

.cta-band {
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--signal);
  color: #fff;
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}

.cta-band h2 {
  max-width: 24ch;
  margin: 0;
}

.cta-band p {
  margin: 12px 0 0;
  color: #dbe3ff;
}

/* Everything in the alert ------------------------------------------------- */

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.detail-list li {
  position: relative;
  padding-left: 28px;
}

.detail-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--online);
  border-bottom: 2.5px solid var(--online);
  transform: rotate(-45deg);
}

.alert-sample__body {
  padding: 18px 20px 20px;
}

.alert-sample__headline {
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--outage-text);
}

.alert-sample__facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.alert-sample__facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.alert-sample__facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.alert-sample__facts dt {
  color: var(--slate);
  font-size: 0.92rem;
}

.alert-sample__facts dd {
  margin: 0;
  font-weight: 500;
}

@media (max-width: 480px) {
  .alert-sample__facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Pricing additions ------------------------------------------------------- */

.pricing__note {
  max-width: 52rem;
  margin: 32px auto 0;
  padding: 16px 20px;
  text-align: center;
  font-size: 0.98rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.price-card__soon {
  margin-left: 4px;
  padding: 4px 8px;
  font-size: 0.72rem;
  vertical-align: 1px;
}
