/* ==========================================================================
   Lodestone landing page: "Register your interest"
   Loaded after style.css (Bootstrap 5.3.3 theme); overrides theme tokens.
   ========================================================================== */

:root,
[data-bs-theme=light] {
  /* Brand */
  --ls-blue: #005aff;
  --ls-blue-rgb: 0, 90, 255;
  --ls-blue-hover: #004ad6;
  --ls-blue-active: #0041bd;
  --ls-orange: #ffa500;
  --ls-orange-ink: #8a4b00;
  --ls-ink: #192236;
  --ls-muted: #565b6b;
  --ls-line: rgba(25, 34, 54, 0.1);
  --ls-line-strong: rgba(25, 34, 54, 0.18);
  --ls-gem-1: #353be7;
  --ls-gem-2: #3481af;
  --ls-gem-3: #49aebb;
  --ls-gem-4: #0012a2;
  --ls-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Bootstrap overrides */
  --bs-primary: var(--ls-blue);
  --bs-primary-rgb: var(--ls-blue-rgb);
  --bs-link-color: var(--ls-blue);
  --bs-link-color-rgb: var(--ls-blue-rgb);
  --bs-link-hover-color: var(--ls-blue-hover);
  --bs-body-font-family: var(--ls-font);
  --bs-body-font-size: 1rem;
  --bs-body-color: var(--ls-muted);
  --bs-body-bg: #fff;
  --bs-heading-color: var(--ls-ink);
}

body {
  background-color: #fff;
  color: var(--ls-muted);
  height: auto;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--ls-font);
  color: var(--ls-ink);
}

strong {
  color: var(--ls-ink);
  font-weight: 600;
}

/* style.css removes every focus outline; restore one for keyboard users */
:focus-visible {
  outline: 3px solid rgba(var(--ls-blue-rgb), 0.5) !important;
  outline-offset: 2px;
}
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
  outline: none !important;
}

/* ---------- Page shell ---------- */

.ls-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(48rem 28rem at 100% -10%, rgba(var(--ls-blue-rgb), 0.07), transparent 70%),
    radial-gradient(36rem 22rem at -10% 0%, rgba(255, 165, 0, 0.06), transparent 70%),
    #fff;
}
@supports (overflow: clip) {
  .ls-page { overflow-x: clip; }
}

.ls-page .container {
  --bs-gutter-x: 2rem; /* 16px side gutters on phones */
  position: relative;
  z-index: 1;
}

main.ls-layout {
  background-color: transparent;
}

.ls-sketch {
  position: absolute;
  z-index: 0;
  right: -18rem;
  bottom: 4rem;
  width: 44rem;
  max-width: none;
  opacity: 0.12;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 992px) {
  .ls-sketch {
    right: -10rem;
    bottom: 2rem;
    width: 62rem;
    opacity: 0.16;
  }
}

/* ---------- Header ---------- */

header.ls-header {
  height: auto; /* style.css fixes every <header> at 56px */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* The wordmark fills whatever room the Register button leaves, up to its
   full size (1.75rem tall on phones, 2.25rem from 576px). It's about
   9.55 times wider than it is tall. */
.ls-brand {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(1.75rem * 9.55);
  line-height: 0;
}
.ls-brand img {
  width: 100%;
  height: auto;
}
@media (min-width: 576px) {
  .ls-brand { max-width: calc(2.25rem * 9.55); }
}

/* The header's Register button jumps to the form (#register). It's shown on
   every screen size; on phones its icon is dropped to leave the wordmark room. */
.ls-header-cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
@media (max-width: 575.98px) {
  .ls-header-cta .bi { display: none; }
}

/* ---------- Layout ---------- */

.ls-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* Phones: intro, then "What is Lodestone?" and "How the beta works", then the form */
  grid-template-areas:
    "hero"
    "about"
    "form";
  row-gap: 3rem;
  padding-top: 1rem;
  padding-bottom: 4rem;
}
/* style.css pads every <section> (up to 4rem/3rem on phones); the grid gap handles spacing here */
.ls-layout > section {
  padding-top: 0;
  padding-bottom: 0;
}
.ls-hero { grid-area: hero; }
.ls-form-wrap { grid-area: form; scroll-margin-top: 1.5rem; }
.ls-about { grid-area: about; }

