/* gabrieldealmeida.com
   Look: Midnight and Graphite, Paper type, one Amber accent, Inter throughout.
   Amber appears once per section, on a single word. Never as a fill. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --midnight: #0b0b0d;
  --graphite: #1c1c1f;
  --paper: #f5f5f7;
  --soft: #d2d2d7;
  --fog: #a1a1a6;
  --amber: #f2a541;
  --error: #ff8a80;
  --line: rgba(245, 245, 247, 0.12);
  --line-strong: rgba(245, 245, 247, 0.22);

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--midnight);
  color: var(--paper);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--paper); }

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

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--midnight);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 16px; }

.accent { color: var(--amber); }

/* ---------- header ---------- */

.bar { padding-block: 28px 0; }
.bar-inner { display: flex; align-items: center; }
.wordmark {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark .dot { color: var(--amber); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
  padding-block: clamp(56px, 10vw, 128px) clamp(72px, 10vw, 128px);
}

h1 {
  font-size: clamp(42px, 7.2vw, 80px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.lede {
  margin-top: 28px;
  max-width: 34em;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.5;
  color: var(--soft);
  text-wrap: pretty;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.facts li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fog);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- cards and form ---------- */

.card {
  background: var(--graphite);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form { padding: clamp(24px, 4vw, 36px); }
.form-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.form-sub { margin-top: 6px; color: var(--fog); font-size: 15px; }

.field { margin-top: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--soft);
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  background: var(--midnight);
  color: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 17px; /* 16px or more stops iOS from zooming the page on focus */
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder,
textarea::placeholder { color: var(--fog); opacity: 0.7; }
textarea { height: auto; min-height: 96px; padding: 14px 16px; line-height: 1.45; resize: vertical; }
input:hover,
textarea:hover { border-color: rgba(245, 245, 247, 0.34); }
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(242, 165, 65, 0.18);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] { border-color: var(--error); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 138, 128, 0.2); }

/* Browsers paint autofilled fields pale yellow. Keep them on brand. */
input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--paper);
  caret-color: var(--paper);
  -webkit-box-shadow: 0 0 0 1000px var(--midnight) inset;
  transition: background-color 9999s ease-out 0s;
}

