@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../assets/fonts/playfair-display-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("../assets/fonts/playfair-display-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../assets/fonts/lora-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../assets/fonts/montserrat-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("../assets/fonts/dancing-script-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../assets/fonts/courier-prime-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../assets/fonts/cormorant-garamond-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../assets/fonts/caveat-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("../assets/fonts/bebas-neue-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-soft: #F3EEE6;
  --ink: #161C24;
  --muted: #4A5565;
  --border: #E2DBD0;
  --primary: #16324F;
  --primary-hover: #0F243A;
  --primary-ink: #FFFFFF;
  --accent: #C84B31;
  --accent-hover: #AD3C24;
  --accent-ink: #FFFFFF;
  --warn-bg: #FFFBEB;
  --warn-border: #D97706;
  --err-bg: #FEF2F2;
  --err-border: #DC2626;
  --info-bg: #EFF6FF;
  --info-border: #2563EB;
  --shadow-sm: 0 2px 8px rgba(22, 28, 36, 0.05);
  --shadow-md: 0 10px 28px rgba(22, 28, 36, 0.09);
  --radius: 14px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
  padding: 0.75rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }

.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico-lg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.main-wrap { flex: 1; padding-top: 1.25rem; padding-bottom: 3rem; }

/* Header & Progress Steps */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; font-size: 1rem; }
.brand-sub { font-size: 0.72rem; font-weight: 500; color: var(--muted); }