@media (min-width: 992px) {
  .ls-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 29rem);
    grid-template-areas:
      "hero form"
      "about form";
    column-gap: 4rem;
    row-gap: 3.5rem;
    padding-top: 2.5rem;
  }
  /* Not sticky: with both email fields showing, the card can be taller than a laptop viewport */
  .ls-form-wrap {
    align-self: start;
  }
}
@media (min-width: 1200px) {
  .ls-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 31rem);
    column-gap: 6rem;
  }
}

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

.ls-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.14);
  color: var(--ls-orange-ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ls-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ls-orange);
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.25);
}

h1.ls-title {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.ls-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 34rem;
  margin-bottom: 0;
}

/* Epigraph */
.ls-quote {
  position: relative;
  margin: 2.5rem 0 1.25rem;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  background: linear-gradient(90deg, rgba(53, 59, 231, 0.06), rgba(73, 174, 187, 0.03) 60%, transparent);
  border-radius: 0 0.75rem 0.75rem 0;
  max-width: 36rem;
}
.ls-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--ls-gem-1), var(--ls-gem-2) 55%, var(--ls-gem-3));
}
.ls-quote blockquote {
  margin: 0;
}
.ls-quote blockquote p {
  margin: 0;
  color: var(--ls-ink);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
}
.ls-quote blockquote p::before { content: "\201C"; }
.ls-quote blockquote p::after { content: "\201D"; }
.ls-quote figcaption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ls-muted);
}
.ls-quote figcaption::before {
  content: "— ";
  color: var(--ls-orange);
}

