/* ============================================================
   IRON CAPITAL — Brand Color Theme
   White + Red (accent) + Grey
   ============================================================ */

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

:root {
  --red:      #C0392B;
  --red-lt:   #E74C3C;
  --red-bg:   rgba(192,57,43,.08);
  --red-glow: rgba(192,57,43,.20);
  --white:    #FFFFFF;
  --grey-50:  #F7F8FA;
  --grey-100: #EDEEF2;
  --grey-200: #D9DBE3;
  --grey-400: #9DA3B4;
  --grey-600: #5A6170;
  --grey-800: #2D3142;
  --black:    #1A1C26;
  --green:    #27AE60;
  --radius:   14px;
  --shadow-sm: 0 2px 8px rgba(45,49,66,.08);
  --shadow:    0 8px 32px rgba(45,49,66,.12);
  --shadow-lg: 0 20px 60px rgba(45,49,66,.16);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--grey-50);
  color: var(--grey-800);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, .logo strong {
  font-family: 'Baskervville', serif;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--grey-100);
  padding: 14px 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 940px; margin: auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 16px; }
.logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
}
.logo strong { 
  display: block; 
  font-size: 19px; 
  color: var(--black); 
  font-weight: 400; 
  letter-spacing: 0.2px;
  line-height: 1.1;
}
.logo small { 
  font-size: 10px; 
  color: var(--grey-400); 
  text-transform: uppercase; 
  letter-spacing: 1.2px; 
  display: block;
  margin-top: 2px;
}
.header-badge {
  font-size: 11px; padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--red); color: var(--red);
  background: var(--red-bg); font-weight: 500;
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(150deg, var(--black) 0%, #2D3142 100%);
  padding: 64px 24px 52px;
  text-align: center;
}
.hero-inner { max-width: 680px; margin: auto; }
.hero h1 {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 400; color: var(--white);
  margin-bottom: 16px; letter-spacing: -0.5px;
}
.hero h1 span { color: var(--red-lt); }
.hero p { color: var(--grey-400); font-size: 17px; margin-bottom: 30px; font-weight: 300; }
.hero-actions { display: flex; justify-content: center; margin-bottom: 40px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.2);
  color: var(--white); padding: 12px 24px; border-radius: 10px;
  text-decoration: none; font-size: 14px; font-weight: 600;
  transition: all .25s;
}
.btn-outline:hover {
  background: var(--white); color: var(--black); border-color: var(--white);
  transform: translateY(-2px);
}
.btn-outline span { font-size: 18px; }

/* Progress Bar */
.progress-wrap {
  height: 5px; background: rgba(255,255,255,.12); border-radius: 10px;
  margin-bottom: 16px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 16.66%;
  background: linear-gradient(90deg, var(--red), var(--red-lt));
  border-radius: 10px; transition: width .4s ease;
}
.step-labels {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.step-label {
  font-size: 11px; color: rgba(255,255,255,.38); flex: 1; text-align: center;
  transition: color .3s; font-weight: 500;
}
.step-label.active { color: var(--red-lt); font-weight: 700; }

/* ---- FORM CONTAINER ---- */
.form-container { max-width: 940px; margin: 0 auto; padding: 36px 24px 80px; }

.form-step { display: none; animation: fadeIn .35s ease; }
.form-step.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }

/* Form Card wrapper */
.form-step > .step-header,
.form-step > .field-grid,
.form-step > .class-guide,
.form-step > #signatories-wrap,
.form-step > .btn-add,
.form-step > .indemnity-text,
.form-step > .declaration-list,
.form-step > #decl-signatories,
.form-step > .check-field,
.form-step > .doc-list,
.form-step > .step-nav {
  background: var(--white);
  border-radius: var(--radius);
}

/* Step Card */
.form-step > * {
  display: block;
}

/* Wrap each step in a card */
.form-step {
  background: var(--white);
  border-radius: 18px;
  border: 1px solid var(--grey-100);
  box-shadow: var(--shadow);
  padding: 40px 44px;
}
@media(max-width:600px){ .form-step { padding: 24px 18px; } }

