/*
Theme Name: Energy Maisons California
Theme URI: https://masons.energy
Description: Mobile-first commercial energy advisory theme with OCR-confirmation flow, dynamic savings response, and rejection screens (BRD v1.3).
Version: 1.3.0
Author: Energy Maisons LLC
Text Domain: energy-maisons
*/

/* ==========================================================================
   1. CSS Custom Properties — Design Tokens
   ========================================================================== */

:root {
  /* Colors */
  --blue-deep:  #3A9AD8;
  --blue-mid:   #5AAEE0;
  --blue-light: #7BBFE8;
  --blue-pale:  #EEF7FC;
  --ink:        #111111;
  --ink-mid:    #555555;
  --ink-light:  #999999;
  --paper:      #ffffff;

  /* Typography */
  --font-base: 'Jost', system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Layout */
  --max-narrow: 480px;
  --max-wide:   680px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(58, 154, 216, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card:   0 4px 24px rgba(58, 154, 216, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 180ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--blue-deep);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--blue-mid);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   3. Layout — Page Containers
   ========================================================================== */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 var(--sp-5);
}

/* Narrow: homepage — phone-like 480px */
.page--narrow {
  max-width: var(--max-narrow);
  margin-left: auto;
  margin-right: auto;
}

/* Wide: terms & inner pages — 680px */
.page--wide {
  max-width: var(--max-wide);
  margin-left: auto;
  margin-right: auto;
}

.content {
  flex: 1;
  padding: var(--sp-8) 0;
}

/* ==========================================================================
   4. Header & Logo
   ========================================================================== */

.site-header {
  padding: var(--sp-6) 0 var(--sp-5);
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: inherit;
  text-decoration: none;
}

.logo:hover {
  color: inherit;
}

.logo-mark {
  flex-shrink: 0;
  /* slight vertical nudge to optically center with text */
  margin-top: 2px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-energy {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.logo-sub {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.logo-maisons {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--ink-mid);
  letter-spacing: 0.01em;
}

.logo-california {
  font-size: 0.625rem;
  font-weight: 400;
  color: var(--blue-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   5. Hero Section
   ========================================================================== */

.hero {
  padding: var(--sp-10) 0 var(--sp-8);
  text-align: center;
  animation: fadeUp var(--duration-slow) var(--ease-out) both;
}

/* H1 reset — let inner spans drive the visual */
.hero-headline {
  margin: 0 0 var(--sp-6);
  padding: 0;
  font-weight: inherit;
  display: block;
}

.hero-stat {
  display: block;
  font-size: clamp(3.5rem, 18vw, 5.5rem);
  font-weight: 200;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--sp-3);
}

.hero-text {
  display: block;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.55;
  max-width: 320px;
  margin: 0 auto;
}

.hero-callout {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-2);
  background: var(--blue-pale);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-5);
  animation: fadeUp var(--duration-slow) var(--ease-out) 120ms both;
}

.hero-callout-num {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--blue-deep);
  letter-spacing: -0.02em;
}

.hero-callout-text {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.4;
  max-width: 180px;
  text-align: left;
}

/* ==========================================================================
   6. Utility Pills Row
   ========================================================================== */

.utility-row {
  margin: 0 calc(-1 * var(--sp-5));
  padding: var(--sp-1) 0 var(--sp-2);
  animation: fadeUp var(--duration-slow) var(--ease-out) 200ms both;
}

.utility-scroll {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding: var(--sp-2) var(--sp-5);
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.utility-scroll::-webkit-scrollbar {
  display: none;
}

.utility-pill {
  flex-shrink: 0;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-mid);
  background: transparent;
  border: 1px solid #dde8f0;
  border-radius: var(--radius-pill);
  padding: 5px var(--sp-3);
  letter-spacing: 0.01em;
  transition: border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.utility-pill:hover {
  border-color: var(--blue-light);
  color: var(--blue-deep);
  background: var(--blue-pale);
}

/* ==========================================================================
   7. CTA Section
   ========================================================================== */

.cta-section {
  padding: var(--sp-10) 0 var(--sp-8);
  text-align: center;
  animation: fadeUp var(--duration-slow) var(--ease-out) 280ms both;
}

.cta-title {
  font-size: clamp(1.5rem, 7vw, 2rem);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-6);
}