.error,
.hint {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.error { color: var(--error); }
.hint { color: var(--soft); }

.linkish {
  padding: 0;
  background: none;
  border: 0;
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  margin-top: 24px;
  padding: 0 24px;
  background: var(--paper);
  color: var(--midnight);
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { background: #ffffff; }
.btn:active { transform: scale(0.99); }
.btn[disabled] { cursor: not-allowed; opacity: 0.4; }
.btn[aria-busy="true"] { cursor: default; opacity: 0.85; }
.btn:focus-visible { outline-offset: 3px; border-radius: var(--radius-sm); }
.btn-inline { width: auto; margin-top: 0; }

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(11, 11, 13, 0.25);
  border-top-color: var(--midnight);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 138, 128, 0.4);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 15px;
  line-height: 1.4;
}

.fine {
  margin-top: 20px;
  color: var(--fog);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- sections ---------- */

.section { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.section-head { max-width: 40em; }

h2 {
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}
.section-head p {
  margin-top: 18px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 19px);
  text-wrap: pretty;
}

.tests { margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
.tests li {
  display: grid;
  grid-template-columns: 48px minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 8px 24px;
  align-items: baseline;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}
.num {
  color: var(--fog);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.tests p { color: var(--soft); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.stops { padding: 8px 28px; }
.stops li {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-weight: 500;
}
.stops li:last-child { border-bottom: 0; }

.verdicts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.verdicts .card { padding: 28px; }
.verdicts p { margin-top: 8px; color: var(--soft); }

.about {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}
.portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.about h2 { font-size: clamp(28px, 4vw, 40px); }
.about p { margin-top: 18px; max-width: 36em; color: var(--soft); text-wrap: pretty; }
.about h2 + p { margin-top: 20px; }

.closer {
  padding-block: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--line);
  text-align: center;
}
.closer h2 { font-size: clamp(34px, 6vw, 64px); }
.closer .btn { margin-top: 36px; padding-inline: 32px; }

/* ---------- footer ---------- */

.footer { padding-block: 40px calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 20px; }
.social { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.social a { color: var(--soft); font-size: 15px; font-weight: 500; text-decoration: none; }
.social a:hover { color: var(--paper); }
.disclaimer { max-width: 44em; color: var(--fog); font-size: 13px; line-height: 1.55; }

/* ---------- thanks, privacy, 404 ---------- */

.page { padding-block: clamp(56px, 9vw, 112px) clamp(72px, 10vw, 128px); }
.page h1 { font-size: clamp(38px, 6.4vw, 68px); max-width: 14em; }
.page .lede { margin-top: 24px; }
.page .btn { width: auto; margin-top: 36px; padding-inline: 32px; }

.steps { display: grid; gap: 16px; margin-top: clamp(40px, 6vw, 72px); counter-reset: step; }
.steps li {
  position: relative;
  padding: 22px 24px 22px 68px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 22px;
  color: var(--fog);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 19px; }
.steps p { margin-top: 4px; color: var(--soft); }

.prose { max-width: 40em; }
.prose h1 { margin-bottom: 12px; }
.prose h2 { margin-top: 44px; font-size: 24px; letter-spacing: -0.02em; }
.prose p, .prose li { margin-top: 12px; color: var(--soft); }
.prose ul { margin-top: 12px; padding-left: 22px; list-style: disc; }
.prose .meta { color: var(--fog); font-size: 14px; }

/* ---------- motion ---------- */

html.reveal-ready [data-reveal]:not(.in) { opacity: 0; transform: translateY(16px); }
[data-reveal] { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; }
  html.reveal-ready [data-reveal]:not(.in) { opacity: 1; transform: none; }
}

/* ---------- smaller screens ---------- */

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 40px 72px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .tests li { grid-template-columns: 32px minmax(0, 1fr); }
  .tests li p { grid-column: 2; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero .facts { display: none; }
  .lede { margin-top: 20px; }
  .hero { gap: 32px; padding-block: 32px 64px; }
  .bar { padding-top: 20px; }
  .verdicts { grid-template-columns: minmax(0, 1fr); }
  .verdicts .card { padding: 22px; }
  .stops { padding-inline: 20px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { width: 96px; height: 96px; }
  .closer .btn { width: 100%; }
  .page .btn { width: 100%; }
  .steps li { padding: 20px 20px 20px 56px; }
  .steps li::before { left: 20px; top: 20px; }
}


/* ---------- the test ---------- */

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.no-print { }
.print-only { display: none; }

.progress { position: sticky; top: 0; z-index: 5; height: 3px; margin-top: 20px; background: var(--line); }
.progress-fill { display: block; width: 0; height: 100%; background: var(--paper); transition: width 0.3s var(--ease); }

.quiz { max-width: calc(700px + var(--gutter) * 2); padding-block: clamp(28px, 6vw, 64px) clamp(56px, 8vw, 96px); outline: none; }
.quiz .bar { padding: 0; }

.q-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 32px; margin-bottom: 28px; }
.back { padding: 6px 0; background: none; border: 0; color: var(--soft); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.back:hover { color: var(--paper); }
.q-meta { margin-left: auto; color: var(--fog); font-size: 13px; font-weight: 500; }

.q-title { font-size: clamp(26px, 5vw, 38px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance; outline: none; }
.q-big { font-size: clamp(42px, 9vw, 76px); line-height: 1.02; letter-spacing: -0.035em; }
.q-hint { margin-top: 10px; color: var(--fog); font-size: 16px; }
.quiz .lede { margin-top: 16px; max-width: none; font-size: 18px; }
.quiz .facts { margin-top: 24px; }
.quiz .fine { margin-top: 16px; }
.field-hint { margin-top: 6px; }
.field legend { margin-bottom: 8px; padding: 0; color: var(--soft); font-size: 14px; font-weight: 500; }

.actions { display: grid; gap: 12px; margin-top: 28px; }
.actions .btn { width: 100%; margin-top: 0; }
.btn-secondary { background: transparent; color: var(--paper); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: var(--graphite); }

.choices, .stack { display: grid; gap: 12px; margin-top: 24px; }
.choice {
  position: relative;
  display: block;
  padding: 18px 20px;
  background: var(--graphite);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.choice:hover { border-color: rgba(245, 245, 247, 0.4); }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-text { font-size: 17px; line-height: 1.4; }
.choice.is-selected { background: var(--paper); border-color: var(--paper); color: var(--midnight); }
.choice:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 3px; }

.stop { padding: 20px 22px; }
.stop-title { padding: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.stop-text { margin-top: 6px; color: var(--soft); font-size: 15px; line-height: 1.5; }
.yn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.pill:hover span { border-color: rgba(245, 245, 247, 0.4); }
.pill input:checked + span { background: var(--paper); border-color: var(--paper); color: var(--midnight); }
.pill input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 3px; }

.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--soft); font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--paper); }
/* The .needs prefix keeps these rows from picking up the plain form-label style. */
.needs { display: grid; gap: 10px; margin-top: 12px; }
.needs .need { display: flex; align-items: center; gap: 16px; margin: 0; padding: 14px 18px; background: var(--graphite); border: 1px solid var(--line-strong); border-radius: 14px; color: var(--paper); font-size: 16px; font-weight: 400; cursor: pointer; transition: border-color 0.15s; }
.needs .need:hover { border-color: rgba(245, 245, 247, 0.4); }
.needs .need:has(input:checked) { border-color: var(--paper); }
.needs .need input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--paper); }
.needs .need span { line-height: 1.35; }
.readout.needs-heavy { color: var(--amber); }
.readout { min-height: 1.5em; margin-top: 14px; color: var(--soft); font-size: 15px; }

.napkin-out { display: grid; grid-template-columns: 1fr auto; margin: 22px 0 0; border-top: 1px solid var(--line); }
.napkin-out dt, .napkin-out dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.napkin-out dt { color: var(--soft); }
.napkin-out dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.note {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--midnight);
  border-left: 3px solid var(--amber);
  border-radius: 0 12px 12px 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.5;
}
.note strong { color: var(--paper); font-weight: 600; }