/* Step Header */
.step-header {
  display: flex; align-items: flex-start; gap: 18px;
  margin-bottom: 32px; padding-bottom: 24px;
  border-bottom: 2px solid var(--grey-100);
  background: none;
}
.step-number {
  min-width: 50px; height: 50px; border-radius: 12px;
  background: var(--red);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800; color: var(--white);
  box-shadow: 0 4px 16px var(--red-glow);
}
.step-header h2 { font-size: 20px; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.step-header p  { color: var(--grey-400); font-size: 13px; }

/* Field Grid */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: none; }
@media(max-width:600px){ .field-grid { grid-template-columns: 1fr; } }
.field.full { grid-column: 1/-1; }
.field { display: flex; flex-direction: column; gap: 7px; background: none; }

label { font-size: 13px; font-weight: 600; color: var(--grey-800); }
.req  { color: var(--red); }

input, select, textarea {
  background: var(--grey-50);
  border: 1.5px solid var(--grey-200);
  border-radius: 10px; padding: 11px 15px;
  color: var(--black); font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .22s, box-shadow .22s, background .22s;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--grey-400); }
input:hover, select:hover, textarea:hover { border-color: var(--grey-400); background: var(--white); }
input:focus, select:focus, textarea:focus {
  border-color: var(--red);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--red-bg);
}
input.error, select.error, textarea.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-bg);
  background: #fff8f8;
}
textarea { resize: vertical; min-height: 82px; }

/* Signatory Class Guide */
.class-guide {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; background: none;
}
.class-pill {
  font-size: 12px; padding: 5px 14px; border-radius: 20px; font-weight: 600;
}
.classA { background: var(--red-bg); color: var(--red); border: 1px solid rgba(192,57,43,.3); }
.classB { background: rgba(39,174,96,.08); color: #1a7d45; border: 1px solid rgba(39,174,96,.3); }
.classC { background: rgba(52,100,200,.08); color: #2a5fd6; border: 1px solid rgba(52,100,200,.25); }

/* Signatory Row */
.sig-row {
  display: grid; grid-template-columns: 2fr 1.5fr 1fr auto; gap: 12px;
  align-items: end; padding: 18px;
  background: var(--grey-50); border: 1.5px solid var(--grey-100);
  border-radius: var(--radius); margin-bottom: 12px;
}
@media(max-width:600px){ .sig-row { grid-template-columns: 1fr 1fr; } }
.sig-label { font-size: 12px; color: var(--grey-400); font-weight: 600; margin-bottom: 6px; }

.btn-remove {
  background: rgba(192,57,43,.07); border: 1px solid rgba(192,57,43,.25);
  color: var(--red); border-radius: 8px; padding: 10px 14px;
  cursor: pointer; font-size: 15px; transition: all .2s; align-self: end;
}
.btn-remove:hover { background: rgba(192,57,43,.16); }

.btn-add {
  background: transparent; border: 1.5px dashed var(--grey-200);
  color: var(--grey-400); border-radius: 10px; padding: 12px 20px;
  cursor: pointer; font-size: 14px; font-family: 'Inter',sans-serif;
  margin-top: 4px; width: 100%; transition: all .25s;
}
.btn-add:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* Indemnity Text */
.indemnity-text {
  background: var(--grey-50); border: 1px solid var(--grey-200);
  border-left: 4px solid var(--red); border-radius: var(--radius);
  padding: 20px 24px; font-size: 14px; color: var(--grey-600);
  line-height: 1.8; margin-bottom: 28px;
}

/* Declaration */
.declaration-list { margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; background: none; }
.decl-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--grey-50); border: 1px solid var(--grey-100);
  padding: 14px 18px; border-radius: 10px; font-size: 14px; color: var(--grey-600);
}
.decl-alpha {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: var(--red-bg); color: var(--red);
  display: grid; place-items: center; font-weight: 800; font-size: 12px;
  flex-shrink: 0;
}
.sub-heading { font-size: 15px; font-weight: 700; margin: 24px 0 16px; color: var(--black); }

