@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --color-bg: #fbecef;
  --color-fg: #123f35;
  --color-accent: #fe6f98;
  --color-muted: #5f736c;
  --color-surface: #fff9fa;
  --color-accent-dark: #d94c78;
  --color-accent-soft: #ffd4df;
  --color-dark: #0d382f;
  --color-mint: #c8f5de;
  --color-mint-soft: #e3faee;
  --color-line: rgba(18, 63, 53, 0.16);
  --color-on-dark: #f4fff9;
  --shadow-soft: 0 1.4rem 3.8rem rgba(71, 44, 53, 0.1);
  --shadow-lift: 0 1.2rem 2.4rem rgba(18, 63, 53, 0.14);

  --font-display: "Space Grotesk", "Trebuchet MS", sans-serif;
  --font-body: "DM Sans", "Avenir Next", sans-serif;

  --radius-small: 1rem;
  --radius-medium: 1.75rem;
  --radius-pill: 999px;

  --space-1: 0.375rem;
  --space-2: 0.75rem;
  --space-3: 1.25rem;
  --space-4: 2rem;
  --space-5: 4.5rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-fg);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────── */
.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.app-header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: var(--space-1);
}

.app-header p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ── Progress bar ───────────────────────── */
.progress-wrap {
  margin-bottom: var(--space-4);
}

.progress-track {
  height: 6px;
  background: var(--color-accent-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-1);
}

.progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 11%;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: right;
}

/* ── Wizard steps ───────────────────────── */
.wiz-step {
  display: none;
}

.wiz-step--active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wiz-step h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-fg);
}

/* ── Form elements ──────────────────────── */
.form-group {
  margin-bottom: var(--space-3);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-1);
  color: var(--color-fg);
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-small);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-fg);
  background: var(--color-surface);
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.input-error {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

/* ── Radio / Checkbox groups ──────────── */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1rem;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background: var(--color-surface);
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--color-accent-soft);
}

.radio-option input,
.checkbox-option input {
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-option span,
.checkbox-option span {
  font-size: 0.9rem;
}

.feature-section-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
  color: var(--color-fg);
}

.feature-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}

.custom-warning {
  display: none;
  background: var(--color-accent-soft);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-small);
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--color-dark);
}

/* ── Language picker ────────────────────── */
.lang-picker {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-4);
}

.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border: 3px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-fg);
}

.lang-btn:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.lang-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.lang-flag {
  font-size: 2.5rem;
}

/* ── Navigation buttons ─────────────────── */
.wiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-line);
}

.btn {
  padding: 0.7rem 1.6rem;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-fg);
  border: 2px solid var(--color-line);
}

.btn-secondary:hover {
  border-color: var(--color-fg);
}

.btn-submit {
  background: var(--color-fg);
  color: var(--color-on-dark);
}

.btn-submit:hover {
  background: var(--color-dark);
  transform: translateY(-1px);
}

/* ── Sub-group toggle ───────────────────── */
.field-hint {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin: 0 0 var(--space-3);
  max-width: 40rem;
}

.radio-group--cards {
  display: grid;
  gap: var(--space-2);
}

.radio-option--card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: var(--space-3);
}

.radio-option--card input {
  margin-top: 0.2rem;
}

.radio-option--card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.radio-option--card span {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.radio-option--card:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ── Result container ───────────────────── */
#result-container {
  display: none;
}

.is-hidden {
  display: none !important;
}

.result-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.result-actions .btn {
  min-width: 160px;
  text-align: center;
}

.optional-tag {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 0.85em;
}

select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-small);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-fg);
}

/* ── Package picker ─────────────────────── */
#package-picker {
  margin-top: var(--space-3);
}

.picker-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: var(--space-2);
}

.picker-sub {
  text-align: center;
  color: var(--color-muted);
  max-width: 40rem;
  margin: 0 auto var(--space-4);
}

.package-cards {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .package-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 2px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  font: inherit;
  color: inherit;
  width: 100%;
}

.pkg-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.pkg-card--rec {
  border-color: var(--color-accent);
  background: linear-gradient(160deg, var(--color-surface), var(--color-accent-soft));
}

.pkg-card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pkg-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-top: var(--space-2);
}

.pkg-card-desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  flex: 1;
}

.pkg-card-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.pkg-card-exvat {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: -0.35rem;
}

.pkg-card-currency {
  font-size: 0.9rem;
  font-weight: 500;
}

.pkg-card-cta {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--color-fg);
  color: var(--color-on-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

.picker-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
}

/* ── Proforma ───────────────────────────── */
.proforma-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-fg);
  margin-bottom: var(--space-4);
}

.proforma-brand h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proforma-meta-block {
  font-size: 0.88rem;
  color: var(--color-muted);
  text-align: right;
}

.pf-label {
  display: inline-block;
  min-width: 6.5rem;
  font-weight: 600;
  color: var(--color-fg);
}

.proforma-parties {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-4);
}

@media (min-width: 700px) {
  .proforma-parties {
    grid-template-columns: 1fr 1fr;
  }
}