.ls-why {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 36rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.ls-why img {
  flex: none;
  width: 2rem;
  height: auto;
  margin-top: 0.15rem;
}

/* ---------- Form card ---------- */

.ls-card {
  border: 1px solid var(--ls-line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 34, 54, 0.04), 0 16px 48px rgba(25, 34, 54, 0.09);
}
.ls-card .card-body {
  padding: 1.5rem 1.25rem;
}
@media (min-width: 576px) {
  .ls-card .card-body { padding: 2rem; }
}

.form-label,
.ls-legend {
  color: var(--ls-ink);
  font-size: 0.875rem;
  font-weight: 500;
}
.ls-legend {
  float: none;
  width: auto;
  margin-bottom: 0.625rem;
  line-height: 1.5;
}
.ls-optional {
  color: var(--ls-muted);
  font-weight: 400;
}

.form-control,
.form-select {
  font-size: 1rem; /* 16px stops iOS zooming on focus */
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  border-color: var(--ls-line-strong);
  border-radius: 0.6rem;
  color: var(--ls-ink);
}
.form-select {
  background-color: #fff;
}
.form-control::placeholder {
  color: #9a9eab;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--ls-blue);
  box-shadow: 0 0 0 0.2rem rgba(var(--ls-blue-rgb), 0.15);
}
.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus,
.was-validated .form-select:invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.form-text {
  color: var(--ls-muted);
  font-size: 0.8125rem;
}

.form-check-input {
  width: 1.125em;
  height: 1.125em;
  margin-top: 0.2em;
  border-color: var(--ls-line-strong);
}
.form-check-input:checked {
  background-color: var(--ls-blue);
  border-color: var(--ls-blue);
}
.form-check-input:focus {
  border-color: var(--ls-blue);
  box-shadow: 0 0 0 0.2rem rgba(var(--ls-blue-rgb), 0.15);
}
.form-check-label {
  color: var(--ls-muted);
}

/* Platform toggle cards */
.ls-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.ls-platform {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: 1rem 1rem 0.9rem;
  border: 1.5px solid var(--ls-line-strong);
  border-radius: 0.8rem;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.ls-platform:hover {
  border-color: rgba(var(--ls-blue-rgb), 0.55);
}
.ls-platform-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.6rem;
  color: var(--ls-ink);
}
.ls-platform-name {
  color: var(--ls-ink);
  font-weight: 600;
  line-height: 1.3;
}
.ls-platform-sub {
  color: var(--ls-muted);
  font-size: 0.8125rem;
}
.ls-platform-check {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ls-blue);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn-check:checked + .ls-platform {
  border-color: var(--ls-blue);
  background: rgba(var(--ls-blue-rgb), 0.05);
  box-shadow: 0 0 0 3px rgba(var(--ls-blue-rgb), 0.12);
}
.btn-check:checked + .ls-platform .ls-platform-icon {
  color: var(--ls-blue);
}
.btn-check:checked + .ls-platform .ls-platform-check {
  opacity: 1;
  transform: none;
}
.btn-check:focus-visible + .ls-platform {
  outline: 3px solid rgba(var(--ls-blue-rgb), 0.5) !important;
  outline-offset: 2px;
}
.ls-platforms.is-invalid .ls-platform {
  border-color: var(--bs-form-invalid-border-color);
}

.ls-feedback {
  margin-top: 0.375rem;
  color: var(--bs-form-invalid-color);
  font-size: 0.875em;
}

.ls-reveal:not([hidden]) {
  animation: ls-reveal 0.22s ease-out;
}
@keyframes ls-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* Primary button */
.btn-primary {
  --bs-btn-bg: var(--ls-blue);
  --bs-btn-border-color: var(--ls-blue);
  --bs-btn-hover-bg: var(--ls-blue-hover);
  --bs-btn-hover-border-color: var(--ls-blue-hover);
  --bs-btn-focus-shadow-rgb: var(--ls-blue-rgb);
  --bs-btn-active-bg: var(--ls-blue-active);
  --bs-btn-active-border-color: var(--ls-blue-active);
  --bs-btn-disabled-bg: var(--ls-blue);
  --bs-btn-disabled-border-color: var(--ls-blue);
  font-weight: 600;
}
.ls-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  font-size: 1rem;
}
.ls-fineprint {
  margin: 0.875rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ls-muted);
}

/* Success */
.ls-success-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: rgba(12, 188, 135, 0.12);
  color: #087a58;
  font-size: 1.75rem;
}
.ls-success h2:focus {
  outline: none;
}
.ls-next {
  margin: 0 0 1rem;
  padding: 1rem 1rem 1rem 2.25rem;
  border-radius: 0.75rem;
  background: rgba(var(--ls-blue-rgb), 0.04);
  font-size: 0.9375rem;
}
.ls-next li + li {
  margin-top: 0.4rem;
}

/* ---------- About ---------- */

h2.ls-section-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.ls-about {
  max-width: 38rem;
}
.ls-about p {
  line-height: 1.7;
}

.ls-features {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.ls-features li {
  display: flex;
  align-items: center;
  gap: 1rem;
  line-height: 1.5;
}
.ls-feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(var(--ls-blue-rgb), 0.08);
  color: var(--ls-blue);
  font-size: 1.2rem;
}

.ls-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.ls-steps li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.ls-steps strong {
  display: block;
  margin-bottom: 0.1rem;
}
.ls-steps span:not(.ls-step-num) {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.ls-step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--ls-blue);
  color: var(--ls-blue);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ---------- Footer ---------- */

footer.ls-footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--ls-line);
  font-size: 0.8125rem;
}
footer.ls-footer p {
  margin: 0;
}
footer.ls-footer a {
  color: inherit;
  text-decoration: none;
}
footer.ls-footer a:hover {
  color: var(--ls-blue);
}

@media (prefers-reduced-motion: reduce) {
  .ls-reveal:not([hidden]),
  .ls-platform,
  .ls-platform-check {
    animation: none;
    transition: none;
  }
}