/* Checkbox */
.check-field { margin-top: 16px; background: none; }
.checkbox-label {
  display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px;
  color: var(--grey-800);
}
.checkbox-label input[type="checkbox"] {
  width: 20px; height: 20px; min-width: 20px; accent-color: var(--red); cursor: pointer;
}

/* Document Checklist */
.doc-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; background: none; }
.doc-item {
  display: flex; align-items: flex-start; gap: 13px; cursor: pointer;
  background: var(--grey-50); border: 1.5px solid var(--grey-100);
  padding: 13px 18px; border-radius: 10px;
  font-size: 14px; color: var(--grey-600); transition: all .2s;
}
.doc-item:hover { border-color: var(--red); background: var(--red-bg); color: var(--black); }
.doc-item input { width: 17px; height: 17px; min-width: 17px; accent-color: var(--red); margin-top: 2px; }

/* Navigation Buttons */
.step-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 36px; padding-top: 24px;
  border-top: 2px solid var(--grey-100); background: none;
}
.btn-back {
  background: var(--white); border: 1.5px solid var(--grey-200);
  color: var(--grey-600); border-radius: 10px; padding: 11px 24px;
  cursor: pointer; font-size: 14px; font-family: 'Inter',sans-serif;
  font-weight: 500; transition: all .2s;
}
.btn-back:hover { border-color: var(--grey-800); color: var(--black); }

.btn-next {
  background: var(--red);
  border: none; color: var(--white); border-radius: 10px; padding: 12px 28px;
  cursor: pointer; font-size: 15px; font-weight: 700; font-family: 'Inter',sans-serif;
  box-shadow: 0 4px 16px var(--red-glow); transition: all .25s;
}
.btn-next:hover { background: var(--red-lt); transform: translateY(-2px); box-shadow: 0 8px 24px var(--red-glow); }

.btn-submit {
  background: var(--green);
  border: none; color: var(--white); border-radius: 10px; padding: 13px 32px;
  cursor: pointer; font-size: 15px; font-weight: 700; font-family: 'Inter',sans-serif;
  box-shadow: 0 4px 16px rgba(39,174,96,.28); transition: all .25s;
  display: flex; align-items: center; gap: 10px;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(39,174,96,.36); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Spinner */
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--black);
  border-top: 3px solid var(--red);
  padding: 36px 24px;
  margin-top: 48px;
}
.footer-inner {
  max-width: 940px; margin: auto;
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between;
  font-size: 13px;
}
.footer-inner > div:first-child { color: var(--grey-200); }
.footer-logo {
  height: 48px;
  width: auto;
  margin-bottom: 10px;
}
.footer-inner strong { color: var(--white); font-family: 'Baskervville', serif; font-size: 18px; font-weight: 400; }
.footer-contacts { display: flex; flex-direction: column; gap: 6px; color: var(--grey-400); }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---- Tablet: 768px and below ---- */
@media (max-width: 768px) {

  /* Header */
  .header-inner { padding: 0 16px; gap: 10px; }
  .logo strong  { font-size: 13px; }
  .logo small   { display: none; }
  .header-badge { font-size: 10px; padding: 4px 10px; white-space: nowrap; }

  /* Hero */
  .hero { padding: 44px 18px 40px; }
  .hero p { font-size: 14px; margin-bottom: 30px; }
  .step-labels { gap: 4px; }
  .step-label  { font-size: 10px; min-width: 60px; }

  /* Form container */
  .form-container { padding: 24px 16px 60px; }

  /* Form card */
  .form-step { padding: 28px 24px; border-radius: 14px; }

  /* Step header */
  .step-header { gap: 14px; margin-bottom: 24px; padding-bottom: 18px; }
  .step-number  { min-width: 42px; height: 42px; font-size: 15px; border-radius: 10px; }
  .step-header h2 { font-size: 17px; }
  .step-header p  { font-size: 12px; }

  /* Field grid: 2-col stays on tablet */
  .field-grid { gap: 16px; }

  /* Signatory row: stack to 2 cols */
  .sig-row { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
  .sig-row > div:last-of-type { grid-column: 1/-1; }

  /* Navigation buttons */
  .step-nav { gap: 12px; }
  .btn-back, .btn-next, .btn-submit {
    font-size: 14px; padding: 11px 20px;
  }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 18px; text-align: center; }
  .footer-contacts { align-items: center; }
}

