/* NorthPoleGram — Senior-First Accessible Stylesheet (Ages 45–75)
 * Minimum 18px body & input font size, WCAG AAA contrast, >=48px touch targets.
 */

:root {
  --bg-cream: #fdfaf5;
  --bg-warm: #f5ede0;
  --surface-white: #ffffff;
  --surface-gold: #fff9eb;
  --surface-pine: #eef7f1;
  --surface-cranberry: #fff2f4;
  --border-warm: #cfc0ad;
  --border-strong: #8d7a64;
  --ink-primary: #1a1614;
  --ink-secondary: #38302b;
  --cranberry: #9b1c2c;
  --cranberry-hover: #7a1320;
  --pine: #165b33;
  --pine-hover: #0e4324;
  --gold: #b8860b;
  --gold-text: #704e00;
  --error-bg: #fff0f2;
  --error-border: #9b1c2c;
  --error-ink: #720f1c;
  --focus-ring: #1a1614;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-card: 0 4px 16px rgba(26, 22, 20, 0.08);
}

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

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-primary);
  background-color: var(--bg-cream);
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink-primary);
  line-height: 1.28;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin-bottom: 14px;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

p {
  margin-top: 0;
  margin-bottom: 16px;
}

a {
  color: var(--cranberry);
  font-weight: 600;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--cranberry-hover);
}

/* Strong visible focus indicator for keyboard & switch navigation */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Site Header */
.site-header {
  background-color: var(--surface-white);
  border-bottom: 2px solid var(--border-warm);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.4rem;
  font-weight: 700;
  min-height: 48px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cranberry);
  color: #ffffff;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 6px 8px;
  color: var(--ink-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover {
  color: var(--cranberry);
  border-bottom-color: var(--cranberry);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, #fff6ea 0%, var(--bg-cream) 100%);
  border-bottom: 2px solid var(--border-warm);
  padding: 36px 0 42px;
}

.positioning-pill {
  display: inline-block;
  background-color: var(--pine);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--ink-secondary);
  margin-bottom: 20px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
}

.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
}

.check-icon {
  color: var(--pine);
  font-weight: 800;
  flex-shrink: 0;
}

.sample-card {
  background: var(--surface-white);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.sample-card-title {
  font-weight: 700;
  color: var(--cranberry);
  margin-bottom: 10px;
  text-align: center;
}

.video-frame {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  background: #1a1614;
  aspect-ratio: 16 / 9;
}

.sample-caption {
  font-size: 18px;
  color: var(--ink-secondary);
  text-align: center;
  margin: 12px 0 0;
}

/* Main Builder Sections */
.builder-main {
  padding: 34px 0 60px;
}

.step-card {
  background: var(--surface-white);
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--bg-warm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cranberry);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.step-subtitle {
  color: var(--ink-secondary);
  margin: 4px 0 0;
}

/* Step 1: Pack Cards */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  min-height: 160px;
  padding: 22px 18px 18px;
  background: var(--surface-white);
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-md);
  color: var(--ink-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.pack-card:hover {
  border-color: var(--cranberry);
  background: #fffdfb;
}

.pack-card.is-popular {
  border-color: var(--gold);
  background: var(--surface-gold);
}

.pack-card.is-selected {
  border: 3px solid var(--cranberry);
  background: var(--surface-cranberry);
  box-shadow: 0 0 0 2px rgba(155, 28, 44, 0.18);
}

.pack-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--gold);
  color: #1a1614;
  font-weight: 800;
  font-size: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.pack-title {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pack-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cranberry);
  margin: 6px 0 8px;
}

.pack-desc {
  font-size: 18px;
  color: var(--ink-secondary);
  margin-bottom: 12px;
}

.pack-selected-indicator {
  font-weight: 700;
  color: var(--pine);
  min-height: 28px;
}

/* Step 2: Child Jump Tabs & Panels */
.child-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.child-tab {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-warm);
  background: var(--bg-warm);
  color: var(--ink-primary);
  font-weight: 700;
  cursor: pointer;
}

.child-tab.is-active {
  background: var(--cranberry);
  border-color: var(--cranberry);
  color: #ffffff;
}

.child-panels {
  display: grid;
  gap: 22px;
}

.child-panel {
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--bg-cream);
}

.child-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-warm);
}

.child-panel-badge {
  font-size: 16px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-white);
  border: 1px solid var(--border-warm);
  color: var(--ink-secondary);
}

.child-panel-badge.is-required {
  background: var(--surface-pine);
  border-color: var(--pine);
  color: var(--pine);
}