.proforma-party {
  background: var(--color-mint-soft);
  padding: var(--space-3);
  border-radius: var(--radius-small);
}

.proforma-party h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: var(--space-2);
  border: none;
  padding: 0;
}

.proforma-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
  font-size: 0.92rem;
}

.proforma-table th,
.proforma-table td {
  border: 1px solid var(--color-line);
  padding: 0.75rem;
  vertical-align: top;
}

.proforma-table th {
  background: var(--color-fg);
  color: var(--color-on-dark);
  font-family: var(--font-display);
  font-weight: 600;
  text-align: left;
}

.proforma-table .num {
  text-align: right;
  white-space: nowrap;
}

.pf-line-desc {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.pf-line-note {
  color: var(--color-muted);
  font-size: 0.78rem;
  margin-top: 0.35rem;
  font-style: italic;
}

.proforma-totals {
  max-width: 22rem;
  margin-left: auto;
  margin-bottom: var(--space-3);
}

.pf-total-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-line);
}

.pf-total-row--grand {
  border-bottom: none;
  border-top: 2px solid var(--color-fg);
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  font-size: 1.1rem;
}

.proforma-tax-note,
.proforma-usd-approx {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

/* ── Offer document ─────────────────────── */
.offer-doc {
  background: var(--color-surface);
  border-radius: var(--radius-medium);
  padding: var(--space-4);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--space-4);
}

.offer-header {
  text-align: center;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-fg);
  margin-bottom: var(--space-4);
}

.offer-header h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-fg);
}

.offer-byline {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: var(--space-1);
}

.offer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}

.offer-section {
  margin-bottom: var(--space-4);
}

.offer-section h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-fg);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-line);
}

.offer-client-block {
  background: var(--color-mint-soft);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-small);
}

.offer-client-block p {
  margin-bottom: 0.25rem;
}

.offer-packages {
  display: grid;
  gap: var(--space-3);
}

.offer-package {
  border: 2px solid var(--color-line);
  border-radius: var(--radius-small);
  padding: var(--space-3);
  transition: border-color 0.2s;
}

.offer-package--rec {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, var(--color-surface), var(--color-accent-soft));
}

.offer-package h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: var(--space-1);
}

.offer-rec-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  vertical-align: middle;
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.offer-pkg-desc {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin-bottom: var(--space-2);
}

.offer-pkg-price {
  font-size: 1rem;
}

.offer-custom-block {
  background: var(--color-mint-soft);
  padding: var(--space-3);
  border-radius: var(--radius-small);
  border-left: 4px solid var(--color-fg);
}

.offer-custom-block ul {
  list-style: none;
  padding-left: 0;
  margin: var(--space-2) 0;
}

.offer-custom-block li {
  padding: var(--space-1) 0;
}

.offer-list {
  list-style: none;
  padding-left: 0;
}

.offer-list li {
  padding: 0.3rem 0 0.3rem 1.6rem;
  position: relative;
  font-size: 0.9rem;
}

.offer-list--check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-fg);
  font-weight: 700;
}

.offer-list--cross li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--color-muted);
}

.offer-valid-until {
  font-weight: 600;
  color: var(--color-fg);
}

.offer-cta {
  text-align: center;
}

.offer-contact-btns {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.btn-wa,
.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-wa {
  background: #25D366;
  color: #fff;
}

.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.btn-email {
  background: var(--color-fg);
  color: var(--color-on-dark);
}

.btn-email:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.offer-footer {
  text-align: center;
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-fg);
  margin-top: var(--space-4);
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 600px) {
  .app-shell {
    padding: var(--space-3) var(--space-2);
  }

  .lang-picker {
    flex-direction: column;
    align-items: center;
  }

  .lang-btn {
    width: 100%;
    max-width: 280px;
    padding: var(--space-3);
  }

  .offer-meta {
    flex-direction: column;
    gap: var(--space-1);
  }

  .offer-contact-btns {
    flex-direction: column;
    align-items: center;
  }

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

/* ── Print styles ───────────────────────── */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .app-header,
  .progress-wrap,
  #wizard-container,
  #package-picker,
  .wiz-nav,
  .result-actions,
  .btn,
  #btn-new-quote,
  .no-print,
  .offer-cta {
    display: none !important;
  }

  #result-container {
    display: block !important;
  }

  .offer-doc {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
  }

  .offer-header {
    border-bottom-color: #000;
  }

  .offer-header h1 {
    color: #000;
  }

  .offer-section h2 {
    color: #000;
    border-bottom-color: #ccc;
  }

  .offer-package--rec {
    border-color: #000;
    background: #f5f5f5;
  }

  .offer-rec-badge {
    background: #000;
    color: #fff;
  }

  .offer-footer {
    border-top-color: #000;
  }

  .offer-custom-block {
    border-left-color: #000;
    background: #f5f5f5;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  a::after {
    content: none;
  }

  @page {
    margin: 1.5cm;
  }
}
