/* =========================================================
   Aptly landing page — styles
   Tokens follow the Aptly Landing Page Build Guide v1.0
   ========================================================= */

:root {
  /* Color */
  --bg: #F8F7F2;          /* warm off-white */
  --forest: #183F33;      /* wordmark, headings, buttons */
  --forest-hover: #0F2D24;
  --sage: #A8B9A5;        /* small accents, chips, hover details */
  --sage-soft: #E8EEE6;
  --ink: #26332C;         /* body text */
  --muted: #4D5B53;
  --line: #DDE3DA;        /* borders */
  --surface: #FFFFFF;
  --error: #A3321F;
  --focus: #2F6B57;

  /* Type */
  --font-head: "Manrope", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout (8px rhythm) */
  --max: 1160px;
  --pad: 32px;
  --section: 104px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--forest);
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  background: var(--forest); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--forest);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-hover); border-color: var(--forest-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--forest); }
.btn-secondary:hover { background: var(--sage-soft); color: var(--forest); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.925rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Logo (Node A + wordmark) ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest);
  text-decoration: none;
}
.logo-mark { width: 30px; height: 30px; color: var(--forest); }
.logo-word {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.logo-dot { color: var(--sage); }
.logo-light,
.logo-light .logo-mark { color: #fff; }
.logo-light:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 242, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}
.header-nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--forest); border-bottom-color: var(--sage); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 var(--section); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
.lede {
  margin-top: 24px;
  font-size: 1.15rem;
  max-width: 54ch;
  color: var(--ink);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.microcopy { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }

/* Hero visual: conceptual profile card */
.hero-visual { margin: 0; position: relative; }
.hero-visual::before {
  /* the Node A apex, echoed as a soft sage disc behind the card */
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  right: -40px; top: -48px;
  border-radius: 50%;
  background: var(--sage-soft);
  z-index: 0;
}
.profile-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 24px 48px -32px rgba(24, 63, 51, 0.35);
}
.profile-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--sage-soft);
  display: grid; place-items: center;
  color: var(--forest);
}
.avatar svg { width: 30px; height: 30px; }
.profile-name { font-family: var(--font-head); font-weight: 700; color: var(--forest); font-size: 1.1rem; }
.profile-role { color: var(--muted); font-size: 0.92rem; }
.profile-block { padding-top: 20px; }
.block-label { font-weight: 600; font-size: 0.85rem; color: var(--forest); margin-bottom: 10px; }
.optional-tag {
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}
.profile-note { font-size: 0.92rem; color: var(--muted); }
.profile-optional {
  margin-top: 20px;
  padding: 16px;
  border: 1.5px dashed var(--sage);
  border-radius: var(--radius);
}
.profile-optional.profile-block { padding-top: 16px; }
.profile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.soon {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--forest);
  background: var(--sage-soft);
  border: 1px solid var(--sage);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Chips ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest);
  background: var(--sage-soft);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 999px;
}
.chip-soft { background: transparent; border-color: var(--line); color: var(--ink); }
.chips-lg .chip { font-size: 0.95rem; padding: 10px 16px; background: var(--surface); border-color: var(--line); }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-tint { background: var(--sage-soft); }
.section-title {
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 700;
  max-width: 20ch;
}
.body-lg { margin-top: 20px; font-size: 1.1rem; max-width: 56ch; }
.caveat { margin-top: 28px; font-size: 0.875rem; color: var(--muted); }

/* Why Aptly */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 48px;
}
.feature { border-top: 2px solid var(--forest); padding-top: 24px; }
.feature h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.feature p { color: var(--ink); max-width: 36ch; }

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 48px 0 40px;
}
.steps {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.steps h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.steps ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid; place-items: center;
}

/* For employers */
.employers-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}
.employers-grid .btn { margin-top: 32px; }
.employer-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--bg);
}
.panel-label { font-weight: 600; color: var(--forest); margin-bottom: 16px; }

/* ---------- Signup ---------- */
.section-forest { background: var(--forest); color: #fff; }
.section-forest .section-title { color: #fff; }
.section-forest .body-lg { color: #E4EAE2; }
.signup-wrap {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 64px;
  align-items: start;
}
.signup-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--sage-soft);
  border-radius: 999px;
  margin-bottom: 28px;
}
.tab {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.tab:hover { background: rgba(255, 255, 255, 0.6); }
.tab[aria-selected="true"] { background: var(--forest); color: #fff; }

.waitlist-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label,
.field legend { font-weight: 600; font-size: 0.9rem; color: var(--forest); padding: 0; }
.field legend { margin-bottom: 10px; }
.hint { font-weight: 400; color: var(--muted); }
.req { color: var(--error); }

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--sage); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--forest);
}
[aria-invalid="true"] { border-color: var(--error); }

.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.check-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
}
.field .check { font-weight: 400; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--forest); flex-shrink: 0; margin: 0; }
.check-consent { align-items: flex-start; min-height: 0; padding: 4px 0; font-size: 0.9rem; }
.check-consent input { margin-top: 2px; }
.consents { display: grid; gap: 8px; }

.field-error { color: var(--error); font-size: 0.85rem; min-height: 0; }
.field-error:empty { display: none; }
.char-count { font-size: 0.8rem; color: var(--muted); text-align: right; }
.form-status { font-size: 0.95rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }
.form-status.is-info { color: var(--forest); }

.form-success {
  padding: 32px 8px;
  text-align: center;
}
.form-success::before {
  content: "";
  display: block;
  width: 48px; height: 48px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--sage);
}
.form-success h3 { font-size: 1.5rem; margin-bottom: 10px; }
.form-success p { max-width: 40ch; margin: 0 auto; }

/* Honeypot: hidden from people, visible to bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: calc(840px + var(--pad) * 2); }
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 16px 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--forest);
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 12px; height: 12px;
  flex-shrink: 0;
  border-right: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 24px; max-width: 64ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest); color: #E4EAE2; padding: 56px 0 32px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.tagline {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { color: #fff; text-decoration: none; padding: 10px 0; }
.footer-links a:hover { text-decoration: underline; color: #fff; }
.copyright { padding-top: 24px; font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --section: 80px; }
  .hero-grid,
  .employers-grid,
  .signup-wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-visual { max-width: 480px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 720px) {
  :root { --pad: 20px; --section: 56px; }
  .header-nav .nav-link { display: none; }
  .header-inner { min-height: 64px; }
  .hero { padding: 48px 0 var(--section); }
  .steps-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 32px 0; }
  .steps, .employer-panel, .signup-card { padding: 24px 20px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .check-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-row .btn { flex: 1 1 100%; }
  .hero-visual::before { width: 200px; height: 200px; right: -20px; top: -32px; }
}

@media (max-width: 360px) {
  .check-grid { grid-template-columns: minmax(0, 1fr); }
  .logo-word { font-size: 1.4rem; }
  .btn-sm { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
