/* HandyBoomer coming soon — brand tokens from docs/brand/tokens.md */

@font-face {
  font-family: "Yantramanav";
  src: url("../fonts/yantramanav-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yantramanav";
  src: url("../fonts/yantramanav-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yantramanav";
  src: url("../fonts/yantramanav-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f2347;
  --navy: #1a3a6c;
  --gold: #ffcc01;
  --gold-dark: #ee9d18;
  --mark: #f0b429;
  --mid: #6b7c93;
  --bg: #f7f8fb;
  --white: #ffffff;
  --shell: #1a1f2e;
  --border: #e2e8f0;
  --danger: #b42318;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(15, 35, 71, 0.09);
  --font: "Yantramanav", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(26, 58, 108, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(255, 204, 1, 0.1), transparent 50%),
    var(--bg);
  line-height: 1.45;
}

a {
  color: var(--navy);
  text-underline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--white);
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

/* —— Page shells —— */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Index: lock to one viewport; Astraark always visible */
.page--viewport {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}

.page__inner {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.85rem 1.1rem 0.65rem;
  min-height: 0;
}

.page--viewport .page__inner {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* —— Brand / logo —— */
.brand {
  text-align: center;
  flex-shrink: 0;
}

.brand__logo {
  display: block;
  margin: 0 auto;
  height: clamp(3.25rem, 9vw, 4.25rem);
  width: auto;
  max-width: min(88vw, 16rem);
  object-fit: contain;
}

/* —— Hero —— */
.hero {
  text-align: center;
  flex-shrink: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 auto;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(26, 58, 108, 0.09);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow__flag {
  width: 0.95rem;
  height: 0.7rem;
  display: block;
}

.hero h1 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.35rem, 4.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero__lead {
  margin: 0.35rem 0 0;
  color: var(--mid);
  font-size: 0.95rem;
  font-weight: 400;
}

.hero__lead strong {
  color: var(--ink);
  font-weight: 700;
}

/* —— Form card —— */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.05rem 0.95rem;
  flex-shrink: 0;
}

.card h2 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.card__hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--mid);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.field {
  margin-bottom: 0;
}

.field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.field input[type="email"] {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input[type="email"]:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 58, 108, 0.15);
}

.field input[type="email"]::placeholder {
  color: #9aa8bc;
}

.segment-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.segment-label__opt {
  font-weight: 400;
  color: var(--mid);
}

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.segment input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(26, 58, 108, 0.15);
}

.segment input:checked + label {
  background: rgba(26, 58, 108, 0.1);
  border-color: var(--navy);
  color: var(--ink);
}

/* Honeypot */
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(15, 35, 71, 0.1);
  transition: transform 0.12s ease, filter 0.12s ease;
  flex-shrink: 0;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: 3px solid rgba(26, 58, 108, 0.35);
  outline-offset: 2px;
}

.notice {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--mid);
}

.form-error {
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: #fef3f2;
  color: var(--danger);
  font-size: 0.85rem;
}

.form-error[hidden],
.success[hidden] {
  display: none !important;
}

.success {
  text-align: center;
  padding: 0.35rem 0.15rem;
}

.success__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.success h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.success p {
  margin: 0;
  color: var(--mid);
  font-size: 0.9rem;
}

/* —— Light footer links —— */
.site-footer {
  margin-top: 0.15rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--mid);
  flex-shrink: 0;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.75rem;
}

.site-footer__nav a {
  color: var(--mid);
  text-decoration: none;
  font-weight: 400;
}

.site-footer__nav a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* —— Operator strip (Astraark) —— */
.operator {
  flex-shrink: 0;
  background: var(--shell);
  color: rgba(255, 255, 255, 0.78);
  padding: 0.55rem 1rem;
  padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 0px));
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.operator--slim .operator__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.operator--slim .operator__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.operator--slim .operator__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.operator--slim .operator__logo {
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.operator--slim .operator__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.operator--slim .operator__sep {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.operator--slim .operator__abn {
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

/* Email + button side-by-side when width allows */
@media (min-width: 480px) {
  .form-row {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
  }

  .field--grow {
    flex: 1;
    min-width: 0;
  }

  .btn--inline {
    width: auto;
    min-width: 7.5rem;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
    align-self: flex-end;
  }

  .card {
    padding: 1.1rem 1.2rem 1rem;
  }
}

/* Short viewports: tighten further */
@media (max-height: 720px) {
  .page__inner {
    gap: 0.55rem;
    padding-top: 0.5rem;
    padding-bottom: 0.4rem;
    justify-content: flex-start;
  }

  .brand__logo {
    height: clamp(2.75rem, 8vh, 3.5rem);
  }

  .hero h1 {
    font-size: clamp(1.2rem, 3.8vw, 1.45rem);
    margin-top: 0.3rem;
  }

  .hero__lead {
    font-size: 0.88rem;
    margin-top: 0.2rem;
  }

  .card {
    padding: 0.8rem 0.9rem 0.75rem;
  }

  .card__hint {
    margin-bottom: 0.55rem;
  }
}

@media (max-height: 600px) {
  .eyebrow {
    display: none;
  }

  .hero__lead {
    display: none;
  }

  .page__inner {
    justify-content: flex-start;
  }
}

/* —— Privacy page (scrollable) —— */
.prose-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
  min-height: calc(100dvh - 4rem);
}

.prose-page header {
  margin-bottom: 1.75rem;
}

.prose-page .brand__logo {
  height: 2.75rem;
  max-width: 12rem;
  margin: 0;
}

.prose-page h1 {
  margin: 1rem 0 0.35rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

.prose-page .updated {
  margin: 0;
  color: var(--mid);
  font-size: 0.9rem;
}

.prose-page h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.prose-page p,
.prose-page li {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
}

.prose-page ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

.prose-page li {
  margin-bottom: 0.35rem;
  color: var(--mid);
}

.prose-page li strong {
  color: var(--ink);
}

.back-link {
  display: inline-block;
  margin: 2rem 0 2.5rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Privacy page still uses full operator if present — keep readable stack */
.page:not(.page--viewport) .operator {
  padding: 0.85rem 1.25rem;
  padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
}

.page:not(.page--viewport) .operator__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.page:not(.page--viewport) .operator__logo {
  width: 2rem;
  height: 2rem;
}

.page:not(.page--viewport) .operator__name {
  font-weight: 700;
  color: #fff;
}

.page:not(.page--viewport) .operator__abn {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.page:not(.page--viewport) .operator__hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.page:not(.page--viewport) .operator__hint a {
  color: rgba(255, 204, 1, 0.9);
  font-weight: 700;
  text-decoration: none;
}
