/* ============================================================
   GRIFFIN CAPITAL GROUP — Digital Onboarding
   Design tokens
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

@font-face{
  font-family: 'Century Gothic';
  src: url('Century Gothic/centurygothic.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: 'Century Gothic';
  src: url('Century Gothic/centurygothic_bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root{
  /* Griffin Capital Group brand palette */
  --ink:        #232323;
  --forest:     #BD4D02;   /* brand primary — deep orange */
  --forest-dk:  #843601;   /* deep orange, shaded */
  --forest-lt:  #FF9933;   /* brand secondary — light orange */
  --gold:       #F26836;   /* brand primary — vivid orange */
  --gold-lt:    #FF9933;   /* brand secondary — light orange */
  --grey:       #727376;   /* brand primary — grey */
  --grey-lt:    #E6E6E6;   /* brand secondary — light grey */
  --paper:      #FFF1E8;   /* brand secondary — light peach */
  --paper-dk:   #E6E6E6;   /* brand secondary — light grey */
  --line:       #D4D4D4;
  --ok:         #2E7D5B;
  --err:        #B23B3B;
  --white:      #FFFFFF;

  --font-display: 'Century Gothic', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(189,77,2,0.06), 0 8px 24px rgba(189,77,2,0.06);
  --shadow-pop: 0 12px 40px rgba(189,77,2,0.16);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  /* background:var(--paper); */
  background: #fafafa;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--font-display); margin:0; color:var(--forest-dk);}
p{margin:0 0 .5rem;}
a{color:var(--forest);}
button{font-family:inherit;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important; transition-duration:.001ms !important;}
}

/* ============ Layout shell ============ */
.app-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* ============ Header ============ */
.site-header{
  /* background:linear-gradient(180deg, var(--forest-dk) 0%, #431B00 100%); */
  background: linear-gradient(180deg, #fafafa 0%, #fafafa 100%);
  color:var(--paper);
  padding:1.1rem 1.75rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:3px solid var(--gold);
}
.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
}
.brand-mark{
  height:40px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.brand-mark img{
  height:100%;width:auto;
  object-fit:contain;
}
.brand-text .brand-sub{
  font-family:var(--font-mono);
  font-size:.68rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  /* color:var(--gold-lt); */
  color: #f26836;
}
.header-meta{
  font-family:var(--font-mono);
  font-size:.72rem;
  color:var(--gold-lt);
  text-align:right;
  line-height:1.5;
  display:none;
}
@media (min-width:640px){ .header-meta{display:block;} }

/* ============ Offline alternative banner ============ */
.offline-banner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1.25rem;
  flex-wrap:wrap;
  /* background:var(--paper-dk); */
  background: #fafafa;
  border-bottom:1px solid var(--line);
  padding:.85rem 1.75rem;
  text-align:center;
}
.ob-copy{
  font-size:.85rem;
  color:var(--ink);
  max-width:640px;
}
.ob-copy strong{ font-weight:600; }
.ob-copy a{ color:var(--forest); font-weight:600; }
.ob-copy a:hover{ color:var(--forest-lt); }
.ob-btn{
  padding:.55rem 1.1rem;
  font-size:.82rem;
  white-space:nowrap;
  flex-shrink:0;
}

/* ============ Shell body: rail + main ============ */
.wizard-shell{
  flex:1;
  display:grid;
  grid-template-columns:260px 1fr;
  max-width:1180px;
  width:100%;
  margin:0 auto;
  padding:2rem 1.5rem 4rem;
  gap:2.25rem;
}
@media (max-width:900px){
  .wizard-shell{grid-template-columns:1fr; padding:1.25rem 1rem 3rem;}
}

/* ============ Step rail (desktop) ============ */
.step-rail{
  position:sticky; top:1.5rem;
  align-self:start;
  display:flex;
  flex-direction:column;
  gap:0;
}
@media (max-width:900px){ .step-rail{display:none;} }

.rail-item{
  display:flex;
  gap:.75rem;
  padding:.65rem 0;
  position:relative;
}
.rail-item:not(:last-child)::after{
  content:'';
  position:absolute;
  left:15px; top:36px; bottom:-10px;
  width:1px;
  background:var(--line);
}
.rail-item.is-done:not(:last-child)::after{ background:var(--gold); }

