/* ============================================================
   Peninsula Aesthetic Medicine — Waitlist
   Four colors in strict proportion. Three type families.
   ============================================================ */

:root {
  --ivory:       #FAF9F6;   /* 70% — primary surface */
  --deep-slate:  #2A333D;   /* 22% — ink, lines, reversed surfaces */
  --soft-gray:   #D8DCE0;   /* 6%  — dividers, disabled states */
  --ice-blue:    #B8CEDA;   /* 2%  — accent only, never for text */

  --slate-55:    rgba(42, 51, 61, 0.55);
  --slate-22:    rgba(42, 51, 61, 0.22);

  --font-display: 'Cormorant Infant', 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --page-max: 80rem;
  --measure: 34rem;

  --rule: 1px solid var(--soft-gray);
}

@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--deep-slate);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  border-top: 3px solid var(--ice-blue);
}

img, svg { display: block; max-width: 100%; height: auto; }

::selection { background: var(--ice-blue); color: var(--deep-slate); }

a { color: inherit; }

/* Accessible focus ring — 3:1 contrast against ivory */
:focus-visible {
  outline: 2px solid var(--deep-slate);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: var(--gutter);
  top: var(--gutter);
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: var(--deep-slate);
  color: var(--ivory);
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ============================================================
   Type system
   ============================================================ */

.eyebrow,
.mono-label,
.mono-meta,
.mono-num {
  font-family: var(--font-mono);
  font-weight: 400;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 0.6875rem;     /* M3: 11px */
  line-height: 1.6;
  letter-spacing: 0.16em;
  color: var(--slate-55);
  margin: 0 0 1.5rem;
}

.display-1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.04;
  font-size: clamp(2.5rem, 7.5vw, 5.25rem);
  margin: 0;
  color: var(--deep-slate);
  text-wrap: balance;
}

.display-2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0;
}

.display-3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.12;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  font-size: 1.375rem;        /* ~H3 22px */
  margin: 0 0 0.5rem;
  color: var(--deep-slate);
}

.body-1 {
  font-size: 1.0625rem;       /* 17px — reads close to B1 */
  line-height: 1.6;
  margin: 0 0 1rem;
  color: var(--deep-slate);
  max-width: var(--measure);
}

.body-2 {
  font-size: 0.9375rem;       /* ~15px — close to B3 */
  line-height: 1.55;
  margin: 0;
  color: var(--slate-55);
  max-width: 34rem;
}

.mono-label {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--deep-slate);
}

.mono-meta {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--slate-55);
  margin: 0;
  line-height: 1.9;
}

.mono-num {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--slate-55);
  margin: 0 0 0.75rem;
}

.optional {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--slate-55);
}

.text-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--deep-slate);
  border-bottom: 1px solid var(--slate-22);
  padding-bottom: 2px;
  transition: border-color 160ms ease;
}
.text-link:hover { border-color: var(--deep-slate); }

/* ============================================================
   Layout — header, sections, rules
   ============================================================ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) var(--gutter);
  border-bottom: var(--rule);
}

.lockup {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: var(--deep-slate);
}

.lockup-mark {
  display: inline-flex;
  width: 52px;
  height: 52px;
  color: var(--deep-slate);
  flex-shrink: 0;
}

.lockup-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.lockup-word {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.lockup-sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-55);
}

.site-header-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-55);
  margin: 0;
}

@media (max-width: 520px) {
  .site-header-meta { display: none; }
}

main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  padding: clamp(3rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  max-width: 60rem;
}

.hero-lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--slate-55);
  max-width: 38rem;
  margin: 1.75rem 0 2rem;
}

.hero-cue { margin: 0; }

.rule {
  border: none;
  border-top: var(--rule);
  margin: 0;
}

.focus,
.approach {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.founders {
  background: var(--ice-blue);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  margin: clamp(2rem, 4vw, 3.5rem) 0 clamp(2rem, 5vw, 4rem);
}

.founders .form-row input {
  border-bottom-color: rgba(42, 51, 61, 0.3);
}

.founders .form-row input:hover {
  border-bottom-color: var(--deep-slate);
}

.founders .form-row input::placeholder {
  color: rgba(42, 51, 61, 0.5);
  opacity: 1;
}

.focus-head { margin-bottom: 2.5rem; }

.focus-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: var(--rule);
}

.focus-item {
  padding: 2rem 0;
  border-bottom: var(--rule);
}

@media (min-width: 720px) {
  .focus-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
  }
  .focus-item { padding: 2.25rem 0; }
  /* Remove the second-to-last bottom border on right column pairs */
  .focus-item:nth-last-child(2) { border-bottom: var(--rule); }
}

@media (min-width: 1080px) {
  .focus-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 3rem;
  }
}

.approach {
  max-width: 50rem;
}

/* ============================================================
   Form
   ============================================================ */

.form {
  margin-top: 2.5rem;
  max-width: 36rem;
  display: grid;
  gap: 1.5rem;
}

.form-row { display: grid; gap: 0.5rem; }

.form-row input {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--slate-22);
  border-radius: 0;
  padding: 0.625rem 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--deep-slate);
  transition: border-color 160ms ease;
  width: 100%;
}

.form-row input::placeholder {
  color: var(--slate-55);
  opacity: 0.6;
}

.form-row input:hover { border-bottom-color: var(--slate-55); }

.form-row input:focus-visible {
  outline: none;
  border-bottom-color: var(--deep-slate);
  border-bottom-width: 2px;
  padding-bottom: calc(0.625rem - 1px);
}

.form-row input[aria-invalid="true"] {
  border-bottom-color: var(--deep-slate);
  border-bottom-width: 2px;
  padding-bottom: calc(0.625rem - 1px);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  margin-top: 0.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--deep-slate);
  color: var(--ivory);
  border: 1px solid var(--deep-slate);
  padding: 0.875rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.btn-primary:hover {
  background: var(--ivory);
  color: var(--deep-slate);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--deep-slate);
  outline-offset: 3px;
}

.btn-primary[aria-busy="true"] {
  opacity: 0.7;
  cursor: wait;
}

.btn-primary[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-arrow { transition: transform 180ms ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.form-footnote {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--slate-55);
  margin: 0;
  max-width: 26rem;
  line-height: 1.5;
}

.form-status {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
  min-height: 1.5em;
}

.form-status[data-state="error"] { color: var(--deep-slate); }
.form-status[data-state="error"]::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 1px;
  background: var(--deep-slate);
  vertical-align: middle;
  margin-right: 0.5rem;
  transform: translateY(-2px);
}

.form-status[data-state="success"] { color: var(--deep-slate); }

/* Confirmed state — replace the form with a quiet acknowledgment */
.form[data-state="success"] .form-row,
.form[data-state="success"] .form-actions { display: none; }

.form[data-state="success"] .form-status {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--deep-slate);
  max-width: 32rem;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: var(--rule);
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) clamp(1.75rem, 3vw, 2.5rem);
}

.footer-grid {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
  grid-template-columns: auto 1fr;
  align-items: start;
}

.footer-mark {
  width: 96px;
  height: 96px;
  color: var(--deep-slate);
  flex-shrink: 0;
}

.footer-meta { align-self: center; }

.footer-fine {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.5rem;
  border-top: var(--rule);
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--slate-55);
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: auto 1fr auto;
  }
  .footer-fine {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
