:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #0f1722;
  --muted: #5b6778;
  --terracotta: #1a3a6e;
  --coral: #3a6299;
  --sand: #c8d4e4;
  --sage: #e2e9f3;
  --blue: #dce6f2;
  --border: #d5d9e3;
  --brand-main: #0a1628;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  background: rgba(245, 247, 250, 0.96);
  backdrop-filter: blur(6px);
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-areas: "brand actions nav";
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  z-index: 20;
}

.brand {
  display: inline-block;
}

.brand-wrap {
  grid-area: brand;
}

.brand-line-1 {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-line-2 {
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-line-3 {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.22rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

/* Logo colors — consistent across all languages */
.brand-my,
.brand-line-2 {
  color: #0a1628;
}

.brand-ca {
  color: #1a3a6e;
  font-weight: 900;
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: center;
  flex-direction: row;
  flex-wrap: nowrap;
}

.lang-toggle {
  order: 1;
  background: var(--sand);
  border: 2px solid #1f1f1f;
  color: #6b5646;
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 0 rgba(10, 22, 40, 0.14);
  cursor: pointer;
}

.menu-toggle {
  order: 2;
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  cursor: pointer;
}

.main-nav {
  grid-area: nav;
  display: flex;
  gap: 0.65rem 1.15rem;
  align-items: center;
  justify-self: end;
  flex-wrap: wrap;
  min-width: 0;
}

.main-nav a {
  padding: 0.35rem 0.1rem;
  font-weight: 600;
  color: #3a4a60;
}

.main-nav a:hover {
  color: var(--terracotta);
}

.card,
.package-card,
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 8px 20px rgba(10, 22, 40, 0.06);
  margin-bottom: 1rem;
}

.warm {
  background: #eef1f7;
}

.cream {
  background: #f2f5fa;
}

.soft-green {
  background: #eaf0f8;
}

.soft-blue {
  background: #e4ecf5;
}

.grid {
  display: grid;
  gap: 1rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.package-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.docs-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  background: var(--terracotta);
  color: #fff;
}

.secondary {
  background: #fff;
  border-color: var(--coral);
  color: #2a3f5f;
}

.tertiary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.package-card {
  position: relative;
}

.essentials {
  background: #e8ecf3;
  border-color: #8ba0c0;
}

.solo {
  background: #e2e9f3;
  border-color: #6b8bb5;
}

.family {
  background: #e2e8f0;
  border-color: #7a99c0;
}

.large {
  padding: 1.4rem;
}

.package-price {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0.2rem 0 0.75rem;
}

.lead {
  font-size: 1.1rem;
  color: #4a5568;
}

.small-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 800;
}

.stack > * + * {
  margin-top: 0.8rem;
}

.compact > * + * {
  margin-top: 0.5rem;
}

label {
  display: block;
  font-weight: 700;
  color: #2d3748;
}

label span {
  display: block;
  margin-bottom: 0.25rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  font: inherit;
}

small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
}

.hidden {
  display: none !important;
}

