:root {
  --ink: #14232E;
  --body: #46525C;
  --muted: #5C6670;
  --paper: #F7F5F0;
  --tone: #ECE8DF;
  --card: #FDFCF9;
  --line: #D9D3C7;
  --teal: #127A6B;
  --teal-dark: #0E6156;
  --teal-text: #0F6B5E;
  --teal-tint: #DCEEE8;
  --orange: #E07A2E;
  --error: #A3311B;
  --soft-on-dark: #B9C6CC;

  --font-head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 4.2vw + 1rem, 3.9rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--teal-text); text-underline-offset: 0.15em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  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: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(247, 245, 240, 0.82); backdrop-filter: blur(8px); }
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { flex: none; }
.logo-word { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.site-nav { display: none; gap: 28px; margin-left: auto; }
.site-nav a { color: var(--body); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--ink); }
.header-inner > .btn { margin-left: auto; }
@media (min-width: 860px) {
  .site-nav { display: flex; }
  .header-inner > .btn { margin-left: 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal); color: var(--paper); }
.btn-primary:hover { background: var(--teal-dark); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.65; cursor: progress; }

/* Hero */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
}
.badge {
  display: inline-block; margin: 0 0 18px;
  background: var(--orange); color: var(--ink);
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em;
  padding: 5px 12px; border-radius: 999px;
}
.lead { font-size: 1.2rem; line-height: 1.55; max-width: 34em; margin: 0; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
@media (min-width: 600px) { .card { padding: 28px; } }

/* Form */
.form-card { box-shadow: 0 1px 0 rgba(20, 35, 46, 0.04), 0 12px 32px -18px rgba(20, 35, 46, 0.25); }
.form-note { margin: 12px 4px 0; font-size: 0.92rem; color: var(--muted); }

.role-toggle {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 0; margin: 0 0 20px; padding: 4px;
  background: var(--tone); border-radius: 999px;
}
.role-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-toggle label {
  text-align: center; padding: 9px 12px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; color: var(--body); cursor: pointer;
}
.role-toggle input:checked + label { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 35, 46, 0.14); }
.role-toggle input:focus-visible + label { outline: 3px solid var(--teal); outline-offset: 1px; }

.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 600; color: var(--ink); margin: 0 0 6px; font-size: 0.95rem; }
.field input[type="url"],
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"] {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: 400 1rem/1.3 var(--font-body); color: var(--ink);
  background: #fff; border: 1px solid #B7AFA1; border-radius: var(--radius-sm);
  -moz-appearance: textfield; appearance: none;
}
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input::placeholder { color: #7A838B; }
.field input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 122, 107, 0.25); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.field-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); }
.field-check label { font-weight: 400; color: var(--body); margin: 0; }
.field-check .field-error { grid-column: 2; }
.field-error { color: var(--error); font-size: 0.9rem; font-weight: 600; margin: 6px 0 0; }
.field-note { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.step-2 { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-error { color: var(--error); font-weight: 600; margin: 14px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-success:focus { outline: none; }
.success-title { font-size: 1.45rem; }
.success-ref { margin: 14px 0 0; font-size: 0.95rem; color: var(--muted); }
.success-ref strong { color: var(--ink); font-family: var(--font-head); letter-spacing: 0.04em; }

/* Sections */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-tone { background: var(--tone); }

.cards-3 { display: grid; gap: 16px; }
@media (min-width: 768px) { .cards-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.cards-3 h3 { margin-top: 14px; }
.cards-3 p { margin: 0; }
.card-icon { color: var(--teal-text); display: block; }

.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.step {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 20px 72px;
}
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; }
.step-num {
  position: absolute; left: 20px; top: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  color: var(--teal-text); background: var(--teal-tint);
}
.step-final { background: var(--teal-tint); border-color: var(--teal); }
.step-final .step-num { background: var(--teal); color: var(--paper); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .step { padding: 24px 20px; }
  .step-num { position: static; margin-bottom: 16px; }
}
.steps-note { margin: 24px 0 0; color: var(--ink); font-weight: 600; }

.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; } }
.split-text > :last-child { margin-bottom: 0; }
.small { font-size: 0.95rem; color: var(--muted); }

.price-caption { font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.price-table th { font-weight: 400; color: var(--body); }
.price-table td { text-align: right; color: var(--ink); font-weight: 600; }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.price-total th, .price-total td { color: var(--ink); font-weight: 700; }

.check-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.3em;
  width: 20px; height: 20px; border-radius: 50%; background: var(--teal-tint);
}
.check-list li::after {
  content: ""; position: absolute; left: 6px; top: calc(0.3em + 5px);
  width: 8px; height: 5px; border-left: 2px solid var(--teal-text); border-bottom: 2px solid var(--teal-text);
  transform: rotate(-45deg);
}

.seller-line { display: grid; gap: 12px; justify-items: start; }
.seller-line-label { margin: 0; font-weight: 600; color: var(--ink); }
.seller-line-text {
  margin: 0; width: 100%;
  background: var(--paper); border: 1px dashed #B7AFA1; border-radius: var(--radius-sm);
  padding: 14px 16px; color: var(--ink); overflow-wrap: anywhere;
  user-select: all; -webkit-user-select: all;
}
.copy-status { font-size: 0.9rem; color: var(--teal-text); font-weight: 600; min-height: 1.4em; }

.rules { display: grid; gap: 16px; margin: 8px 0 0; }
@media (min-width: 768px) { .rules { grid-template-columns: 1fr 1fr; gap: 20px; } }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.rule dt { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; }
.rule dd { margin: 0; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 18px 40px 18px 0; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 20px; max-width: 42em; }

/* Footer */
.site-footer { background: var(--ink); color: var(--soft-on-dark); padding: 48px 0; font-size: 0.95rem; }
.footer-inner { display: grid; gap: 24px; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1.2fr 0.8fr 1.4fr; align-items: start; } }
.site-footer .logo, .site-footer .logo-word { color: var(--paper); }
.footer-brand p { margin: 10px 0 0; }
.footer-links { display: flex; gap: 20px; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--soft-on-dark); }
.footer-legal p { margin: 0 0 6px; }

/* Plain pages (privacy, admin) */
.page { padding: 48px 0 72px; }
.page h1 { font-size: clamp(2rem, 2.5vw + 1rem, 2.8rem); }
.page h2 { font-size: 1.35rem; margin-top: 1.6em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.4em; }

/* Reveal on scroll (only when the script runs and motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

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