/* The public pages: a light page with a faint square grid and a warm glow behind the hero, a
   sticky blurred header, the program page sections, the 640px reading column (apply, invite)
   and the split sign-in view. */

.site {
  position: relative;
  min-height: 100vh;
  background: var(--bg-muted);
}
.site-bg {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 820px;
  overflow: hidden;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(23, 23, 23, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 23, 23, 0.055) 1px, transparent 1px);
  background-position: center top;
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 75% 90% at 50% 0%, #000 35%, transparent 85%);
}
.site-bg::after {
  content: "";
  position: absolute;
  top: 80px;
  left: 50%;
  width: min(1180px, 130vw);
  height: 700px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse 50% 60% at 50% 72%, rgba(232, 160, 95, 0.3), transparent 75%),
    radial-gradient(ellipse 30% 35% at 28% 55%, rgba(247, 205, 160, 0.3), transparent 70%),
    radial-gradient(ellipse 30% 35% at 72% 50%, rgba(247, 214, 178, 0.28), transparent 70%);
  filter: blur(12px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(229, 229, 229, 0.7);
  background: rgba(250, 250, 250, 0.78);
  backdrop-filter: saturate(180%) blur(12px);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
}
.site-logo {
  display: inline-flex;
  border-radius: var(--radius-m);
}
.site-logo img {
  display: block;
  width: auto;
  height: 32px;
}
.site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-lang {
  padding: 6px 8px;
  border-radius: var(--radius-m);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.site-lang:hover {
  background: var(--hover);
  color: var(--text-emphasis);
}
.page {
  position: relative;
  z-index: 1;
}

/* Public forms take the accent for their focus ring. */
.site .field input:focus,
.site .field select:focus,
.site .field textarea:focus,
.auth-body .field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* The program page */
.page-landing {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 0 8px;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 24px;
  padding: 4px 12px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.hero-badge .icon {
  stroke: var(--accent);
}
.hero h1 {
  max-width: 17ch;
  margin: 0 auto 20px;
  color: var(--text-emphasis);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-intro {
  max-width: 580px;
  margin: 0 auto 32px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.6;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
}
.hero-actions .btn {
  min-height: 40px;
  padding: 0 20px;
}
.hero-preview {
  max-width: 560px;
  margin: 56px auto 0;
  padding: 10px;
  border: 1px solid rgba(229, 229, 229, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.45);
}
.preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--white);
  box-shadow: 0 2px 6px rgba(34, 42, 53, 0.06);
  text-align: left;
}
.preview-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-emphasis);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-host {
  color: var(--text-soft);
  font-weight: 500;
}
.preview-code {
  color: var(--accent-text);
}
.preview-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg-muted);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.section {
  margin-top: 88px;
}
.section-title {
  margin: 0 0 28px;
  color: var(--text-emphasis);
  font-size: 30px;
  letter-spacing: -0.025em;
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--white);
}
.step h3 {
  margin: 18px 0 6px;
  color: var(--text-emphasis);
  font-size: 16px;
}
.step p {
  margin: 0;
  color: var(--text-soft);
}
.split {
  display: grid;
  gap: 16px;
}
.split > * {
  margin: 0;
}
.page-landing .card {
  padding: 24px;
}
.page-landing .card h2 {
  margin: 0 0 10px;
  color: var(--text-emphasis);
  font-size: 18px;
}
.page-landing .card p,
.page-landing .card li {
  color: var(--text-soft);
}
.split + .section {
  margin-top: 16px;
}
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  margin: 0;
  padding: 0 0 0 28px;
}
.check-list li + li {
  margin-top: 10px;
}
.check-list li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background:
    var(--bg-subtle) center / 12px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23404040' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-4.9'/%3E%3C/svg%3E");
}

/* The terms card: a muted panel of icon rows. */
.terms-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--bg-muted);
}
.page-landing .terms-card {
  padding: 24px;
  background: var(--white);
}
.terms-card h2 {
  margin: 0 0 14px;
  color: var(--text-strong);
  font-size: 16px;
  letter-spacing: -0.02em;
}
.page-landing .terms-card h2 {
  font-size: 18px;
}
.terms-list {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.terms-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.terms-list .icon {
  margin-top: 2px;
}
.terms-list .terms-rate {
  color: var(--text-emphasis);
}
.page-landing .terms-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-muted);
}
.terms-card .muted {
  margin: 0;
  font-size: 12px;
}