.conditional-block {
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.doc-card h3,
.package-card h2,
.package-card h3 {
  margin-top: 0;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
}

.steps li {
  margin-bottom: 0.75rem;
}

.align-center {
  align-items: end;
}

.right-wrap {
  justify-content: flex-end;
}

.wrap-mobile {
  flex-wrap: wrap;
}

.docs-grid .doc-card {
  height: 100%;
}

@media (max-width: 860px) {
  html {
    overflow-x: clip;
  }

  body {
    overflow-x: clip;
  }

  .three-col,
  .two-col {
    grid-template-columns: 1fr;
  }

  .package-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    row-gap: 0.35rem;
    column-gap: 0.65rem;
  }

  .brand-wrap {
    min-width: 0;
  }

  .brand .brand-logo-img,
  .brand-wrap .brand-logo-img {
    max-width: min(200px, 58vw);
    height: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.65rem;
  }

  .header-actions {
    gap: 0.55rem;
    justify-self: end;
  }

  .lang-toggle {
    min-width: 128px;
    padding: 0.72rem 1rem;
    font-size: 1rem;
    line-height: 1;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-top: 0.35rem;
    position: relative;
    z-index: 30;
    box-shadow: 0 10px 28px rgba(10, 22, 40, 0.12);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.65rem 0.15rem;
  }

  /* Keep language toggle persistent and outside mobile menu. */
  .main-nav .lang-toggle {
    display: none !important;
  }

  .header-actions .lang-toggle {
    display: inline-flex !important;
  }

  .brand-line-1 {
    font-size: 1.25rem;
  }

  .brand-line-2 {
    font-size: 1.45rem;
  }

  .brand-line-3 {
    max-width: 220px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}


/* --- Polish additions --- */
.lang-toggle {
  background: var(--terracotta);
  color: #fff;
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 0.95rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.lang-toggle::before {
  content: "🌐";
  font-size: 0.95rem;
}
.lang-toggle:hover {
  background: #15305e;
  border-color: #15305e;
}
.main-nav a {
  color: var(--text);
  font-weight: 700;
}
.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: var(--terracotta);
  border-bottom: 2px solid var(--terracotta);
}
@media (max-width: 860px) {
  /* Keep toggle outside menu on mobile, and give it more presence. */
  .header-actions .lang-toggle {
    display: inline-flex !important;
    min-width: 84px;
    padding: 0.55rem 0.8rem;
    font-size: 0.95rem;
  }
  .main-nav .lang-toggle { display: none !important; }
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: left;
  max-width: 1120px;
  margin: 0 auto 1rem auto;
}
.footer-cols a { color: var(--text); text-decoration: none; line-height: 1.7; }
.footer-cols a:hover { color: var(--terracotta); text-decoration: underline; }
.footer-disclaimer {
  max-width: 900px; margin: 0.5rem auto 0 auto; text-align: center; opacity: 0.85;
}
@media (max-width: 860px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
/* Comparison table */
.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}
.compare-scroll .compare-table {
  margin: 0;
  min-width: 520px;
}
.compare-table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--surface); border-radius: 14px; overflow: hidden; }
.compare-table th, .compare-table td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); }
.compare-table th { background: #e2e9f3; font-weight: 800; }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table .yes { color: #2d6a4f; font-weight: 800; }
.compare-table .no  { color: #b91c1c; font-weight: 800; }
/* FAQ */
.faq-list details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0.9rem 1.1rem; margin-bottom: 0.6rem;
}
.faq-list summary { cursor: pointer; font-weight: 700; color: var(--text); }
.faq-list details[open] summary { color: var(--terracotta); }
.faq-list p { margin: 0.5rem 0 0 0; }
/* Trust badges */
.trust-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; padding: 1rem; }
.trust-badge { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.55rem 1rem; font-size: 0.9rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; }

/* --- Polish pass additions --- */
#productSelect[disabled] {
  background: #eef1f7;
  color: var(--text);
  opacity: 1;
  cursor: not-allowed;
  font-weight: 700;
}
.intake-step-bar {
  display: flex; gap: 0.5rem; margin: 1rem 0; font-size: 0.9rem;
  overflow-x: auto;
}
.intake-step-bar .step {
  padding: 0.4rem 0.9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); white-space: nowrap;
}
.intake-step-bar .step.active { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
/* Focus rings for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sand); outline-offset: 2px; border-radius: 8px;
}
/* Skip-to-content for screen readers */
.skip-link {
  position: absolute; top: -40px; left: 6px; background: var(--terracotta); color: #fff;
  padding: 0.5rem 0.8rem; border-radius: 8px; z-index: 1000;
}
.skip-link:focus { top: 6px; }
@media (max-width: 860px) {
  .hero-actions { gap: 0.5rem; }
  .package-price { font-size: 1.4rem; }
  h1 { font-size: 1.7rem; }
}

/* Package / doc preview thumbnails */
.pkg-preview, .doc-preview {
  margin: 0 0 1rem; text-align: center;
}
.pkg-preview img, .doc-preview img {
  width: 100%; max-width: 380px; height: auto;
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 6px 16px rgba(10,22,40,0.08);
  background: #fff;
}
.pkg-preview figcaption, .doc-preview figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}