.step-nav { border-top: 1px solid var(--border); background: var(--surface); padding: 0.5rem 0; }
.steps { list-style: none; display: flex; gap: 0.5rem; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--surface-soft);
  color: var(--muted); font-size: 0.84rem; font-weight: 500; white-space: nowrap;
}
@media (max-width: 420px) {
  .steps { gap: 0.35rem; }
  .steps li { padding: 0.3rem 0.52rem; font-size: 0.78rem; gap: 0.3rem; }
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(22, 28, 36, 0.1); font-size: 0.75rem; font-weight: 700;
}
.steps li.is-active { background: var(--primary); color: #fff; font-weight: 600; }
.steps li.is-active .step-num { background: rgba(255, 255, 255, 0.22); }
.steps li.is-done { background: #DCFCE7; color: #166534; }
.steps li.is-done .step-num { background: #166534; color: #fff; }

/* Banners */
.banner {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.85rem 1rem; border-left: 4px solid; border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size: 0.92rem;
}
.container-banner { max-width: 1080px; margin: 0.5rem auto 0; }
.banner-warn { background: var(--warn-bg); border-color: var(--warn-border); color: #78350F; }
.banner-error { background: var(--err-bg); border-color: var(--err-border); color: #991B1B; }
.banner-info { background: var(--info-bg); border-color: var(--info-border); color: #1E3A8A; }

.error-summary { flex-direction: column; gap: 0.4rem; }
.error-summary ul { margin: 0.25rem 0 0 1.25rem; padding: 0; }
.error-summary a { color: #991B1B; font-weight: 600; }

/* Cards & Typography */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.muted { color: var(--muted); font-size: 0.92rem; margin: 0.2rem 0; }
.req { color: #B91C1C; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.4rem;
}
.page-head { margin-bottom: 1rem; }
.page-head h1, .page-title { font-family: "Playfair Display", serif; font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.25rem; }
.section-label { font-size: 1.05rem; margin: 1.5rem 0 0.75rem; color: var(--ink); }
.specs-faq h2 { font-family: "Playfair Display", serif; font-size: 1.25rem; margin: 0 0 0.85rem; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.faq-grid h3 { font-size: 0.98rem; margin: 0 0 0.25rem; color: var(--primary); }

/* Buttons (min 44x44px touch targets + 8px+ gap) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 44px; min-width: 44px; padding: 0.6rem 1.05rem;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; background: var(--surface-soft); color: var(--ink);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.btn:hover:not(:disabled) { filter: brightness(0.96); }
.btn:active:not(:disabled) { opacity: 0.88; }
.btn-sm { min-height: 44px; padding: 0.45rem 0.85rem; font-size: 0.88rem; }
.btn-lg { min-height: 48px; padding: 0.75rem 1.35rem; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); filter: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px rgba(200, 75, 49, 0.22); }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); filter: none; }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-danger { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.75rem; }
@media (max-width: 520px) {
  .btn-block-mobile { width: 100%; }
}

/* Home Hero + Postcard Showcase */
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center;
  padding: 0.5rem 0 1rem;
}
@media (min-width: 780px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; padding: 1.25rem 0 1.5rem; }
}
.hero-copy h1 { font-family: "Playfair Display", serif; font-size: clamp(1.75rem, 4.5vw, 2.55rem); line-height: 1.15; margin: 0 0 0.75rem; }
.lead { font-size: 1.02rem; color: var(--muted); max-width: 56ch; margin: 0 0 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-showcase { position: relative; min-height: 230px; display: flex; align-items: center; justify-content: center; padding: 0.5rem; }
.postcard-mock {
  width: 100%; max-width: 340px; border-radius: 12px; background: #FFFDF9;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.postcard-back {
  position: absolute; width: 92%; max-width: 320px; height: 190px;
  background: #F4EFE6; transform: rotate(-3.5deg) translate(-8px, 6px); z-index: 1;
}
.postcard-front { position: relative; z-index: 2; overflow: hidden; }
.airmail-bar {
  height: 7px;
  background: repeating-linear-gradient(135deg, #C84B31 0 12px, #FFFDF9 12px 20px, #16324F 20px 32px, #FFFDF9 32px 40px);
}
.mock-body { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0.75rem; padding: 0.85rem; align-items: center; }
.mock-scene { width: 100%; height: auto; display: block; border-radius: 6px; }
.mock-meta { display: flex; flex-direction: column; justify-content: space-between; gap: 0.85rem; }
.stamp-box {
  align-self: flex-end; border: 2px dashed var(--accent); color: var(--accent);
  font-family: "Courier Prime", monospace; font-size: 0.68rem; font-weight: 700;
  padding: 0.25rem 0.4rem; border-radius: 4px; text-align: center; line-height: 1.25;
}
.mock-title { display: block; font-family: "Playfair Display", serif; font-size: 0.95rem; font-weight: 700; }
.mock-sub { display: block; font-size: 0.75rem; color: var(--muted); }

.restore-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }

/* Path cards */
.path-grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin-bottom: 1.25rem; }
@media (min-width: 720px) {
  .path-grid { grid-template-columns: repeat(3, 1fr); }
}
.path-card {
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.path-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.path-card-featured { border-color: rgba(200, 75, 49, 0.45); background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F6 100%); }
.path-icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--surface-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.path-card-featured .path-icon { background: #FDECE8; color: var(--accent); }
.path-content { flex: 1; }
.path-content h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.path-content p { margin: 0; font-size: 0.92rem; color: var(--muted); }
.path-cta { width: 100%; }

.how-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; background: var(--surface-soft); }
.how-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.how-badge {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}

/* Catalogue */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.section-head h1, .section-head h2 { margin: 0; }
.segmented {
  display: inline-flex; gap: 0.35rem; padding: 0.25rem;
  background: var(--surface-soft); border-radius: 12px; border: 1px solid var(--border);
}
.segmented .btn { border: none; background: transparent; }
.segmented .is-active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }

.chip-row {
  display: flex; gap: 0.5rem; margin-bottom: 1.1rem;
  overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  min-height: 44px; padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font: inherit; font-size: 0.88rem; font-weight: 500;
  white-space: nowrap; transition: background-color 150ms ease, color 150ms ease;
}
.chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.tpl-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.tpl-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.tpl-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--surface-soft); }
.tpl-card-body { padding: 0.85rem; display: flex; flex-direction: column; gap: 0.65rem; flex: 1; justify-content: space-between; }

/* Forms & Upload Dropzone */
.stack-form { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  min-height: 46px; padding: 0.6rem 0.75rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--err-border); background: #FFFAFA;
}
.field-err { color: #B91C1C; font-size: 0.85rem; min-height: 1.1em; font-weight: 500; }

.upload-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 0.45rem; min-height: 148px; padding: 1.25rem; border: 2px dashed var(--primary);
  border-radius: var(--radius); background: #F7F9FC; cursor: pointer;
  transition: background-color 180ms ease;
}
.upload-dropzone:hover { background: #EEF4FA; }

.guide-details { padding-top: 0.35rem; border-top: 1px solid var(--border); }
.guide-details summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

.checkbox-label { display: flex; align-items: flex-start; gap: 0.65rem; cursor: pointer; min-height: 44px; padding: 0.4rem 0; }
.checkbox-label input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); }

.thumb-row { display: flex; gap: 1rem; align-items: center; }
.thumb-row img { border-radius: 8px; border: 1px solid var(--border); }

/* Review & Handoff */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.ticket-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 5px solid var(--accent);
}
.ref-code { font-family: "Courier Prime", monospace; font-size: 1.45rem; font-weight: 700; letter-spacing: 0.05em; margin: 0.15rem 0; }
.step-badge-row { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.4rem; }
.step-badge-row h2 { margin: 0; font-size: 1.12rem; }

.badge { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.84rem; font-weight: 600; }
.badge-good { background: #DCFCE7; color: #166534; }
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-low { background: #FEE2E2; color: #991B1B; }

.upload-preview-wrap { position: relative; max-width: 560px; margin: 0.75rem auto; border: 1px solid var(--border); background: #FFFFFF; border-radius: 6px; overflow: hidden; }
.upload-preview-wrap canvas { width: 100%; height: auto; display: block; }
.guide-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; width: min(94vw, 480px); box-shadow: var(--shadow-md); }
.dialog::backdrop { background: rgba(15, 23, 42, 0.5); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.15rem 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.footer-links a { color: var(--primary); font-size: 0.9rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
