/* Signup wizard for LPQ Tartine Club (black header with the LPQ logo plate, white panel, dark
   primary button). Colors follow the Wallet kit: ink, cream card, yellow stamps.
   Plain CSS; index.scss holds the same rules (no build step). */
:root {
  --ink: #0e0d0b; /* Wallet kit foreground and logo plate, so the plate blends into the header */
  --accent: #fdc300; /* stamp yellow */
  --accent-pale: #fde9a3;
  --cream: #fbf5ee; /* Wallet card background */
  --dark: #0e0d0b;
  --text: #1f1c18;
  --muted: #7d756c;
  --line: #e4dbd1;
  --disabled: #e7e1da;
  --disabled-text: #a39b94;
  --page: #ebe4de;
  --red: #d54b3c;
  --green: #1e9e52;
  --radius: 14px;
}

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

html,
body {
  padding: 0;
  margin: 0;
}

body {
  font-family: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

button {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 0 32px 0;
}
@media (min-width: 480px) {
  .app {
    padding: 24px 0 40px 0;
  }
}

/* ---- header ---- */

.app__header {
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
}
@media (min-width: 480px) {
  .app__header {
    border-radius: 20px 20px 0 0;
    grid-template-columns: 1fr minmax(0, 168px) 1fr;
  }
  .brand {
    grid-column: 2;
  }
  .lang {
    justify-self: end;
  }
}

.brand {
  width: 100%;
  max-width: 168px;
  justify-self: center;
}
.brand__logo {
  display: block;
  width: 100%;
  height: auto;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang {
  display: flex;
  gap: 4px;
  flex: none;
}
.lang button {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}
.lang button.is-active {
  background: var(--accent);
  color: var(--ink);
}

/* ---- panel ---- */

.panel {
  background: #fff;
  padding: 18px 20px 22px 20px;
  min-height: 420px;
}
@media (min-width: 480px) {
  .panel {
    border-radius: 0 0 20px 20px;
    border: 1px solid var(--line);
    border-top: none;
  }
}

.wizard {
  position: relative;
}

.notice {
  margin: 0 0 18px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.notice--warn {
  background: #fff4e5;
  border: 1px solid #f6c89a;
  color: #7a3e00;
}

.step {
  display: none;
}
.step--active {
  display: block;
  animation: step-in 0.2s ease-out;
}
.step--center {
  text-align: center;
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.step__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px 0;
}
.step__hint {
  margin: 0 0 20px 0;
  color: #5d554f;
  font-size: 15px;
  line-height: 1.5;
}
.step__note {
  margin: 14px 0 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.step__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* ---- fields ---- */

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
@media (min-width: 360px) {
  .signup-name-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
  .signup-name-fields .field { min-width: 0; }
}

.field__label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field__input,
.phone-input {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  padding: 0 14px;
  background: #fff;
  font-size: 16px;
  width: 100%;
}
.field__input:focus,
.phone-input:focus-within {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(253, 195, 0, 0.35);
}
.field__input--code {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 18px;
}
.field__input::placeholder,
.phone-input__field::placeholder {
  color: #b8b0a9;
}

.phone-input__prefix {
  color: #9a928b;
  font-weight: 600;
  margin-right: 8px;
  letter-spacing: 0.04em;
}
.phone-input__field {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.06em;
  height: 100%;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}
.checkbox input[type="checkbox"] {
  margin: 2px 0 0 0;
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: var(--ink);
  cursor: pointer;
}

.error-message {
  color: var(--red);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 6px;
  display: none;
}
.error-message--center {
  text-align: center;
}

input,
textarea,
select {
  font-size: 16px; /* keeps iOS from zooming into the field */
}

/* ---- buttons ---- */

.btn {
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s, background 0.15s;
}
.btn--primary {
  background: var(--dark);
  color: #fff;
}
.btn--primary:disabled {
  background: var(--disabled);
  color: var(--disabled-text);
  cursor: default;
}
.btn--secondary {
  background: var(--accent);
  color: var(--ink);
}
.btn--link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  padding: 6px;
}
.btn--link:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}
.btn--text {
  color: var(--muted);
  font-weight: 500;
  padding: 8px;
}

/* ---- OTP boxes ---- */

#otp-input {
  display: flex;
  gap: 8px;
  justify-content: center;
}
#otp-input input {
  width: min(46px, 12vw);
  height: 52px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  text-align: center;
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  background: #fff;
}
#otp-input input:focus {
  outline: none;
  border-color: var(--ink);
}
#otp-input input::-webkit-outer-spin-button,
#otp-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#otp-input input[type="number"] {
  -moz-appearance: textfield;
}
.otp {
  margin-top: 6px;
}

/* ---- done ---- */

.done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--green);
  color: var(--green);
  font-size: 36px;
  font-weight: 700;
  margin: 8px 0 18px 0;
}

/* ---- busy state ---- */

.wizard.is-busy .step {
  opacity: 0.5;
  pointer-events: none;
}
.wizard__busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader {
  width: 44px;
  height: 44px;
  border: 4px solid var(--ink);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: rotation 1s linear infinite;
}
@keyframes rotation {
  to {
    transform: rotate(360deg);
  }
}