.cta-sub {
  margin-top: var(--sp-3);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-light);
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 400;
  color: var(--paper);
  background: var(--blue-deep);
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px var(--sp-8);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
  box-shadow: 0 2px 12px rgba(58, 154, 216, 0.30);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
  background: var(--blue-mid);
  box-shadow: 0 4px 20px rgba(58, 154, 216, 0.40);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(58, 154, 216, 0.25);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-cta {
  font-size: 1.0625rem;
  padding: 18px var(--sp-10);
}

/* ==========================================================================
   8. Steps
   ========================================================================== */

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 0 0 var(--sp-6);
  animation: fadeUp var(--duration-slow) var(--ease-out) 350ms both;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue-deep);
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-label {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink-mid);
  text-align: center;
  white-space: nowrap;
}

.step-arrow {
  color: var(--ink-light);
  font-size: 0.875rem;
  margin-bottom: var(--sp-4);
}

/* ==========================================================================
   9. Upload Form
   ========================================================================== */

.upload-form {
  padding: 0 0 var(--sp-10);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.upload-form.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Drop Zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  border: 1.5px dashed #c5d9e8;
  border-radius: var(--radius-md);
  padding: var(--sp-10) var(--sp-6);
  background: var(--blue-pale);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--blue-mid);
  background: #e3f2fb;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone-text {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--ink-mid);
  text-align: center;
  line-height: 1.5;
}

/* File Preview */
.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
}

.file-name {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.file-remove {
  font-size: 0.75rem;
  color: var(--ink-light);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.file-remove:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.05);
}

/* Form Fields with Floating Labels */
.form-fields {
  display: flex;
  flex-direction: column;
  margin-top: var(--sp-6);
}

.field {
  position: relative;
  display: block;
  border-bottom: 1px solid #dde8f0;
  cursor: text;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.field:last-child {
  border-bottom: none;
}

.field input {
  width: 100%;
  padding: 22px 0 10px;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
}

/* Use a single space placeholder so :placeholder-shown reflects "empty value" */
.field input::placeholder {
  color: transparent;
}

.field-label {
  position: absolute;
  top: 22px;
  left: 0;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-light);
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

/* Float label up when field is focused or has a value */
.field input:focus ~ .field-label,
.field input:not(:placeholder-shown) ~ .field-label {
  transform: translateY(-18px) scale(0.7);
  color: var(--blue-deep);
}

/* Focused field — subtle border emphasis */
.field:focus-within {
  border-bottom-color: var(--blue-deep);
}

/* Validation error state — red border + red label, driven by aria-invalid */
.field:has(input[aria-invalid="true"]) {
  border-bottom-color: #c0392b;
}

.field input[aria-invalid="true"] ~ .field-label {
  color: #c0392b;
}

/* Consent Checkbox */
.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
  cursor: pointer;
}

.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--blue-deep);
  cursor: pointer;
}

.consent span {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.55;
}

.consent a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Privacy / Trust Note */
.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ink-light);
  margin: var(--sp-4) 0 var(--sp-3);
  line-height: 1.5;
}

.privacy-note svg {
  flex-shrink: 0;
  color: var(--blue-mid);
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 17px;
  font-size: 1rem;
}

/* Loading state — spinner before label */
.btn-submit.is-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: emSpin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes emSpin {
  to { transform: rotate(360deg); }
}

/* Visually-hidden utility — content for screen readers only */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   10. Success State
   ========================================================================== */

.success-state {
  padding: var(--sp-12) 0;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.success-state.visible {
  opacity: 1;
  transform: translateY(0);
}

.success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-6);
  animation: fadeIn var(--duration-slow) var(--ease-out) 100ms both;
}