.rail-stamp{
  width:32px;height:32px;
  border-radius:50%;
  border:1.5px solid var(--line);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-mono);
  font-size:.72rem;
  color:var(--grey);
  background:var(--paper);
  flex-shrink:0;
  transition:all .25s ease;
}
.rail-item.is-active .rail-stamp{
  border-color:var(--forest);
  color:var(--forest);
  background:var(--white);
  box-shadow:0 0 0 3px rgba(189,77,2,0.08);
}
.rail-item.is-done .rail-stamp{
  border-color:var(--forest);
  background:var(--forest);
  color:var(--white);
}
.rail-label{
  padding-top:.35rem;
  font-size:.83rem;
  color:var(--grey);
  font-weight:500;
}
.rail-item.is-active .rail-label{ color:var(--forest-dk); font-weight:600; }
.rail-item.is-done .rail-label{ color:var(--ink); }

/* ============ Mobile progress bar ============ */
.mobile-progress{
  display:none;
  margin-bottom:1.5rem;
}
@media (max-width:900px){ .mobile-progress{display:block;} }
.mobile-progress .track{
  height:6px;
  background:var(--paper-dk);
  border-radius:99px;
  overflow:hidden;
}
.mobile-progress .fill{
  height:100%;
  background:linear-gradient(90deg, var(--forest), var(--gold));
  border-radius:99px;
  transition:width .35s ease;
}
.mobile-progress .caption{
  margin-top:.5rem;
  font-family:var(--font-mono);
  font-size:.72rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--grey);
}
.mobile-progress .caption strong{ color:var(--forest-dk); }

/* ============ Card / step panel ============ */
.panel{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-card);
  padding:2rem;
  animation:panelIn .35s ease;
}
@media (max-width:640px){ .panel{padding:1.25rem;} }

@keyframes panelIn{
  from{opacity:0; transform:translateY(8px);}
  to{opacity:1; transform:translateY(0);}
}

.panel-eyebrow{
  font-family:var(--font-mono);
  font-size:.7rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--forest);
  margin-bottom:.4rem;
  display:block;
}
.panel-title{ font-size:1.5rem; margin-bottom:.35rem; }
.panel-desc{ color:var(--grey); font-size:.92rem; margin-bottom:1.75rem; }

/* ============ Form elements: floating labels ============ */
.field{
  position:relative;
  margin-bottom:1.3rem;
}
.field input,
.field select,
.field textarea{
  width:100%;
  padding:1.05rem .9rem .5rem;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  font-size:.95rem;
  font-family:var(--font-body);
  background:var(--white);
  color:var(--ink);
  transition:border-color .15s ease, box-shadow .15s ease;
  box-sizing:border-box;
}
.field select{
  /* Safari renders <select> with native OS chrome (appearance:menulist) that ignores
     author padding, so the box height drifts from sibling text inputs even with identical
     CSS. Stripping the native appearance forces Safari to box it like a normal element;
     the custom arrow below replaces the one that removal takes away. */
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23727376'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3e%3c/svg%3e");
  background-repeat:no-repeat;
  background-position:right .9rem center;
  background-size:14px;
  padding-right:2.2rem;
}
.field textarea{ resize:vertical; min-height:5rem; padding-top:1.2rem; }
.field input:focus,
.field select:focus,
.field textarea:focus{
  outline:none;
  border-color:var(--forest);
  box-shadow:0 0 0 3px rgba(189,77,2,0.10);
}
.field label{
  position:absolute;
  left:.9rem; top:.95rem;
  font-size:.95rem;
  color:var(--grey);
  pointer-events:none;
  transition:all .15s ease;
  background:transparent;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.has-value + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label{
  top:.35rem;
  font-size:.68rem;
  letter-spacing:.03em;
  color:var(--forest);
  font-weight:600;
}
.field .req{ color:var(--err); margin-left:.15rem; }
.field .hint{ font-size:.75rem; color:var(--grey); margin-top:.3rem; }
.field .error-msg{
  font-size:.76rem; color:var(--err); margin-top:.35rem; display:none;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea{ border-color:var(--err); }
.field.has-error .error-msg{ display:block; }

.field-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
}
@media (max-width:560px){ .field-row{grid-template-columns:1fr;} }

.section-divider{
  border:none;
  border-top:1px dashed var(--line);
  margin:1.75rem 0;
}
.section-label{
  font-family:var(--font-mono);
  font-size:.7rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--forest);
  margin-bottom:.9rem;
  display:flex;
  align-items:center;
  gap:.6rem;
}
.section-label::after{
  content:'';
  flex:1;
  height:1px;
  background:var(--line);
}

