/* ---------- Design tokens (Humanaut Health brand) ---------- */

:root {
  /* Color */
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-faint: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.15);
  --accent: #ff7348;
  --accent-hover: #f0623a;
  --error: #ff5a5f;

  /* Type */
  --font-display: "Darker Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --tracking-label: 0.12em;

  /* Layout */
  --gutter: clamp(16px, 4vw, 40px);
  --focus-ring: 2px solid var(--text);
}

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

[hidden] { display: none !important; }

html, body { margin: 0; background: var(--bg); color: var(--text); }

body {
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body.locked { overflow: hidden; }

a { color: inherit; }
a:focus-visible,
button:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

/* ---------- Shared ---------- */

.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 36px) var(--gutter) 24px;
  position: relative;
  isolation: isolate;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
}

.logo img { display: block; height: 30px; width: auto; }

.logo-health {
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transform: translateY(1px);
}
.logo-health sup { font-size: 0.36em; vertical-align: top; position: relative; top: -0.15em; margin-left: 1px; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
}
.lang-toggle button {
  background: none;
  border: 0;
  min-width: 40px;
  min-height: 44px;
  padding: 0 8px;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.lang-toggle button:hover { color: var(--text); }

.arrival > .lang-toggle { position: absolute; top: clamp(10px, 2.2vw, 20px); right: calc(var(--gutter) - 8px); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* "MEXICO CITY" lockup under the logo */
.brand-sub {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}
.brand-sub span { margin-right: -0.38em; }
.brand-sub::before, .brand-sub::after {
  content: "";
  height: 1px;
  width: 66px;
  background: var(--text-faint);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0;
}
/* Two-tone headlines: the second line is upright, same font, fainter. */
.display .faint { color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 52px;
  padding: 0 36px;
  border: 0;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--text);
  font: 600 20px/1 var(--font-display);
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn span { transform: translateY(-1px); }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn .arrow {
  width: 22px;
  height: 12px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 0.2s;
}
.btn:hover .arrow { transform: translateX(3px); }

.fine {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.rule-footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
}
.rule-footer::before, .rule-footer::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.rule-footer a { text-decoration: none; }
.rule-footer a:hover { color: var(--text); text-decoration: underline; }

/* Large Humanaut mark behind the content */
.watermark {
  position: absolute;
  right: -4vw;
  bottom: -6vh;
  height: 82vh;
  width: auto;
  fill: var(--text);
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
}

/* ---------- 01 Arrival ---------- */

.arrival { align-items: center; text-align: center; overflow: hidden; }
.arrival .brand { display: flex; flex-direction: column; align-items: center; }

/* Hero background image hook: drop a photo in assets/ and uncomment.
.arrival {
  background:
    linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
    url("assets/hero.jpg") center / cover no-repeat;
}
*/

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 48px 0 24px;
}

.hero .display {
  font-size: clamp(48px, 8vw, 100px);
  max-width: 12em;
  margin-bottom: 28px;
}

.lede {
  margin: 0 0 8px;
  max-width: 40em;
  font-size: clamp(16px, 1.4vw, 18px);
  text-wrap: balance;
  line-height: 1.5;
  color: var(--text-muted);
}
.hero .btn { margin-top: 28px; }

.rule-footer { width: 100%; }

/* ---------- 02 Introduction ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--bg);
  overflow-y: auto;
  animation: fade 0.35s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.intro-top {
  position: absolute;
  top: clamp(14px, 2.4vw, 24px);
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 18px;
}

.close {
  width: 44px;
  height: 44px;
  padding: 11px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text);
}
.close svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }

.intro-grid {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 32px 68px;
  align-items: start;
}

.intro-side .logo img { height: 27px; }
.intro-side .logo-health { font-size: 22.5px; }
/* Logo + city stacked; the city's rules stretch to the logo's width */
.brand-lockup { display: inline-flex; flex-direction: column; align-items: center; }
.brand-lockup .brand-sub { align-self: stretch; }
.brand-lockup .brand-sub::before, .brand-lockup .brand-sub::after { flex: 1; width: auto; min-width: 16px; }

.display-sm {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-top: 72px;
}

.intro-copy {
  margin: 32px 0 0;
  font-size: 18px;
  line-height: 1.5;
  max-width: 360px;
}

.intro-side hr {
  margin: 36px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.intro-form {
  margin-top: 134px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 26px;
}
.wide { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  font: 400 16px/1.4 var(--font-body);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.field > input[type],
.boxed {
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field > input[type] { padding: 4px 0 8px; }
.field > input[type]:focus,
.boxed:focus-within { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field input::placeholder { color: var(--text-faint); }

.boxed { display: flex; align-items: center; }

.field select {
  cursor: pointer;
  padding: 4px 32px 8px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ffffff' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 14px 8px;
}
.field select option { background: var(--surface); color: var(--text); }
.field select:invalid { color: var(--text-muted); }

.phone select { width: auto; padding-right: 26px; background-position: right 6px center; }
.field .phone input[type] { flex: 1; min-width: 0; margin: 2px 0 6px; padding: 2px 0 2px 14px; border-left: 1px solid var(--line); }

.check {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.check input {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  border: 1px solid var(--text-faint);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

.privacy-link {
  margin-top: -14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-underline-offset: 3px;
  justify-self: start;
}
.privacy-link:hover { color: var(--text); }

.intro-form .btn { justify-self: start; margin-top: -4px; }
.intro-form .fine { margin: -18px 0 0; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }

.field.invalid > input[type],
.field.invalid .boxed { border-bottom-color: var(--error); }
.field-error { margin: 8px 0 0; font-size: 13px; color: var(--error); }
.field-error:empty { display: none; }

.intro-done { margin-top: 134px; }
.intro-done .display-sm { margin-top: 0; }
.intro-done h3:focus { outline: none; }
.intro-done .intro-copy { margin-top: 24px; max-width: 420px; }
.text-link { display: inline-block; margin-top: 32px; font-size: 14px; font-weight: 500; text-underline-offset: 5px; text-decoration-color: var(--accent); }

.intro .rule-footer { letter-spacing: 0.32em; text-transform: uppercase; padding-top: 48px; }

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .intro-grid { grid-template-columns: 1fr; }
  .display-sm { margin-top: 48px; }
  .intro-copy { margin-top: 20px; font-size: 17px; }
  .intro-side hr { display: none; }
  .intro-form, .intro-done { margin-top: 16px; }
}

@media (max-width: 767px) {
  .watermark { display: none; }
}

@media (max-width: 520px) {
  .logo { gap: 8px; }
  .logo img { height: 22px; }
  .logo-health { font-size: 18px; }
  .intro-side .logo img { height: 22px; }
  .intro-side .logo-health { font-size: 18px; }
  .brand-lockup .brand-sub { gap: 10px; }
  .brand-lockup .brand-sub::before, .brand-lockup .brand-sub::after { min-width: 10px; }
  .arrival { padding-top: 56px; }
  .intro { padding-top: 64px; }
  .intro-top { gap: 0; right: 4px; top: 10px; }
  .arrival > .lang-toggle { right: 8px; top: 6px; }
  .brand-sub { gap: 14px; letter-spacing: 0.3em; }
  .brand-sub span { margin-right: -0.3em; }
  .brand-sub::before, .brand-sub::after { width: 40px; }
  .eyebrow { font-size: 11px; }
  .btn { width: 100%; }
  .intro-form { grid-template-columns: 1fr; gap: 26px; }
  .intro-form .btn { justify-self: stretch; }
  .intro .rule-footer { letter-spacing: 0.2em; font-size: 11px; }
}

/* Long CTA labels (Spanish) on narrow phones */
@media (max-width: 420px) {
  .btn { padding: 0 22px; gap: 10px; font-size: 18px; }
  .hero .btn .arrow { display: none; }
}
@media (max-width: 340px) {
  .btn { padding: 0 16px; font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Privacy notice ---------- */

.legal { width: 100%; max-width: 680px; margin: 0 auto; padding: 64px 0 24px; text-align: left; font-size: 16px; line-height: 1.7; }
.legal .display-sm { margin: 0 0 12px; }
.legal-updated { margin: 0 0 40px; font-size: 13px; color: var(--text-muted); }
.legal h2 { margin: 36px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 20px; }
.legal strong { font-weight: 600; }
.legal a { text-underline-offset: 3px; text-decoration-color: var(--accent); }