.success-text {
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto;
}

.success-text strong {
  color: var(--ink);
  font-weight: 500;
}

/* ==========================================================================
   10a. Confirmation State (BRD v1.3 §06 — OCR confirmation screen)
   ========================================================================== */

.confirm-state {
  padding: var(--sp-10) 0;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.confirm-state.visible {
  opacity: 1;
  transform: translateY(0);
}

.confirm-title {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 auto var(--sp-6);
  max-width: 320px;
}

.confirm-fields {
  margin: 0 auto var(--sp-6);
  max-width: 360px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid #edf2f5;
  text-align: left;
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-row dt {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.confirm-row dd {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  text-align: right;
  word-break: break-word;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.confirm-actions .btn-primary,
.confirm-actions .btn-secondary {
  width: 100%;
  max-width: 320px;
}

.confirm-hint {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

/* Edit mode */
.confirm-edit {
  max-width: 380px;
  margin: 0 auto;
  text-align: left;
}

.confirm-field-group {
  margin-bottom: var(--sp-4);
}

.confirm-field-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.confirm-field-group input,
.confirm-field-group select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 300;
  font-family: var(--font-base);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #dde8f0;
  border-radius: var(--radius-sm);
  outline: none;
  -webkit-appearance: none;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.confirm-field-group input:focus,
.confirm-field-group select:focus {
  border-color: var(--blue-deep);
}

.em-field-edit-error {
  font-size: 0.8125rem;
  color: #c0392b;
  margin: 0 0 var(--sp-3);
  line-height: 1.4;
}

/* ==========================================================================
   10b. Rejection States (BRD v1.3 — validation layers L1/L2/L4)
   ========================================================================== */

.reject-state {
  padding: var(--sp-12) 0;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reject-state.visible {
  opacity: 1;
  transform: translateY(0);
}

.reject-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-5);
  animation: fadeIn var(--duration-slow) var(--ease-out) 100ms both;
}

.reject-title {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 360px;
  margin: 0 auto var(--sp-4);
}

.reject-text {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto var(--sp-4);
}

.reject-text strong {
  color: var(--ink);
  font-weight: 500;
}

.reject-utility-list {
  list-style: none;
  padding: 0;
  margin: 0 auto var(--sp-5);
  max-width: 340px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
}

.reject-utility-list li {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--blue-deep);
  background: var(--blue-pale);
  border-radius: var(--radius-pill);
  padding: 5px var(--sp-3);
  letter-spacing: 0.01em;
}

.reject-retry {
  margin: var(--sp-3) auto var(--sp-4);
}

.reject-fallback {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

.reject-fallback a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Variant accents on the icon circle — title/text colour stays neutral */
.reject-state--warn .reject-title {
  /* Subtle warm tint to differentiate from the info/blue rejections */
}

/* Secondary button — outlined variant for L4 "Upload a Different Bill" */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 400;
  color: var(--blue-deep);
  background: transparent;
  border: 1px solid var(--blue-deep);
  border-radius: var(--radius-pill);
  padding: 14px var(--sp-8);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--blue-pale);
}

/* ==========================================================================
   11. Terms & Conditions Page
   ========================================================================== */

/* Document Header */
.tc-header {
  padding: var(--sp-10) 0 var(--sp-8);
  border-bottom: 1px solid #edf2f5;
  margin-bottom: var(--sp-8);
  animation: fadeUp var(--duration-slow) var(--ease-out) both;
}

.tc-kicker {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--blue-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.tc-title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 200;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--sp-4);
}

.tc-meta {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-light);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.tc-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

/* Disclaimer Box */
.tc-disclaimer {
  background: var(--blue-pale);
  border-left: 3px solid var(--blue-deep);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-8);
  animation: fadeUp var(--duration-slow) var(--ease-out) 80ms both;
}

.tc-disclaimer p {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.65;
}

.tc-disclaimer strong {
  color: var(--ink);
  font-weight: 500;
}

