/*
Theme Name: OCI Card South Africa
Description: A one-page document review service with a WordPress enquiry form.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: oci-card-za
*/

:root {
  --ivory: #fbf8f0;
  --paper: #fffdf7;
  --ink: #182c27;
  --evergreen: #244b3f;
  --rust: #974429;
  --muted: #465b52;
  --tint: #f0ece1;
  --rule: #d5cbbb;
  --field: #78877b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 1rem/1.62 var(--sans); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, .wordmark, dt { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; }
h1 { max-width: 11.2em; font-size: clamp(2.45rem, 4.05vw, 3.65rem); line-height: 1.07; }
h2 { font-size: clamp(2rem, 3vw, 2.55rem); line-height: 1.16; }
h3, dt { font-size: 1.32rem; line-height: 1.3; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a, button, input, textarea, legend { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 1rem; }
.wrap { width: min(100% - 3rem, 64rem); margin-inline: auto; }
.section-pad { padding-block: clamp(3.5rem, 7vw, 6rem); }
.skip-link { position: absolute; z-index: 2; inset: .75rem auto auto .75rem; transform: translateY(-180%); padding: .6rem 1rem; background: var(--paper); }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--rule); }
.header-row, .hero-actions { display: flex; align-items: center; flex-wrap: wrap; }
.header-row { justify-content: space-between; min-height: 4.7rem; gap: .1rem 1.5rem; padding-block: .65rem; }
.wordmark { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.24rem; text-decoration: none; }
.site-header ul { display: flex; gap: 0 clamp(1rem, 3vw, 1.6rem); flex-wrap: wrap; padding: 0; list-style: none; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .9rem; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; column-gap: clamp(2.4rem, 5vw, 4rem); padding-block: clamp(4.7rem, 7.9vw, 7rem); }
.hero > * { min-width: 0; }
.hero-copy { animation: hero-arrival .45s ease-out both; }
@keyframes hero-arrival { from { opacity: 0; transform: translateY(8px); } }
.eyebrow { margin-bottom: 1.1rem; color: var(--rust); font-size: .925rem; font-weight: 600; }
.hero-lead { max-width: 31rem; margin-top: 1.45rem; color: var(--muted); font-size: 1.12rem; }
.hero-actions { gap: .7rem 1.45rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  min-height: 3.05rem;
  align-items: center;
  justify-content: center;
  padding: .68rem 1.2rem;
  border: 1px solid transparent;
  background: var(--evergreen);
  color: white;
  font: 600 .925rem/1.35 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s, transform .16s;
}
.button:hover { background: var(--ink); transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.text-action { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .875rem; }

.checklist-frame { background: var(--evergreen); padding: clamp(1.6rem, 3.4vw, 3rem); padding-block: clamp(2rem, 4.6vw, 3.8rem); }
.checklist-paper { position: relative; padding: clamp(1.2rem, 2.65vw, 2.3rem); background: var(--paper); box-shadow: .65rem .65rem 0 #6e8b7e; }
.sheet-label { color: var(--muted); font-weight: 650; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.checklist-paper h2 { margin-top: .5rem; font-size: clamp(1.45rem, 2.15vw, 1.95rem); }
.checklist-group { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid var(--rule); }
.checklist-group h3 { font-size: 1.07rem; }
.checklist-group ul { display: grid; gap: .3rem; padding: 0; margin-top: .55rem; list-style: none; color: var(--muted); font-size: .875rem; line-height: 1.43; }
.checklist-group li { display: grid; grid-template-columns: .62rem 1fr; align-items: baseline; gap: .6rem; }
.checklist-group li::before { display: block; content: ""; width: .55rem; height: .55rem; border: 1px solid var(--field); }

.ruled { border-top: 1px solid var(--rule); }
.tint { background: var(--tint); }
.split { display: grid; grid-template-columns: 1fr 1.6fr; align-items: start; gap: clamp(1.8rem, 6vw, 4rem); }
.detail-stack { display: grid; gap: 1.8rem; }
.detail-stack p, .steps p, .questions dd { color: var(--muted); }
.detail-stack p, .steps p { margin-top: .55rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 0; margin-top: 2rem; list-style: none; }
.steps li { padding-top: 1.1rem; border-top: 1px solid var(--ink); }
.questions { border-top: 1px solid var(--rule); }
.questions > div { border-bottom: 1px solid var(--rule); padding-block: 1.25rem; }
.questions dd { margin-top: .5rem; }

.enquiry-section { background: var(--evergreen); color: var(--ivory); }
.enquiry-grid { display: grid; grid-template-columns: 1fr 1.4fr; align-items: start; gap: clamp(1.8rem, 6vw, 4rem); }
.enquiry-copy { max-width: 22rem; }
.enquiry-copy p { margin-top: 1.05rem; }
.privacy-note { padding-left: .95rem; border-left: 2px solid #e3a28a; font-size: .93rem; }
.form-panel { background: var(--paper); color: var(--ink); padding: clamp(1.25rem, 4vw, 2.5rem); }
.preview-note { font-size: .875rem; color: var(--muted); padding-bottom: .85rem; margin-bottom: 1.05rem; border-bottom: 1px solid var(--rule); }
.form-field { border: 0; padding: 0; margin: 0 0 1.15rem; min-width: 0; }
.form-field label, .form-field legend { font-size: .925rem; font-weight: 600; }
.form-field label span, .form-field legend span { color: var(--muted); font-weight: 400; }
.form-field input:not([type=radio]), .form-field textarea {
  display: block;
  width: 100%;
  padding: .6rem .72rem;
  min-height: 2.9rem;
  margin-top: .36rem;
  border: 1px solid var(--field);
  background: white;
  color: var(--ink);
  border-radius: 0;
  font: inherit;
}
.form-field textarea { resize: vertical; }
.form-field .choice { display: flex; min-height: 2.75rem; align-items: center; gap: .65rem; font-size: .95rem; font-weight: 400; cursor: pointer; }
.choice input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--evergreen); }
.form-feedback { margin: 0 0 1rem; border-left: 3px solid var(--evergreen); background: var(--tint); padding: .8rem 1rem; }
.form-feedback[data-tone="error"] { border-color: var(--rust); }
.field-error { margin-top: .4rem; color: var(--rust); font-size: .9rem; }
.form-field [aria-invalid="true"] { border-color: var(--rust); }

.site-footer { background: var(--ink); color: var(--ivory); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-block: 3rem; }
.site-footer h2 { font-size: 1.23rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer p, .site-footer ul { margin-top: .6rem; color: #e7e4dc; }
.site-footer a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .92rem; }
.site-footer :focus-visible, .enquiry-copy :focus-visible { outline-color: #ffd0b8; }
.content-page { padding-block: clamp(3rem, 7vw, 6rem); min-height: 50vh; }
.content-page h1 { margin-bottom: 1.5rem; }

@media (max-width: 58rem) {
  .hero, .split, .enquiry-grid { grid-template-columns: 1fr; }
  .hero { row-gap: 2.5rem; }
  .checklist-frame { width: min(100%, 36rem); }
}
@media (max-width: 40rem) {
  .wrap { width: calc(100% - 2.5rem); }
  .header-row { align-items: start; flex-direction: column; }
  .steps, .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 26rem) {
  .hero-actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy { animation: none; }
  .button { transition: none; }
}