/* ============ Choice cards (customer type / business selection) ============ */
.choice-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:1rem;
  margin-bottom:.5rem;
}
.choice-grid.cols-3{ grid-template-columns:repeat(3,1fr); }
@media (max-width:640px){ .choice-grid, .choice-grid.cols-3{grid-template-columns:1fr 1fr;} }
.choice-grid + .section-label{ margin-top:1.5rem; }

.choice-card{
  position:relative;
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  padding:1.1rem 1rem;
  cursor:pointer;
  background:var(--white);
  transition:border-color .15s ease, background .15s ease, transform .1s ease;
}
.choice-card:hover{ border-color:var(--gold-lt); transform:translateY(-1px); }
.choice-card input{ position:absolute; opacity:0; }
.choice-card .cc-icon{ font-size:1.4rem; margin-bottom:.5rem; display:block; }
.choice-card .cc-title{ font-weight:600; font-size:.92rem; color:var(--forest-dk); }
.choice-card .cc-sub{ font-size:.76rem; color:var(--grey); margin-top:.15rem; }
.choice-card.is-checked{
  border-color:var(--forest);
  background:var(--paper);
  box-shadow:0 0 0 3px rgba(189,77,2,0.08);
}
.choice-card.is-checked .cc-title{ color:var(--forest); }
.choice-card .cc-check{
  position:absolute; top:.7rem; right:.7rem;
  width:18px;height:18px;
  border-radius:50%;
  border:1.5px solid var(--line);
  background:var(--white);
}
.choice-card.is-checked .cc-check{
  border-color:var(--forest);
  background:var(--forest);
}
.choice-card.is-checked .cc-check::after{
  content:'✓';
  color:var(--white);
  font-size:.65rem;
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%;
}

/* ============ Upload dropzones ============ */
.upload-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1.1rem;
}
@media (max-width:640px){ .upload-grid{grid-template-columns:1fr;} }

.dropzone{
  border:1.5px dashed var(--line);
  border-radius:var(--radius);
  background:var(--paper);
  padding:1.5rem 1rem;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
  position:relative;
}
.dropzone:hover, .dropzone.is-drag{
  border-color:var(--forest);
  background:var(--paper);
}
.dropzone input[type=file]{
  position:absolute; inset:0; opacity:0; cursor:pointer;
}
.dropzone .dz-icon{ font-size:1.6rem; }
.dropzone .dz-title{ font-weight:600; font-size:.88rem; margin-top:.4rem; color:var(--forest-dk); }
.dropzone .dz-sub{ font-size:.74rem; color:var(--grey); margin-top:.2rem; }
.dropzone .dz-preview{
  margin-top:.75rem;
  display:none;
  align-items:center;
  gap:.6rem;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:.5rem .6rem;
  text-align:left;
}
.dropzone.has-file .dz-preview{ display:flex; }
.dropzone.has-file .dz-icon,
.dropzone.has-file .dz-title,
.dropzone.has-file .dz-sub{ display:none; }
.dz-preview img{ width:36px;height:36px; object-fit:cover; border-radius:4px; flex-shrink:0; }
.dz-preview .dz-file-icon{
  width:36px;height:36px; border-radius:4px; background:var(--paper-dk);
  display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex-shrink:0;
}
.dz-preview .dz-file-name{ font-size:.8rem; font-weight:600; color:var(--forest-dk); word-break:break-all; }
.dz-preview .dz-file-size{ font-size:.7rem; color:var(--grey); }
.dz-remove{
  margin-left:auto; background:none; border:none; color:var(--err);
  font-size:.75rem; cursor:pointer; font-weight:600; flex-shrink:0;
}