/* FAQ: plain rows between hairlines; the plus turns into a cross when open. */
.faq {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq .section-title + details {
  border-top: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  color: var(--text-emphasis);
  font-size: 16px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.87, 0, 0.13, 1);
}
.faq details[open] .faq-icon {
  transform: rotate(45deg);
}
.faq details p {
  margin: 0 0 18px;
  padding-right: 36px;
  color: var(--text-soft);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.cta {
  margin-top: 88px;
  padding: 56px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 60% 90% at 50% 120%, rgba(223, 154, 87, 0.22), transparent 70%),
    var(--white);
  text-align: center;
}
.cta h2 {
  margin: 0 0 24px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

/* The reading column: white, with side lines that fade out towards the bottom. */
.page-column {
  max-width: 640px;
  min-height: calc(100vh - 57px);
  margin: 0 auto;
  padding: 56px 24px 64px;
  background: var(--white);
}
.page-column::before,
.page-column::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--line) 40%, transparent);
}
.page-column::before {
  left: 0;
}
.page-column::after {
  right: 0;
}
.column-hero {
  margin-bottom: 28px;
}
.column-hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.column-hero :last-child {
  margin-bottom: 0;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lead {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}
.column-body > :last-child {
  margin-bottom: 0;
}
.column-body .btn {
  margin-top: 4px;
}
.page-column .terms-card {
  margin: 0 0 8px;
}
.apply-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}
.apply-form .field {
  margin: 0;
}
.apply-form .btn-block {
  margin-top: 8px;
}
.field-row {
  display: grid;
  gap: 24px;
}
.cf-turnstile {
  min-height: 65px;
}

/* Footer */
.site > .footer {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 36px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.footer p {
  margin: 0 0 4px;
}
.footer a {
  color: var(--muted);
}

/* Sign-in: the split view */
.auth-body {
  background: var(--white);
}
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
}
.auth-side {
  display: none;
}
.auth-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 16px 16px;
  overflow: hidden;
}
.auth-main::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 420px;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-position: center top;
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0, 0, 0, 0.7), transparent 80%);
}
.auth-banner {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.8);
  backdrop-filter: blur(8px);
}
.auth-banner img {
  height: 28px;
  width: auto;
}
.auth-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 384px;
  margin: auto 0;
  padding: 24px 0;
}
.auth-box h1 {
  margin: 0 0 8px;
  color: var(--text-emphasis);
  font-size: 22px;
  letter-spacing: -0.02em;
  text-align: center;
}
.auth-lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  text-wrap: pretty;
}
.auth-box .field input {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.auth-box .notice {
  margin-top: 16px;
}
.auth-main > .footer {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 900px) {
  .auth {
    grid-template-columns: 440px minmax(0, 1fr);
  }
  .auth-side {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 40px;
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--bg-muted);
  }
  .auth-side::before {
    content: "";
    position: absolute;
    bottom: -140px;
    left: -100px;
    width: 460px;
    height: 460px;
    border-radius: 999px;
    background: var(--accent);
    opacity: 0.2;
    filter: blur(90px);
  }
  .auth-logo img {
    display: block;
    width: auto;
    height: 32px;
  }
  .auth-pitch {
    position: relative;
    max-width: 380px;
    margin: auto 0;
  }
  .auth-quote {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.015em;
    text-wrap: pretty;
  }
  .auth-note {
    margin: 0;
    color: var(--muted);
  }
  .auth-banner {
    display: none;
  }
  .auth-main {
    padding-top: 40px;
  }
}
@media (min-width: 1024px) {
  .auth {
    grid-template-columns: 560px minmax(0, 1fr);
  }
  .auth-side {
    padding: 28px 48px;
  }
}
@media (max-width: 639px) {
  .site-header-inner {
    padding: 10px 16px;
  }
  .site-logo img {
    height: 28px;
  }
  .site-actions {
    gap: 4px;
  }
  .page-landing {
    padding: 0 16px 48px;
  }
  .hero {
    padding-top: 48px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero-intro {
    font-size: 16px;
  }
  .section,
  .cta {
    margin-top: 64px;
  }
  .section-title {
    font-size: 24px;
  }
  .page-column {
    padding: 36px 16px 48px;
  }
  .column-hero h1 {
    font-size: 26px;
  }
  .preview-host {
    display: none;
  }
}
