:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --line: #2a2a2a;
  --line-strong: #4a4a4a;
  --field-bg: #0c0c0c;
  --accent: #fff;
  --error: #ff6b6b;
  --ok: #7CFFB2;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --maxw: 680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { height: 26px; width: auto; display: block; padding-left: 4px; }
.lang { display: flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: 0.1em; }
.lang button {
  background: none; border: none; color: var(--muted);
  font: inherit; cursor: pointer; padding: 4px 2px; letter-spacing: 0.1em;
  transition: color 0.2s;
}
.lang button.active { color: var(--fg); }
.lang button:hover { color: var(--fg); }
.lang-sep { color: var(--line-strong); }

/* ---------- Layout ---------- */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 120px;
}

/* ---------- Progress ---------- */
.progress {
  position: sticky;
  top: 57px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  padding: 20px 0 16px;
}
.progress-bar { height: 1px; background: var(--line); position: relative; }
.progress-fill {
  position: absolute; left: 0; top: 0; height: 1px; background: var(--fg);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px; color: var(--muted); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.progress-step { color: var(--fg); }

/* ---------- Steps ---------- */
.step { animation: fade 0.5s ease both; }
@keyframes fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.04;
  margin: 18px 0 6px;
  letter-spacing: -0.01em;
}
.step-sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 0 28px;
  white-space: pre-line;
}

/* ---------- Fields ---------- */
.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 9px;
  color: var(--fg);
}
.field .sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: -4px;
  margin-bottom: 9px;
  font-style: italic;
}
.req { color: var(--muted); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  padding: 14px 14px;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  background: #111;
}
input::placeholder, textarea::placeholder { color: #555; }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%238a8a8a' stroke-width='1.4' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.6); }

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 12px; margin-top: 7px; display: none; }
.field.invalid .field-error { display: block; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Choice chips (dietary) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--fg);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
  font-weight: 300;
}
.chip:hover { border-color: var(--line-strong); }
.chip.selected { background: var(--fg); color: #000; border-color: var(--fg); }

/* ---------- File upload ---------- */
.file {
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file:hover { border-color: var(--fg); background: #0a0a0a; }
.file input { display: none; }
.file-info { min-width: 0; }
.file-name { font-size: 14px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.file-action { font-size: 13px; color: var(--muted); white-space: nowrap; letter-spacing: 0.04em; }
.file.has-file { border-style: solid; border-color: var(--line-strong); }
.file.has-file .file-name { color: var(--ok); }

/* ---------- Buttons / nav ---------- */
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 44px;
}
.btn {
  font-family: var(--sans);
  font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 34px; border-radius: 2px; cursor: pointer; border: 1px solid var(--fg);
  transition: all 0.2s; font-weight: 400;
}
.btn-primary { background: var(--fg); color: #000; }
.btn-primary:hover { background: #ddd; }
.btn-ghost { background: none; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--fg); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Cover ---------- */
.cover { padding-top: 8vh; }
.cover .eyebrow { color: var(--muted); letter-spacing: 0.22em; text-transform: uppercase; font-size: 12px; }
.cover h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(44px, 11vw, 92px); line-height: 0.98; margin: 22px 0 24px;
  letter-spacing: -0.015em;
}
.cover p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 46ch; }
.cover .meta { margin-top: 26px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ---------- Review ---------- */
.review-group { border-top: 1px solid var(--line); padding: 18px 0; }
.review-group h4 {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center;
}
.review-group h4 button {
  background: none; border: none; color: var(--fg); font: inherit; cursor: pointer;
  font-size: 11px; letter-spacing: 0.1em; text-decoration: underline; text-underline-offset: 3px;
}
.review-item { display: flex; gap: 14px; padding: 5px 0; font-size: 14px; }
.review-item .k { color: var(--muted); flex: 0 0 42%; }
.review-item .v { color: var(--fg); white-space: pre-wrap; }

/* ---------- Success ---------- */
.done { padding-top: 14vh; text-align: center; }
.done h2 { font-family: var(--display); font-weight: 300; font-size: clamp(40px, 9vw, 72px); margin: 0 0 18px; }
.done p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 40ch; margin: 0 auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #1a1a1a; border: 1px solid var(--line-strong); color: var(--fg);
  padding: 14px 22px; border-radius: 4px; font-size: 14px; opacity: 0;
  transition: all 0.3s; pointer-events: none; z-index: 50; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--error); }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(0,0,0,0.3); border-top-color: #000;
  border-radius: 50%; display: inline-block; vertical-align: -2px; margin-left: 8px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