/* ============ Buttons ============ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.8rem 1.5rem;
  border-radius:99px;
  font-size:.9rem;
  font-weight:600;
  border:1.5px solid transparent;
  cursor:pointer;
  transition:all .15s ease;
  font-family:var(--font-body);
}
.btn-primary{
  background:var(--forest);
  color:var(--white);
}
.btn-primary:hover{ background:var(--forest-lt); }
.btn-ghost{
  background:transparent;
  border-color:var(--line);
  color:var(--ink);
}
.btn-ghost:hover{ border-color:var(--forest); color:var(--forest); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }
.btn-block{ width:100%; }

.step-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:2rem;
  padding-top:1.5rem;
  border-top:1px solid var(--line);
}
.step-actions .spacer{ flex:1; }
.autosave-note{
  font-family:var(--font-mono);
  font-size:.68rem;
  color:var(--grey);
  display:flex;
  align-items:center;
  gap:.4rem;
}
.autosave-dot{
  width:6px;height:6px;border-radius:50%;background:var(--ok);
}

/* ============ Radio / checkbox rows ============ */
.check-row{
  display:flex; align-items:flex-start; gap:.65rem;
  padding:.6rem 0;
  cursor:pointer;
}
.check-row input{ margin-top:.2rem; accent-color:var(--forest); width:16px;height:16px; flex-shrink:0; }
.check-row .cr-title{ font-size:.9rem; font-weight:500; color:var(--ink); }
.check-row .cr-sub{ font-size:.78rem; color:var(--grey); }

/* ============ Signatory / UBO repeatable rows ============ */
.repeat-card{
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:1.1rem;
  margin-bottom:1rem;
  background:var(--paper);
  position:relative;
}
.repeat-card .rc-head{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:.9rem;
}
.repeat-card .rc-head .rc-tag{
  font-family:var(--font-mono);
  font-size:.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--forest);
}
.rc-remove{
  background:none; border:none; color:var(--err); font-size:.75rem; cursor:pointer; font-weight:600;
}
.btn-add{
  border:1.5px dashed var(--line);
  background:transparent;
  color:var(--forest);
  border-radius:var(--radius-sm);
  padding:.7rem;
  width:100%;
  font-size:.85rem;
  font-weight:600;
  cursor:pointer;
  margin-bottom: 2rem;
}
.btn-add:hover{ border-color:var(--forest); background:var(--paper); }

.form-note{ font-size:.78rem; color:var(--grey); line-height:1.5; margin:-.5rem 0 1.25rem; }

/* ============ Review screen ============ */
.review-block{
  margin-bottom:1.5rem;
}
.review-block .rb-head{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:.75rem;
}
.review-block .rb-title{
  font-family:var(--font-mono);
  font-size:.72rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--forest);
}
.rb-edit{
  font-size:.75rem; color:var(--forest); background:none; border:none; cursor:pointer; font-weight:600;
}
.review-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:.9rem 1.5rem;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:1rem 1.2rem;
}
@media (max-width:560px){ .review-grid{grid-template-columns:1fr;} }
.review-grid dt{ font-size:.72rem; color:var(--grey); text-transform:uppercase; letter-spacing:.04em; }
.review-grid dd{ margin:.15rem 0 0; font-size:.9rem; font-weight:500; color:var(--ink); }
.review-tags{ display:flex; flex-wrap:wrap; gap:.5rem; }
.review-tag{
  display:inline-flex; align-items:center; gap:.35rem;
  background:var(--paper); color:var(--forest);
  border:1px solid var(--line);
  border-radius:99px;
  padding:.35rem .8rem;
  font-size:.78rem;
  font-weight:600;
}
.review-tag.doc{ background:var(--paper-dk); color:var(--forest-dk); border-color:var(--line); }

.declaration-box{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:1rem;
  font-size:.82rem;
  color:var(--grey);
  max-height:160px;
  overflow-y:auto;
  margin-bottom:1rem;
  line-height:1.6;
}