/* ---------- results ---------- */

.result-hero { margin-bottom: 8px; }
.result-hero .q-meta { margin: 0 0 12px; }
.panel { margin-top: 20px; padding: 24px; background: var(--graphite); border: 1px solid var(--line); border-radius: 20px; }
.panel h2, .callout h2 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
.callout { margin-top: 20px; padding: 20px 22px; }
.bullets { margin-top: 10px; padding-left: 20px; list-style: disc; color: var(--soft); }
.napkin-line { color: var(--soft); font-size: 16px; line-height: 1.5; }

.bars { display: grid; gap: 16px; margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 54px; gap: 14px; align-items: center; }
.bar-name { font-weight: 500; line-height: 1.25; }
.bar-name em { display: block; margin-top: 2px; color: var(--amber); font-size: 12px; font-style: normal; font-weight: 600; }
.segs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.segs i { height: 10px; border-radius: 3px; background: var(--line-strong); }
.segs i.on { background: var(--paper); }
.is-weakest .segs i.on { background: var(--amber); }
.bar-score { color: var(--soft); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }

.gate { margin-top: 20px; }
.full { margin-top: 32px; }
.full-title { font-size: clamp(26px, 4.4vw, 36px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; outline: none; }
.tips { display: grid; gap: 16px; margin-top: 16px; }
.tips li { padding-top: 16px; border-top: 1px solid var(--line); }
.tips li:first-child { padding-top: 0; border-top: 0; }
.tips p { margin-top: 4px; color: var(--soft); }
.tip-meta { color: var(--fog); font-size: 12px; font-weight: 500; }
.proof-out { margin: 14px 0 0; }
.proof-out dt { margin-top: 14px; color: var(--fog); font-size: 12px; font-weight: 500; }
.proof-out dd { margin: 3px 0 0; }

.close-line { margin-top: 36px; font-size: clamp(24px, 5vw, 34px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }

/* ---------- home: the start card ---------- */

.start-list { display: grid; gap: 10px; margin-top: 18px; }
.start-list li { padding-left: 24px; position: relative; color: var(--soft); font-size: 15px; }
.start-list li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--fog); }

@media (max-width: 560px) {
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-name { grid-column: 1 / -1; }
  .segs { min-width: 150px; }
  .panel { padding: 20px; }
}

/* ---------- printing the results ---------- */

@media print {
  @page { margin: 0.6in; }
  html, body { background: #fff !important; color: #000 !important; }
  .no-print, .progress, .bar, .footer, .gate, .skip { display: none !important; }
  .print-only { display: block !important; }
  .print-brand { margin-bottom: 14px; color: #555; font-size: 12px; }
  .quiz { max-width: none; padding: 0; }
  .panel, .card, .callout { background: #fff !important; border: 1px solid #bbb !important; color: #000 !important; break-inside: avoid; }
  .lede, .fine, .panel p, .tips p, .proof-out dd, .bullets, .napkin-line, .note, .bar-score, .readout { color: #222 !important; }
  .note { background: #fff !important; }
  .tip-meta, .proof-out dt, .q-meta { color: #555 !important; }
  .accent, .bar-name em { color: #b86e00 !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .segs i { background: #ddd !important; }
  .segs i.on { background: #111 !important; }
  .is-weakest .segs i.on { background: #b86e00 !important; }
  .full-title, .q-title, h1, h2 { color: #000 !important; }
}