/* Form Fields (Always visible label ABOVE input) */
.form-group {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.field-help {
  font-size: 17px;
  color: var(--ink-secondary);
  margin: 6px 0 0;
}

.text-input,
.select-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font-size: 18px;
  color: var(--ink-primary);
  background-color: var(--surface-white);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.text-input:focus,
.select-input:focus {
  border-color: var(--cranberry);
}

.name-preview-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.preview-audio {
  width: 100%;
  max-width: 360px;
  min-height: 48px;
}

.preview-status {
  width: 100%;
  font-weight: 600;
  color: var(--pine);
  margin: 4px 0 0;
}

/* Verdict Radio Cards */
.fieldset-clean {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.verdict-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  background: var(--surface-white);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.verdict-option input[type="radio"] {
  width: 24px;
  height: 24px;
  margin-top: 3px;
  accent-color: var(--cranberry);
  flex-shrink: 0;
}

.verdict-option:has(input:checked) {
  border-color: var(--cranberry);
  background: var(--surface-cranberry);
}

/* Preset Hobby Chips */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.hobby-chip {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--pine);
  background: var(--surface-white);
  color: var(--pine);
  font-weight: 700;
  cursor: pointer;
}

.hobby-chip:hover {
  background: var(--surface-pine);
}

.hobby-chip[aria-pressed="true"] {
  background: var(--pine);
  color: #ffffff;
}

/* Checkboxes & Order Bump Cards */
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 56px;
  padding: 16px 18px;
  background: var(--surface-white);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  cursor: pointer;
}

.checkbox-card.is-bump {
  background: var(--surface-gold);
  border-color: var(--gold);
}

.checkbox-card input[type="checkbox"] {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: 2px 0 0;
  accent-color: var(--cranberry);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-card:has(input:checked) {
  border-color: var(--pine);
  background: var(--surface-pine);
}

/* Order Summary & Trust Badge */
.order-summary-box {
  background: var(--bg-warm);
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 22px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 2px solid var(--border-strong);
  font-size: 1.35rem;
  font-weight: 800;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-pine);
  border: 2px solid var(--pine);
  color: var(--ink-primary);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 18px 0;
  font-weight: 700;
}

.trust-badge-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--cranberry);
  color: #ffffff;
  min-height: 58px;
  padding: 16px 26px;
  font-size: 20px;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--cranberry-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--pine);
  color: #ffffff;
  min-height: 48px;
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--pine-hover);
  color: #ffffff;
}

.btn-outline {
  background-color: var(--surface-white);
  color: var(--ink-primary);
  border-color: var(--border-strong);
  min-height: 48px;
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-warm);
  color: var(--ink-primary);
}

.btn-cta-large {
  width: 100%;
  min-height: 62px;
  font-size: 21px;
  padding: 18px 28px;
  border-radius: var(--radius-md);
}

.btn-share {
  min-height: 56px;
  padding: 14px 20px;
  font-size: 19px;
}

.btn-whatsapp {
  background-color: #135c2e;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background-color: #0d4421;
  color: #ffffff;
}

.btn-messenger {
  background-color: #0b4f9c;
  color: #ffffff;
}

.btn-messenger:hover {
  background-color: #083b75;
  color: #ffffff;
}

/* Error & Info Banners */
.alert-banner {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 2px solid;
  font-weight: 600;
}

.alert-error {
  background-color: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-ink);
}

.alert-warning {
  background-color: var(--surface-gold);
  border-color: var(--gold);
  color: var(--ink-primary);
}

.alert-info {
  background-color: var(--surface-pine);
  border-color: var(--pine);
  color: var(--ink-primary);
}

/* Order & Gift Delivery Cards */
.progress-stage-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.progress-stage-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-warm);
  background: var(--surface-white);
}

.progress-stage-item.is-active {
  border-color: var(--cranberry);
  background: var(--surface-cranberry);
  font-weight: 700;
}

.progress-stage-item.is-done {
  border-color: var(--pine);
  background: var(--surface-pine);
}

.delivery-card {
  background: var(--surface-white);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.rerender-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px dashed var(--border-warm);
}

.rerender-form {
  margin-top: 14px;
  padding: 18px;
  background: var(--bg-cream);
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-md);
}

/* Footer */
.site-footer {
  background: var(--surface-white);
  border-top: 2px solid var(--border-warm);
  padding: 28px 0 38px;
  color: var(--ink-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

/* Legal Document Pages */
.legal-card {
  background: var(--surface-white);
  border: 2px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 30px 0 50px;
  box-shadow: var(--shadow-card);
}

.legal-card h2 {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--bg-warm);
}

/* Responsive Breakpoints */
@media (max-width: 820px) {
  .hero-grid,
  .pack-grid,
  .verdict-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .step-card,
  .delivery-card,
  .legal-card {
    padding: 20px;
  }
}