/* Table of Contents */
.tc-toc {
  margin-bottom: var(--sp-10);
  padding: var(--sp-5) var(--sp-6);
  background: #fafcfd;
  border: 1px solid #edf2f5;
  border-radius: var(--radius-md);
  animation: fadeUp var(--duration-slow) var(--ease-out) 120ms both;
}

.tc-toc-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.tc-toc-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.tc-toc-list a {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--ink-mid);
  text-decoration: none;
  padding: var(--sp-1) 0;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  transition: color var(--duration-fast) var(--ease-out);
}

.tc-toc-list a:hover {
  color: var(--blue-deep);
}

.tc-toc-num {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink-light);
  min-width: 24px;
}

/* Section Layout */
.tc-section {
  margin-bottom: var(--sp-10);
  padding-top: var(--sp-4);
  border-top: 1px solid #edf2f5;
  scroll-margin-top: var(--sp-6);
  animation: fadeUp var(--duration-slow) var(--ease-out) both;
}

.tc-section-header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.tc-section-num {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--blue-light);
  letter-spacing: 0.06em;
  min-width: 28px;
}

.tc-section-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tc-section-subtitle {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-light);
  margin-left: 4px;
}

.tc-section p {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

.tc-section p:last-child {
  margin-bottom: 0;
}

/* Clause Lists */
.tc-clause-list {
  margin: var(--sp-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.tc-clause-list li {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.7;
  padding-left: var(--sp-5);
  position: relative;
}

.tc-clause-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-light);
}

/* Lettered sub-list */
.tc-clause-list.lettered {
  counter-reset: clause-letter;
}

.tc-clause-list.lettered li {
  counter-increment: clause-letter;
  padding-left: var(--sp-8);
}

.tc-clause-list.lettered li::before {
  content: counter(clause-letter, lower-alpha) ')';
  background: none;
  width: auto;
  height: auto;
  top: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--blue-mid);
  border-radius: 0;
}

/* Callout — Class Action Waiver */
.tc-callout {
  background: #fff8ec;
  border: 1.5px solid #f0c050;
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
}

.tc-callout-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b07800;
  margin-bottom: var(--sp-2);
}

.tc-callout p {
  font-size: 0.9375rem;
  font-weight: 400;
  color: #6b4a00;
  line-height: 1.65;
  margin: 0;
}

/* Footer Note */
.tc-footer-note {
  margin-top: var(--sp-12);
  padding: var(--sp-5) var(--sp-6);
  background: #f8f8f8;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1.65;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  padding: var(--sp-8) 0 var(--sp-6);
  border-top: 1px solid #edf2f5;
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto var(--sp-4);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.footer-links a {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-links a:hover {
  color: var(--blue-deep);
}

.footer-sep {
  font-size: 0.75rem;
  color: var(--ink-light);
}

.footer-copy {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ink-light);
}

/* ==========================================================================
   13. Animations
   ========================================================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ==========================================================================
   14. Responsive Adjustments
   ========================================================================== */

/* Extra-small phones */
@media (max-width: 360px) {
  .page {
    padding: 0 var(--sp-4);
  }

  .hero-stat {
    font-size: 3.25rem;
  }

  .cta-title {
    font-size: 1.375rem;
  }

  .btn-cta {
    font-size: 0.9375rem;
    padding: 16px var(--sp-6);
  }
}

/* Tablets and up */
@media (min-width: 640px) {
  .page {
    padding: 0 var(--sp-8);
  }

  .hero {
    padding: var(--sp-12) 0 var(--sp-10);
  }

  .hero-stat {
    font-size: 6rem;
  }

  .cta-title {
    font-size: 2rem;
  }

  .tc-toc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-1) var(--sp-6);
  }

  .steps {
    gap: var(--sp-5);
  }
}

/* Larger screens — cap and center */
@media (min-width: 1024px) {
  .page {
    padding: 0 var(--sp-10);
  }
}

/* Reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
