/* Greycoat Research — Expo lead forms
   Design: clinical calm. Deep slate + a single restrained "vital" teal accent,
   warm paper background, generous tap targets for booth/mobile use. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper:      #f6f4ef;
  --card:       #ffffff;
  --ink:        #1c2530;
  --ink-soft:   #5a6675;
  --line:       #e3ded4;
  --line-strong:#c9c2b4;
  --teal:       #0f766e;
  --teal-soft:  #d7eae7;
  --teal-ink:   #0a4f49;
  --danger:     #b4452f;
  --radius:     14px;
  --tap:        52px;          /* min interactive height */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;             /* prevents iOS zoom-on-focus */
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

/* ---- header / brand ---- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.brand .mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--teal);
  color: #fff;
  display: grid; place-items: center;
  font-family: 'Fraunces', serif;
  font-weight: 600; font-size: 19px;
}
.brand .name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .2px;
}
.brand .name span { color: var(--ink-soft); font-weight: 400; }

/* ---- segmented toggle (B2C / B2B) ---- */
.toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ece7dd;
  border-radius: 11px;
  padding: 4px;
  margin-bottom: 22px;
}
.toggle a {
  text-align: center;
  padding: 11px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2px;
  transition: background .15s, color .15s;
}
.toggle a.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.toggle a small { display: block; font-weight: 400; font-size: 11px; opacity: .7; margin-top: 1px; }

/* ---- intro ---- */
.intro h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 6px;
}
.intro p {
  margin: 0 0 26px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

/* ---- fields ---- */
.field { margin-bottom: 20px; }
.field > label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}
.field .req { color: var(--teal); margin-left: 2px; }
.hint { display:block; font-weight:400; color: var(--ink-soft); font-size: 12.5px; margin-top: 4px; }

input[type=text],
input[type=email],
input[type=tel],
select {
  width: 100%;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  appearance: none;
}
select {
  padding: 0 40px 0 14px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6675' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
input.invalid, select.invalid { border-color: var(--danger); }

/* ---- combobox (searchable country select) ---- */
.combobox { position: relative; }
.combobox-trigger {
  width: 100%;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.combobox-trigger:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.combobox.invalid .combobox-trigger { border-color: var(--danger); }
.combobox-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combobox-value.is-placeholder { color: var(--ink-soft); }
.combobox-caret { flex: none; color: var(--ink-soft); }

.combobox-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(28,37,48,.16);
  overflow: hidden;
}
.combobox-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.combobox-search svg { flex: none; }
.combobox-search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0;
  border: none;
  background: none;
  outline: none;
  font: inherit;
  color: var(--ink);
}
.combobox-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 252px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.combobox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 15px;
}
.combobox-option > span { flex: 1; }
.combobox-option.is-active { background: var(--teal-soft); }
.combobox-check { flex: none; color: var(--teal); opacity: 0; }
.combobox-option.is-selected .combobox-check { opacity: 1; }
.combobox-empty { padding: 16px 14px; text-align: center; color: var(--ink-soft); font-size: 14px; }

/* ---- radio / checkbox cards ---- */
.options { display: grid; gap: 8px; }
.options.cols2 { grid-template-columns: 1fr 1fr; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font-size: 15px;
  transition: border-color .12s, background .12s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .box {
  flex: none;
  width: 21px; height: 21px;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  transition: border-color .12s, background .12s;
}
.opt .box.radio { border-radius: 50%; }
.opt .box.check { border-radius: 6px; }
.opt .box svg { opacity: 0; transition: opacity .12s; }
.opt:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.opt:has(input:checked) .box { border-color: var(--teal); background: var(--teal); }
.opt:has(input:checked) .box svg { opacity: 1; }
.opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--teal-soft); }

/* "Others (...)" inline input */
.opt-other { display: grid; gap: 8px; }
.options.cols2 .opt-other { grid-column: 1 / -1; }
.opt-other input[type=text] { min-height: 44px; }

/* ---- intl-tel-input sizing ---- */
.iti { width: 100%; }
.iti__tel-input, .iti input[type=tel] { min-height: var(--tap); }

/* ---- submit ---- */
.submit {
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .2px;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .05s;
}
.submit:hover { background: var(--teal-ink); }
.submit:active { transform: scale(.99); }
.submit:disabled { opacity: .55; cursor: progress; }

/* ---- status / success ---- */
.status { margin-top: 14px; font-size: 14px; text-align: center; min-height: 20px; }
.status.err { color: var(--danger); }

.success {
  text-align: center;
  padding: 48px 24px;
}
.success .tick {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid; place-items: center;
}
.success h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 8px;
}
.success p { color: var(--ink-soft); margin: 0 0 22px; }
.success button {
  background: none;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 22px;
  font: inherit; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