/* ---- Mobile: 480px and below ---- */
@media (max-width: 480px) {

  /* Header — compact */
  .site-header { padding: 10px 0; }
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .header-badge { width: 100%; text-align: center; }

  /* Hero */
  .hero { padding: 32px 16px 32px; }
  .hero h1 { font-size: 22px; letter-spacing: -.3px; }
  .hero p  { font-size: 13px; margin-bottom: 24px; }

  /* Step labels — hide text, show dots */
  .step-labels { justify-content: center; gap: 8px; }
  .step-label  {
    flex: unset; width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,.2); font-size: 0;
    transition: background .3s, transform .3s;
  }
  .step-label.active {
    background: var(--red-lt); transform: scale(1.35); font-size: 0;
  }

  /* Form card */
  .form-step { padding: 20px 16px; border-radius: 12px; }

  /* Step header — stack vertically if very small */
  .step-header { flex-direction: column; gap: 10px; align-items: flex-start; }
  .step-number  { min-width: 38px; height: 38px; font-size: 13px; }
  .step-header h2 { font-size: 16px; }

  /* All fields: full width single column */
  .field-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .field.full { grid-column: 1; }

  /* Inputs — larger touch targets */
  input, select, textarea { padding: 13px 14px; font-size: 15px; border-radius: 9px; }

  /* Signatory row — fully stacked */
  .sig-row {
    grid-template-columns: 1fr !important;
    gap: 10px; padding: 14px 12px;
  }
  .btn-remove { width: 100%; text-align: center; padding: 10px; }

  /* Class guide pills — wrap */
  .class-guide { gap: 8px; }
  .class-pill  { font-size: 11px; padding: 4px 12px; }

  /* Indemnity text */
  .indemnity-text { padding: 16px; font-size: 13px; }

  /* Declaration items */
  .decl-item { padding: 12px 14px; font-size: 13px; }

  /* Document list */
  .doc-item { padding: 12px 14px; font-size: 13px; }

  /* Navigation — stack on very small screens */
  .step-nav {
    flex-direction: column-reverse; gap: 10px;
    padding-top: 20px; margin-top: 24px;
  }
  .btn-back, .btn-next, .btn-submit {
    width: 100%; text-align: center; justify-content: center;
    padding: 14px; font-size: 15px;
  }

  /* Footer */
  .site-footer { padding: 24px 16px; }
  .footer-inner { font-size: 12px; }
}

/* ---- Very small phones: 360px and below ---- */
@media (max-width: 360px) {
  .hero h1 { font-size: 19px; }
  .form-step { padding: 16px 12px; }
  .logo-mark { width: 36px; height: 36px; font-size: 13px; }
  input, select, textarea { font-size: 14px; padding: 11px 12px; }
}

/* ---- Large screens: ensure max-width centering ---- */
@media (min-width: 1200px) {
  .form-container { padding: 48px 0 100px; }
  .form-step { padding: 48px 56px; }
}

/* ---- Error Feedback ---- */
input.error, select.error, textarea.error {
  border-color: var(--red) !important;
  background-color: var(--red-bg) !important;
  box-shadow: 0 0 0 4px var(--red-glow) !important;
}
.error-msg {
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
  display: none;
  animation: fadeIn 0.3s ease;
}
input.error + .error-msg, select.error + .error-msg, textarea.error + .error-msg {
  display: block;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
