/* ────────────────────────────────────────────────────────
   Ascova Returns — split-screen fashion portal
   Reference: ICON Amsterdam return portal
   Palette: #111 ink · #f6f6f6 canvas · #fff cards
   Type: Montserrat (geometric grotesk)
──────────────────────────────────────────────────────── */

:root {
  --ink: #111111;
  --ink-soft: #3d3d3d;
  --ink-muted: #757575;
  --canvas: #f6f6f6;
  --card: #ffffff;
  --line: #e3e3e3;
  --line-strong: #d6d6d6;
  --danger: #b3261e;
  --warn: #8a6d1a;
  --radius-card: 14px;
  --radius-box: 10px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 88px;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  min-height: 100vh;
}

/* ─── Topbar ─── */

.topbar {
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-content: center;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* language selector */

.lang-toggle {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--canvas);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}

.lang-toggle:hover { border-color: var(--ink); }

.lang-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.lang-toggle svg {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  display: block;
}

@media (max-width: 520px) {
  .lang-toggle { right: 12px; width: 38px; height: 38px; }
}

.lang-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  display: grid;
  place-content: center;
  padding: 20px;
  z-index: 100;
}

.lang-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  overflow-y: auto;
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  animation: modal-in 260ms var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.lang-modal-title {
  font-size: 19px;
  font-weight: 700;
}

.lang-close {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-content: center;
  border-radius: 50%;
  transition: background 180ms var(--ease);
}

.lang-close:hover { background: var(--canvas); }

.lang-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.lang-close svg { width: 26px; height: 26px; }

.lang-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-box);
  padding: 15px 18px;
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.lang-option:hover { border-color: var(--ink); }

.lang-option:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.lang-option.is-current {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.lang-option svg {
  width: 24px;
  height: 17px;
  border-radius: 2px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lang-option .lang-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  color: var(--ink);
  box-shadow: none;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  line-height: 1;
}

.brand-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ─── Split shell ─── */

.shell {
  display: flex;
  min-height: calc(100vh - var(--topbar-h));
}

.media-pane {
  flex: 1 1 50%;
  background:
    linear-gradient(160deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0)),
    #e9e4dc url('img/hero.jpg') center 30% / cover no-repeat;
  display: none;
}

body.step-1-active .media-pane { display: block; }

.content-pane {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
}

.content-inner {
  width: 100%;
  max-width: 620px;
  padding: 48px 32px 64px;
}

/* Step 1: card sits higher, like the reference */
body.step-1-active .content-inner {
  max-width: 640px;
  padding-top: 96px;
}

/* Steps 2–4: full-width centered column, no image */
body:not(.step-1-active) .content-inner {
  max-width: 720px;
}

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  body.step-1-active .media-pane {
    flex: none;
    height: 220px;
  }
  .content-inner,
  body.step-1-active .content-inner {
    padding: 32px 16px 56px;
    max-width: 640px;
  }
}

/* ─── Progress (hidden on step 1) ─── */

.progress { margin-bottom: 32px; }

body.step-1-active .progress { display: none; }

.progress-track {
  list-style: none;
  display: flex;
  justify-content: space-between;
  position: relative;
}

.progress-track::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--line-strong);
}

.progress-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 56px;
}

.progress-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  transition: background 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}

.progress-step.is-current .progress-dot {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 0 0 4px #dddddd;
}

.progress-step.is-done .progress-dot {
  background: var(--ink);
  border-color: var(--ink);
}

.progress-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 300ms var(--ease);
}

.progress-step.is-current .progress-label,
.progress-step.is-done .progress-label { color: var(--ink); }

.progress-count {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ─── Banners / strips ─── */

.demo-banner,
.info-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.info-strip { margin-top: 24px; margin-bottom: 0; }

.strip-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--ink-muted);
}

.demo-banner code {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 12px;
}

.error-box {
  background: #fdf3f2;
  border: 1px solid #eccfcd;
  border-radius: var(--radius-box);
  padding: 14px 18px;
  font-size: 14px;
  color: #7c1d17;
  margin-bottom: 24px;
}

/* ─── Cards & steps ─── */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card--lookup { padding: 36px 32px; }

@media (max-width: 520px) {
  .card, .card--lookup { padding: 28px 18px; }
}

.step[hidden] { display: none; }

.step.is-active { animation: step-in 380ms var(--ease); }

@keyframes step-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-heading {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  margin-bottom: 8px;
}

.card--lookup .step-heading { margin-bottom: 24px; }

.step-intro {
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  margin: 0 auto 28px;
  max-width: 48ch;
}

