:root {
  --navy: #0b1f3b;
  --blue: #1f4e79;
  --red: #c8102e;
  --ink: #26313f;
  --muted: #667085;
  --line: #d9dee5;
  --soft: #f4f6f8;
  --white: #fff;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--white);
  line-height: 1.55;
}

a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
  font-size: 1.05rem;
}
.brand img { width: 72px; height: 45px; object-fit: contain; }
nav { display: flex; gap: 18px; font-size: .95rem; color: var(--navy); }
nav a { text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .75fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(42px, 7vw, 92px) clamp(18px, 6vw, 80px) 48px;
  background:
    linear-gradient(135deg, rgba(11,31,59,.06), rgba(31,78,121,.03)),
    linear-gradient(90deg, transparent 0 70%, rgba(200,16,46,.06));
}
.eyebrow {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .08em;
}
h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0 0 14px; letter-spacing: 0; }
h1 { font-size: clamp(2.35rem, 5vw, 4.9rem); max-width: 850px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.08rem; }
.lead { max-width: 720px; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #465466; }
.hero-actions, .builder-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--navy);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--navy); color: var(--white); }
.button.primary:hover { background: var(--blue); }
.button.secondary { background: transparent; color: var(--navy); }
.button.success { background: #0f7b4f; border-color: #0f7b4f; color: white; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.full { width: 100%; }

.letter-card, .letter-preview, .checkout-panel, .feature-grid article, .success-box, .admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(11,31,59,.08);
}
.letter-card { padding: 30px; }
.muted, .small, .status { color: var(--muted); }
.small { font-size: .88rem; }
.signature { margin-top: 32px; }
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: var(--navy);
  color: white;
}
.trust-strip span { padding: 16px 22px; text-align: center; border-right: 1px solid rgba(255,255,255,.18); }

.builder, .content-band, .faq {
  padding: clamp(42px, 6vw, 78px) clamp(18px, 6vw, 80px);
}
.section-heading { max-width: 760px; margin-bottom: 24px; }
.wizard { border: 1px solid var(--line); border-radius: 8px; padding: clamp(18px, 3vw, 30px); background: var(--soft); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label { display: grid; gap: 7px; font-weight: 700; color: var(--navy); }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #c8d0da;
  border-radius: 6px;
  font: inherit;
  color: var(--ink);
  background: white;
}
textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.preview-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}
.letter-preview {
  min-height: 520px;
  padding: clamp(24px, 4vw, 46px);
  font-family: Georgia, "Times New Roman", serif;
  color: #1e2936;
}
.letter-preview p { margin: 0 0 18px; }
.checkout-panel { padding: 24px; position: sticky; top: 96px; display: grid; gap: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-grid article { padding: 24px; box-shadow: none; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; max-width: 900px; }
.faq summary { font-weight: 800; color: var(--navy); cursor: pointer; }
footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 6vw, 80px);
  background: var(--navy);
  color: white;
}
.success-page { background: var(--soft); }
.success-box { width: min(760px, calc(100% - 32px)); margin: 40px auto; padding: clamp(22px, 4vw, 38px); }
.centred { justify-content: center; margin-bottom: 18px; }
.compact { min-height: 260px; box-shadow: none; margin: 18px 0; }

.admin-body { background: var(--soft); }
.admin-shell { width: min(1180px, calc(100% - 28px)); margin: 28px auto; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.admin-card { padding: 18px; box-shadow: none; }
.admin-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); }
.admin-table th, .admin-table td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { color: var(--navy); background: #eef2f6; }
.admin-form { display: grid; gap: 14px; max-width: 680px; }

@media (max-width: 900px) {
  .hero, .preview-wrap { grid-template-columns: 1fr; }
  .trust-strip, .feature-grid, .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-panel { position: static; }
}
@media (max-width: 640px) {
  .site-header, footer { align-items: flex-start; flex-direction: column; }
  nav { width: 100%; justify-content: space-between; gap: 8px; }
  .form-grid, .trust-strip, .feature-grid, .admin-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.25rem; }
}
