/* ============================================================================
   Stoic Software — site.css
   Page layout for the public site. All branding (tokens, type, links, buttons,
   forms, tables, rules) lives in brand.css — link that first. Nothing in this
   file may introduce a colour, font, radius or shadow of its own.
   ========================================================================== */

/* ==================== Shell ==================== */

.container {
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* Long-form pages read as one set column. */
.container.narrow {
  max-width: 56rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* ==================== Masthead ==================== */

.masthead {
  border-bottom: 3px solid var(--black);
  background: var(--white);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-block: 1.3rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.wordmark img {
  height: 1.5rem;
  width: auto;
  display: block;
}

.masthead nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.masthead nav a {
  color: var(--black);
  text-decoration: none;
  padding-block: 0.2rem;
  transition: color 150ms ease;
}

.masthead nav a:hover {
  color: var(--red);
}

.masthead nav a.active {
  border-bottom: 2px solid var(--red);
}

.masthead nav .nav-cta {
  background: var(--black);
  color: var(--white);
  padding: 0.55rem 1rem;
  transition: background-color 150ms ease;
}

.masthead nav .nav-cta:hover {
  background: var(--red);
  color: var(--white);
}

/* ==================== Section rhythm ==================== */

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

/* Every section opens with the 2px rule — structure is visible. */
.section > .container {
  border-top: 2px solid var(--black);
  padding-top: clamp(1.2rem, 2.5vw, 1.8rem);
}

.section-band {
  background: var(--paper);
}

/* ==================== Hero ==================== */

.hero {
  padding-block: clamp(4rem, 10vw, 7.5rem) clamp(3.5rem, 8vw, 6rem);
}

.hero h1 {
  max-width: 26ch;
  margin-bottom: 1.4rem;
}

.hero .lede {
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem 2rem;
}

/* ==================== Vignettes (the problem) ==================== */

.vignettes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-block: 2.2rem 1.8rem;
}

.vignette {
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}

.vignette p {
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 0;
}

.diagnosis {
  font-weight: 700;
  font-size: 1.12rem;
}

/* ==================== Steps (how it works) ==================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-block: 2.2rem 1.4rem;
}

.step {
  border-top: 1px solid var(--hairline);
  padding-top: 0.9rem;
}

.step-num {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 0.9rem;
}

.step h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.step-price {
  font-weight: 700;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 0.8rem;
}

.step p {
  margin-bottom: 0.6rem;
}

.step .fine {
  font-size: 0.88rem;
  color: var(--grey);
}

/* ==================== Proof band ==================== */

.proof .pull {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  max-width: 26ch;
  margin-bottom: 1.2rem;
}

.proof .note {
  max-width: var(--measure);
  display: block;
  margin-bottom: 1.6rem;
}

/* ==================== Two-column sections ==================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2.5rem 5rem;
  align-items: start;
}

/* The 2px section rule spans the whole container; columns sit under it. */
.section > .container.split {
  grid-template-rows: auto;
}

/* ==================== Guardrails ==================== */

.guardrails {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

.guardrails li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1.2rem;
  border-top: 1px solid var(--hairline);
  padding-block: 1.1rem;
  margin: 0;
}

.guardrails li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.guardrails .index {
  color: var(--grey);
  padding-top: 0.15rem;
}

.guardrails p {
  margin: 0;
  max-width: none;
}

.escalation {
  border-left: 3px solid var(--red);
  padding-left: 1.1rem;
  margin-top: 1.8rem;
  font-size: 1.02rem;
}

/* ==================== The person ==================== */

.person-sig {
  font-weight: 500;
  color: var(--grey);
  margin-top: 1.6rem;
}

/* ==================== Pricing table ==================== */

.tablewrap {
  overflow-x: auto;
  margin-block: 1.8rem 1rem;
}

/* ==================== FAQ ==================== */

.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq details:first-child {
  border-top: 1px solid var(--hairline);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 2rem;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.05rem;
  font-weight: 500;
  font-size: 1.02rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+" / "";
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--red);
  justify-self: end;
}

.faq details[open] summary::after {
  content: "\2013" / "";
}

.faq details p {
  margin: 0 0 1.2rem;
  max-width: 40rem;
}

/* ==================== Final CTA — flush left, like everything else ==================== */

.close-cta {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.close-cta > .container {
  border-top: 2px solid var(--black);
  padding-top: clamp(1.2rem, 2.5vw, 1.8rem);
}

.close-cta h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  max-width: 26ch;
  margin-bottom: 1.2rem;
}

.close-cta p {
  margin-bottom: 1.8rem;
}

.close-cta .note {
  display: block;
  margin-top: 1.4rem;
  margin-bottom: 0;
}

/* ==================== Booking form page ==================== */

.form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2.5rem 5rem;
  align-items: start;
}

.form-promise {
  font-weight: 700;
}

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

.footer {
  border-top: 3px solid var(--black);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 5rem;
  padding-block: 2.4rem 2.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey);
}

.footer-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.footer-legal {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 1.2rem;
}

/* ==================== Content pages ==================== */

.page-header {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
}

.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  max-width: 22ch;
}

.prose {
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.prose h2 {
  font-size: 1.45rem;
  margin-top: 2.6rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--black);
}

.prose h3 {
  margin-top: 2rem;
}

/* ==================== Error pages ==================== */

.error-page {
  padding-block: clamp(4.5rem, 11vw, 8rem);
}

.error-page .code {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

/* ==================== Consent banner ==================== */

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--white);
  border-top: 3px solid var(--black);
}

.consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-block: 1rem;
}

.consent-inner p {
  margin: 0;
  font-size: 0.92rem;
  max-width: 46rem;
}

.consent-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ==================== Responsive ==================== */

@media (max-width: 56rem) {
  .vignettes,
  .steps {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .split,
  .form-page {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