/* ─── Form fields (floating-label boxes) ─── */

.field-box {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-box);
  padding: 10px 16px 12px;
  margin-bottom: 16px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
  cursor: text;
}

.field-box:hover { border-color: #bdbdbd; }

.field-box:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.field-box:has(.field-input.is-invalid) { border-color: var(--danger); }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.field-input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0;
}

.field-input:focus { outline: none; }

.field-input::placeholder { color: #9e9e9e; }

.field-error {
  margin: -8px 0 16px 4px;
  font-size: 13px;
  color: var(--danger);
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 17px 32px;
  cursor: pointer;
  transition: background 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-primary {
  width: 100%;
  background: var(--ink);
  color: #ffffff;
  border: 1px solid var(--ink);
}

.btn-primary:hover:not(:disabled) {
  background: #2e2e2e;
  border-color: #2e2e2e;
}

.btn-primary:disabled {
  background: #c7c7c7;
  border-color: #c7c7c7;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover { border-color: var(--ink); }

.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }

.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.step-actions .btn-ghost { flex: 0 0 auto; }
.step-actions .btn-primary { flex: 1; }

/* help link under the primary button */

.link-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: center;
  padding: 16px 8px 4px;
  cursor: pointer;
}

.link-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}

.order-help {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}

.order-help a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Item list (step 2) ─── */

.item-list { list-style: none; }

.item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.item:first-child { border-top: 1px solid var(--line); }

.item-check {
  margin-top: 30px;
  flex: 0 0 auto;
}

.item-check input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}

.item-check input:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.item-check input:checked::after {
  content: '';
  width: 10px;
  height: 10px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.item-check input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.item-media {
  flex: 0 0 auto;
  width: 72px;
  height: 90px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  overflow: hidden;
  display: grid;
  place-content: center;
  color: #c4c4c4;
}

.item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-media svg { width: 24px; height: 24px; }

.item-body { flex: 1; min-width: 0; }

.item-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
}

.item-variant {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.item-price {
  font-size: 13.5px;
  margin-top: 6px;
}

.item-meta {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 8px;
}

.item-meta--warn { color: var(--warn); }

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
  margin-top: 8px;
}

.item.is-ineligible .item-media,
.item.is-ineligible .item-body { opacity: 0.45; }

.item.is-ineligible .badge { opacity: 1; }

/* quantity stepper */

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  margin-top: 12px;
  overflow: hidden;
}

.qty button {
  width: 36px;
  height: 34px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms var(--ease);
}

.qty button:hover:not(:disabled) { background: var(--canvas); }
.qty button:disabled { color: #c4c4c4; cursor: not-allowed; }

.qty button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.qty-value {
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

/* ─── Reasons (step 3) ─── */

.reason-group {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.reason-group:first-child { border-top: 1px solid var(--line); }

.reason-item-title {
  font-size: 15.5px;
  font-weight: 600;
}

.reason-item-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.reason-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reason-pill { position: relative; }

.reason-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.reason-pill label {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.reason-pill label:hover { border-color: var(--ink); }

.reason-pill input:checked + label {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.reason-pill input:focus-visible + label {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.size-hint {
  margin-top: 14px;
  padding: 11px 14px;
  background: var(--canvas);
  border-radius: var(--radius-box);
  font-size: 13px;
  color: var(--ink-soft);
  animation: step-in 300ms var(--ease);
}

/* ─── Confirmation (step 4) ─── */

.confirm-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  display: grid;
  place-content: center;
}

.confirm-mark svg { width: 26px; height: 26px; }

.step-intro--center { text-align: center; }

.rma-card {
  text-align: center;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 26px 20px;
  margin-bottom: 32px;
}

.rma-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.rma-value {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.rma-order {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.summary { margin-bottom: 36px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.summary-row:first-child { border-top: 1px solid var(--line); }

.summary-item { font-weight: 600; }

.summary-sub {
  display: block;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 400;
}

.summary-reason {
  color: var(--ink-muted);
  white-space: nowrap;
}

.instructions-heading {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}

.instructions { list-style: none; }

.instruction {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.instruction:last-child { border-bottom: none; }

.instruction-num {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.instruction-title {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 2px;
}

.instruction-text {
  font-size: 14px;
  color: var(--ink-soft);
}

.return-address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 10px;
  padding: 14px 18px;
  background: var(--canvas);
  border-radius: var(--radius-box);
  border-left: 2px solid var(--ink);
}

.fineprint {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

.fineprint a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Footer ─── */

.footer {
  margin-top: 36px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

body.step-1-active .footer { display: none; }

/* ─── Motion preferences ─── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
