/* ============================================
   KAYJAH DESIGN STUDIO — Terms & Conditions
   Clean legal document layout, print-friendly.
   Linked from invoices via QR code.
   ============================================ */


/* ── Container ─────────────────────────────── */

.terms-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}


/* ── Page Header ───────────────────────────── */

.terms-header {
  padding: calc(var(--space-xl, 80px) + 5rem) 0 var(--space-md, 48px);
  border-bottom: 1px solid var(--surface-3, #E8E4DF);
}

.terms-header .t-overline {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted, #999);
  margin-bottom: 16px;
}

.terms-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--ink, #1A1A1E);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.terms-updated {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted, #999);
  margin: 0;
}


/* ── Content ───────────────────────────────── */

.terms-content {
  padding: var(--space-md, 48px) 0 var(--space-lg, 80px);
}


/* ── Introduction ──────────────────────────── */

.terms-intro {
  margin-bottom: var(--space-sm, 40px);
  padding-bottom: var(--space-sm, 40px);
  border-bottom: 1px solid var(--surface-3, #E8E4DF);
}

.terms-intro p {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: var(--ink-2, #555);
  line-height: 1.7;
  margin: 0;
}


/* ── Sections ──────────────────────────────── */

.terms-sections {
  counter-reset: terms-section;
}

.terms-section {
  margin-bottom: var(--space-sm, 40px);
  padding-bottom: var(--space-sm, 40px);
  border-bottom: 1px solid var(--surface-3, #E8E4DF);
}

.terms-section:last-child {
  border-bottom: none;
}

.terms-section-heading {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--ink, #1A1A1E);
  line-height: 1.25;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.terms-section-number {
  font-family: var(--sans);
  font-size: 0.85em;
  font-weight: 700;
  color: var(--gold, #B8860B);
  flex-shrink: 0;
}

.terms-section-body {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-2, #555);
  line-height: 1.7;
}

.terms-section-body p {
  margin: 0 0 1em;
}

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

.terms-section-body ul,
.terms-section-body ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

.terms-section-body li {
  margin-bottom: 0.5em;
  line-height: 1.6;
}

.terms-section-body li:last-child {
  margin-bottom: 0;
}

.terms-section-body strong {
  color: var(--ink, #1A1A1E);
  font-weight: 600;
}

.terms-section-body a {
  color: var(--gold, #B8860B);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.terms-section-body a:hover {
  color: var(--ink, #1A1A1E);
}


/* ── Footer Note ───────────────────────────── */

.terms-footer-note {
  margin-top: var(--space-sm, 40px);
  padding: 24px 32px;
  background: var(--surface-1, #F0EDE8);
  border-radius: 16px;
}

.terms-footer-note p {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-2, #555);
  line-height: 1.6;
  margin: 0;
}


/* ── Scroll Reveal ─────────────────────────── */

.terms-content .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.terms-content .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── Focus Visible ─────────────────────────── */

.terms-section-body a:focus-visible {
  outline: 2px solid var(--accent, #0071E3);
  outline-offset: 3px;
}

.terms-section-body a:focus:not(:focus-visible) {
  outline: none;
}


/* ── Responsive ────────────────────────────── */

@media (max-width: 600px) {
  .terms-header {
    padding-top: calc(var(--space-md, 48px) + 4rem);
    padding-bottom: var(--space-xs, 24px);
  }

  .terms-title {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
  }

  .terms-content {
    padding: var(--space-xs, 24px) 0 var(--space-md, 48px);
  }

  .terms-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
  }

  .terms-section-heading {
    font-size: 1.15rem;
  }

  .terms-section-body {
    font-size: 0.9rem;
  }

  .terms-footer-note {
    padding: 20px 20px;
    border-radius: 12px;
  }
}


/* ── Reduced Motion ────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .terms-content .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ── Print Styles ──────────────────────────── */

@media print {
  .nav,
  .footer-site,
  .whatsapp-float,
  .inq-badge {
    display: none !important;
  }

  .terms-header {
    padding-top: 0;
  }

  .terms-container {
    max-width: 100%;
    padding: 0;
  }

  .terms-section {
    break-inside: avoid;
  }

  .terms-section-body a {
    color: inherit;
    text-decoration: none;
  }

  .terms-section-body a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  .terms-footer-note {
    background: #f5f5f5;
    border: 1px solid #ddd;
  }

  .terms-content .reveal {
    opacity: 1;
    transform: none;
  }
}
