/* =============================================
   iRock Finishes - Client Onboarding
   Tokens lifted from the main site design system.
   ============================================= */

:root {
  --black:       #0A0A0A;
  --dark:        #141414;
  --dark-2:      #1E1E1E;
  --dark-3:      #2A2A2A;
  --gold:        #C9A870;
  --gold-light:  #E2C99A;
  --gold-dark:   #A88548;
  --gold-ink:    #6B5220;
  --stone:       #F7F4EF;
  --stone-2:     #EDE9E2;
  --stone-3:     #D9D3C8;
  --white:       #FFFFFF;
  --text-light:  #B0A898;
  --text-muted:  #6B655D;
  --ok:          #1F7A4D;
  --warn:        #B3541E;
  --err:         #A32A1B;

  --font-head: 'Montserrat', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.10);
  --shadow:    0 8px 32px rgba(0,0,0,0.14);
  --shadow-gold: 0 6px 24px rgba(201,168,112,0.28);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w: 720px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--black);
}

/* --- Header --- */
.masthead {
  background: var(--black);
  padding: 18px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(201,168,112,0.28);
}
.masthead__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.masthead__logo { height: 34px; width: auto; }
.masthead__tag {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: right;
}

/* --- Progress rail --- */
.progress {
  position: sticky;
  top: 71px;
  z-index: 39;
  background: var(--stone);
  border-bottom: 1px solid var(--stone-3);
  padding: 10px 20px 12px;
}
.progress__inner { max-width: var(--max-w); margin: 0 auto; }
.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.progress__bar {
  height: 4px;
  background: var(--stone-3);
  border-radius: 999px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 999px;
  transition: width var(--transition);
}

/* --- Layout --- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px 140px; }

.step { display: none; padding-top: 30px; }
.step.is-active { display: block; }

.step__eyebrow {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.step__title { font-size: clamp(1.6rem, 5vw, 2.1rem); margin-bottom: 10px; }
.step__intro { color: var(--text-muted); max-width: 56ch; margin-bottom: 26px; }

/* --- Welcome --- */
.hero {
  background: var(--black);
  color: var(--stone);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  margin-top: 26px;
  box-shadow: var(--shadow);
}
.hero h1 { color: var(--white); font-size: clamp(1.8rem, 6vw, 2.6rem); margin-bottom: 14px; }
.hero p { color: var(--text-light); margin-bottom: 12px; }
.hero p:last-child { margin-bottom: 0; }
.hero__job {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,112,0.14);
  border: 1px solid rgba(201,168,112,0.4);
  color: var(--gold-light);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero__list { margin: 18px 0 0; padding: 0; list-style: none; }
.hero__list li {
  color: var(--text-light);
  padding: 9px 0 9px 30px;
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero__list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 17px;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

/* --- Fields --- */
.field { margin-bottom: 24px; }
.field__label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--black);
  margin-bottom: 4px;
}
.field__req { color: var(--gold-dark); margin-left: 3px; }
.field__help { display: block; font-size: 13.5px; color: var(--text-muted); margin-bottom: 10px; }
.field__error {
  display: none;
  font-size: 13.5px;
  color: var(--err);
  font-weight: 600;
  margin-top: 7px;
}
.field.has-error .field__error { display: block; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: var(--err); }

input[type="text"], input[type="tel"], input[type="email"],
input[type="number"], input[type="date"], textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px; /* 16px stops iOS zooming on focus */
  line-height: 1.5;
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--stone-3);
  border-radius: var(--radius);
  padding: 13px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B655D' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}
textarea { min-height: 104px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(201,168,112,0.22);
}

/* --- Choice controls --- */
.choices { display: grid; gap: 9px; }
.choices--two { grid-template-columns: 1fr; }
@media (min-width: 560px) { .choices--two { grid-template-columns: 1fr 1fr; } }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--stone-3);
  border-radius: var(--radius);
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  min-height: 50px;
}
.choice:hover { border-color: var(--gold); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__box {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  margin-top: 1px;
  border: 2px solid var(--stone-3);
  background: var(--white);
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.choice--radio .choice__box { border-radius: 50%; }
.choice--check .choice__box { border-radius: 5px; }
.choice__box::after {
  content: "";
  position: absolute;
  opacity: 0;
  transition: opacity var(--transition);
}
.choice--radio .choice__box::after {
  inset: 3px;
  border-radius: 50%;
  background: var(--black);
}
.choice--check .choice__box::after {
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid var(--black);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.choice input:checked ~ .choice__box { border-color: var(--gold-dark); background: var(--gold); }
.choice input:checked ~ .choice__box::after { opacity: 1; }
.choice input:checked ~ .choice__text { font-weight: 500; }
.choice:has(input:checked) { border-color: var(--gold-dark); background: #FEFCF8; box-shadow: inset 0 0 0 1px rgba(201,168,112,0.35); }
.choice input:focus-visible ~ .choice__box { box-shadow: 0 0 0 3px rgba(201,168,112,0.35); }
.choice__text { font-size: 15px; line-height: 1.45; }
.choice__note { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* --- Conditional reveal --- */
.reveal { display: none; }
.reveal.is-open { display: block; }
.reveal--nest {
  border-left: 2px solid var(--gold);
  padding-left: 16px;
  margin-top: 4px;
  margin-bottom: 24px;
}

/* --- Callouts --- */
.note {
  background: #FCF7EC;
  border: 1px solid #E8D9B6;
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 14px;
  color: var(--gold-ink);
  margin-bottom: 24px;
}
.note strong { color: var(--gold-ink); }

/* --- Photos --- */
.dropzone {
  border: 2px dashed var(--stone-3);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}
.dropzone.is-hot { border-color: var(--gold-dark); background: #FEFCF8; }
.dropzone__icon { color: var(--gold-dark); margin: 0 auto 10px; }
.dropzone__hint { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 16px; }
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--stone-2);
  border: 1px solid var(--stone-3);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__doc {
  display: flex; align-items: center; justify-content: center;
  height: 100%; padding: 8px;
  font-size: 11px; text-align: center; color: var(--text-muted);
  word-break: break-word;
}
.thumb__x {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(10,10,10,0.75);
  color: var(--white);
  font-size: 15px; line-height: 26px; text-align: center;
  border: none; cursor: pointer;
}

/* --- Buttons --- */
.actions {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(247,244,239,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--stone-3);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  z-index: 41;
}
.actions__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 15px 22px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--black); color: var(--white); flex: 1; }
.btn--primary:hover { background: var(--dark-3); }
.btn--gold { background: var(--gold); color: var(--black); flex: 1; box-shadow: var(--shadow-gold); }
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost { background: transparent; color: var(--text-muted); border-color: var(--stone-3); }
.btn--ghost:hover { color: var(--black); border-color: var(--black); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn--wide { width: 100%; }

.saved {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 9px;
  min-height: 18px;
}

/* --- Confirmation --- */
.done { text-align: center; padding: 48px 0 20px; }
.done__mark {
  width: 66px; height: 66px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-gold);
}
.card {
  background: var(--white);
  border: 1px solid var(--stone-3);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.card ul { list-style: none; }
.card li { padding: 8px 0 8px 26px; position: relative; border-top: 1px solid var(--stone-2); font-size: 15px; }
.card li:first-child { border-top: none; }
.card li::before {
  content: "";
  position: absolute;
  left: 2px; top: 16px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

/* --- Footer --- */
.foot {
  border-top: 1px solid var(--stone-3);
  margin-top: 40px;
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.foot a { color: var(--text-muted); text-decoration: underline; }
.foot__brand {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--black);
  margin-bottom: 8px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