/* ============ Success screen ============ */
.success-wrap{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 50% 0%, var(--gold) 0%, var(--forest-dk) 60%);
  padding:2rem 1rem;
}
.success-card{
  background:var(--white);
  border-radius:16px;
  padding:3rem 2.5rem;
  max-width:460px; width:100%;
  text-align:center;
  box-shadow:var(--shadow-pop);
  animation:panelIn .4s ease;
}
.success-seal{
  width:76px;height:76px;
  margin:0 auto 1.5rem;
  border-radius:50%;
  border:2px solid var(--gold);
  display:flex;align-items:center;justify-content:center;
  position:relative;
  animation:sealPop .5s cubic-bezier(.26,1.4,.44,1);
}
@keyframes sealPop{
  0%{ transform:scale(.4) rotate(-20deg); opacity:0; }
  100%{ transform:scale(1) rotate(0); opacity:1; }
}
.success-seal::before{
  content:''; position:absolute; inset:6px; border:1px dashed var(--gold-lt); border-radius:50%;
}
.success-seal .tick{ color:var(--forest); font-size:1.8rem; }
.success-card h1{ font-size:1.5rem; margin-bottom:.5rem; }
.success-card .success-sub{ color:var(--grey); font-size:.9rem; margin-bottom:1.5rem; }
.ref-box{
  background:var(--paper);
  border:1px dashed var(--gold);
  border-radius:var(--radius-sm);
  padding:.9rem;
  font-family:var(--font-mono);
  font-size:1.05rem;
  letter-spacing:.05em;
  color:var(--forest-dk);
  margin-bottom:1.75rem;
}
.ref-box .ref-label{
  display:block; font-size:.65rem; letter-spacing:.1em; text-transform:uppercase; color:var(--grey); margin-bottom:.3rem;
}
.success-actions{ display:flex; flex-direction:column; gap:.7rem; }

/* ============ Toast (validation) ============ */
.toast{
  position:fixed; bottom:1.5rem; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--forest-dk); color:var(--white);
  padding:.75rem 1.2rem; border-radius:99px;
  font-size:.82rem; font-weight:500;
  box-shadow:var(--shadow-pop);
  display:flex; align-items:center; gap:.6rem;
  opacity:0; pointer-events:none;
  transition:all .25s ease;
  z-index:999;
}
.toast.is-visible{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast.is-error{ background:var(--err); }

/* ============ Footer ============ */
.site-footer{
  text-align:center;
  font-size:.72rem;
  color:var(--grey);
  padding:1.5rem;
  font-family:var(--font-mono);
}

/* ============ Legal / static content pages ============ */
.legal-page{
  flex:1;
  display:flex;
  justify-content:center;
  padding:2rem 1.5rem 4rem;
}
.legal-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-card);
  padding:2.5rem;
  max-width:760px;
  width:100%;
}
@media (max-width:640px){ .legal-card{padding:1.5rem;} }

.legal-toc{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.5rem 1.5rem;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:1.1rem 1.3rem;
  margin:1.5rem 0 2rem;
}
@media (max-width:560px){ .legal-toc{grid-template-columns:1fr;} }
.legal-toc a{
  font-size:.83rem;
  font-weight:500;
  color:var(--forest);
  text-decoration:none;
}
.legal-toc a:hover{ text-decoration:underline; }

.legal-card section{ margin-bottom:1.75rem; scroll-margin-top:1.5rem; }
.legal-card section:last-of-type{ margin-bottom:0; }
.legal-card h2{
  font-size:1.05rem;
  margin-bottom:.6rem;
}
.legal-card p{
  font-size:.9rem;
  color:var(--ink);
  line-height:1.65;
  margin-bottom:.5rem;
}
.legal-card ul{
  margin:0 0 .5rem;
  padding-left:1.2rem;
}
.legal-card li{
  font-size:.9rem;
  color:var(--ink);
  line-height:1.65;
  margin-bottom:.3rem;
}
.legal-card a{ color:var(--forest); font-weight:600; }
.legal-card a:hover{ color:var(--forest-lt); }

.legal-actions{
  margin-top:2rem;
  padding-top:1.5rem;
  border-top:1px solid var(--line);
}

.legal-actions a{ color:#fff; }
.legal-actions a:hover{ color:#fafafa; }

/* utility */
.hidden{ display:none !important; }
