/*
  Home page. Loaded only by home.html, after app.css and site.css. The content comes
  from metadata/pages.json (pages[/].body); classes are prefixed hp- so nothing here
  collides with app.css. Colors and font come from site.css's --site-* settings.
*/

body.home-page {
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: var(--site-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Undo app.css's site-wide heading, paragraph, and list styles inside the home page. */
.hp-main h1,
.hp-main h2,
.hp-main h3 {
  font-family: inherit;
  color: var(--site-ink);
}

.hp-main p { margin: 0; }
.hp-main a { color: var(--site-navy); }

body.home-page .site-footer { margin-top: 0; }

/* Signed-in / signed-out text; home.js adds is-signed-in for a signed-in visitor. */
body:not(.is-signed-in) .hp-main [data-when="signed-in"],
body.is-signed-in .hp-main [data-when="signed-out"] { display: none; }

.hp-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.hp-main a.hp-btn-primary {
  background: var(--site-red);
  color: #fff;
  box-shadow: 0 1px 2px rgba(20, 33, 61, 0.15);
}

.hp-main a.hp-btn-primary:hover { background: var(--site-red-hover); color: #fff; }

.hp-main a.hp-btn-secondary {
  background: #fff;
  color: var(--site-ink);
  border: 1px solid #cdd5e0;
}

.hp-main a.hp-btn-secondary:hover { border-color: #9aa8bb; }

.hp-btn-large {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1.05rem;
}

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

.hp-hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(1100px 420px at 85% 0%, #eef3fa 0%, rgba(238, 243, 250, 0) 70%),
    var(--site-bg);
}

.hp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hp-eyebrow {
  display: inline-block;
  margin-bottom: 18px !important;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eaf1fa;
  color: var(--site-navy);
  font-size: 0.85rem;
  font-weight: 600;
}

.hp-main h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.hp-lede {
  max-width: 34rem;
  margin-bottom: 32px !important;
  color: var(--site-ink-muted);
  font-size: 1.2rem;
}

.hp-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hp-fine {
  margin-top: 18px !important;
  color: var(--site-ink-muted);
  font-size: 0.9rem;
}

.hp-fine span + span::before {
  content: "\00b7";
  margin: 0 8px;
}

/* Two overlapping physical cards: the back peeks out behind the front. */
.hp-card-stack {
  position: relative;
  height: 340px;
}

.hp-card-stack figure {
  position: absolute;
  margin: 0;
  width: min(100%, 430px);
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(20, 33, 61, 0.08),
    0 18px 40px rgba(20, 33, 61, 0.18);
}

.hp-card-stack img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.hp-card-back {
  top: 0;
  right: 0;
  transform: rotate(4deg);
}

.hp-card-front {
  bottom: 0;
  left: 0;
  transform: rotate(-3deg);
}

.hp-card-caption {
  position: absolute;
  right: 6px;
  bottom: -34px;
  color: var(--site-ink-muted);
  font-size: 0.85rem;
}

/* ---------- Sections ---------- */

.hp-section { padding: 88px 0; }

.hp-section-soft { background: var(--site-bg-soft); }

.hp-section-head {
  max-width: 40rem;
  margin: 0 0 44px;
}

.hp-section-head.hp-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hp-section-head.hp-center p { text-align: center; }

.hp-main h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hp-section-head > p {
  color: var(--site-ink-muted);
  font-size: 1.1rem;
}

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

.hp-tile {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--site-line);
  border-radius: 10px;
}

.hp-main h3 {
  margin: 16px 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.hp-tile p { color: var(--site-ink-muted); }

.hp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eaf1fa;
  color: var(--site-navy);
}

.hp-icon svg { width: 22px; height: 22px; }

.hp-icon-green {
  background: #e7f5ec;
  color: #1d7a46;
}

/* Steps */

.hp-steps {
  counter-reset: hp-step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-steps li {
  counter-increment: hp-step;
  margin: 0;
}

.hp-steps li::before {
  content: counter(hp-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--site-navy);
  color: #fff;
  font-weight: 700;
}

/* Privacy & security */

.hp-trust {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.hp-trust-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-trust-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0;
}

.hp-trust-list strong {
  display: block;
  margin-bottom: 2px;
}

.hp-trust-list span:not(.hp-icon) { color: var(--site-ink-muted); }

.hp-policy-link {
  display: inline-block;
  margin: 26px 0 0 60px;
  font-weight: 600;
  text-decoration: none;
}

.hp-policy-link:hover { text-decoration: underline; }

.hp-founder {
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 3px solid var(--site-red);
  border-radius: 0 10px 10px 0;
  background: #fff;
  color: var(--site-ink-muted);
}

.hp-founder p + p {
  margin-top: 8px;
  color: var(--site-ink);
  font-weight: 600;
}

/* Closing call to action */

.hp-cta-band {
  padding: 72px 0;
  background: var(--site-navy);
  color: #fff;
  text-align: center;
}

.hp-main .hp-cta-band h2 { color: #fff; }

.hp-cta-band p {
  max-width: 34rem;
  margin: 0 auto 28px !important;
  color: #c9d6e8;
  font-size: 1.1rem;
  text-align: center;
}

.hp-main a:focus-visible {
  outline: 3px solid var(--site-focus);
  outline-offset: 2px;
}

/* ---------- Tablets ---------- */

@media (max-width: 900px) {
  .hp-hero { padding: 48px 0 72px; }

  .hp-hero-grid,
  .hp-trust {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  /* The two sides sit one above the other, flat and full size. */
  .hp-card-stack {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .hp-card-stack figure {
    position: static;
    width: 100%;
    max-width: 460px;
    transform: none;
  }

  .hp-card-front { order: 1; }
  .hp-card-back { order: 2; }

  .hp-card-caption {
    position: static;
    order: 3;
    text-align: center;
  }

  .hp-grid-3 { gap: 16px; }
  .hp-tile { padding: 22px; }
  .hp-section { padding: 64px 0; }
}

/* ---------- Phones ---------- */

@media (max-width: 640px) {
  .hp-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .hp-wrap { padding: 0 16px; }
  .hp-cta .hp-btn { width: 100%; }

  /* Icon beside the heading keeps the tiles short. */
  .hp-grid-3 .hp-tile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 20px;
  }

  .hp-grid-3 .hp-tile h3 { margin: 0; }
  .hp-grid-3 .hp-tile p { grid-column: 1 / -1; margin-top: 10px; }
  .hp-steps li::before { width: 32px; height: 32px; }
}
