:root {
  color-scheme: light;
  --navy: #101e28;
  --blue: #1b2c36;
  --cream: #f7f5ef;
  --paper: #fffdf8;
  --ink: #17242b;
  --muted: #4e5758;
  --brass: #cba973;
  --brass-dark: #76572b;
  --line: #928a7b;
  --focus: #8a5c25;
  --error: #922d30;
  --display: Georgia, 'Songti SC', 'Songti TC', 'Noto Serif CJK SC', 'Noto Serif CJK TC', serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --inset: clamp(1rem, 5vw, 2.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(140deg, #e9e4d8, var(--cream) 54%, #efebe2) fixed;
  font: 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: #66491f;
  text-decoration-color: #9d7a4d;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

a:hover { color: var(--navy); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; }
h1, h2, p { margin: 0; }
a, button, input, textarea, select { scroll-margin-block: 1rem; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.intake-shell {
  width: min(47rem, calc(100% - 2rem));
  margin: clamp(.85rem, 4vw, 3rem) auto;
  overflow: clip;
  border: 1px solid #d9d0bf;
  border-radius: .65rem;
  background: var(--cream);
  box-shadow: 0 .7rem 2.8rem #101e281a;
}

.intake-header {
  position: relative;
  padding: clamp(1.2rem, 5vw, 2.65rem) var(--inset);
  color: var(--paper);
  background: linear-gradient(115deg, var(--navy), var(--blue));
  border-bottom: 1px solid var(--brass);
}

.intake-header h1, .intake-title {
  margin: .25rem 0 0;
  color: var(--paper);
  font: 500 clamp(2.05rem, 7vw, 3.4rem)/1.12 var(--display);
  letter-spacing: -.048em;
  text-wrap: balance;
}

.intake-header a, .intake-header a:hover { color: inherit; }
.intake-header :focus-visible { outline-color: #edc882; }

.intake-logo {
  display: block;
  width: auto;
  max-width: 8rem;
  height: auto;
  margin-bottom: .65rem;
}

.intake-logo img { display: block; width: 100%; height: auto; }

.intake-eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #e6c897;
  font-size: .8125rem;
  font-weight: 690;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.intake-eyebrow::before {
  width: 1.5rem;
  height: 1px;
  flex: 0 0 auto;
  content: '';
  background: currentColor;
}

.intake-header .intake-intro {
  max-width: 53ch;
  margin-top: .5rem;
  color: #ece5d9;
}

.intake-call { margin-top: .42rem; color: #ece5d9; font-size: .9375rem; }
.intake-call a { font-weight: 650; white-space: nowrap; }

.language-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.language-switch a, .language-switch button {
  display: inline-flex;
  min-height: 2.625rem;
  align-items: center;
  justify-content: center;
  padding: .35rem .68rem;
  border: 1px solid var(--line);
  border-radius: .22rem;
  color: var(--ink);
  background: var(--paper);
  font-size: .875rem;
  font-weight: 620;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.language-switch a:hover, .language-switch button:hover { border-color: var(--brass-dark); background: #efe6d6; }

.language-switch [aria-current],
.language-switch [aria-pressed='true'],
.language-switch .is-active {
  border-color: var(--navy);
  color: var(--paper);
  background: var(--navy);
}

.language-switch [aria-current]:hover,
.language-switch [aria-pressed='true']:hover,
.language-switch .is-active:hover { color: var(--paper); background: var(--blue); }

.intake-header .language-switch { margin-top: 1rem; }
.intake-shell > .language-switch { padding: .7rem var(--inset) 0; }

.intake-header .language-switch a,
.intake-header .language-switch button {
  border-color: #e8d3ac7d;
  color: var(--paper);
  background: transparent;
}

.intake-header .language-switch a:hover,
.intake-header .language-switch button:hover {
  border-color: var(--brass);
  color: var(--paper);
  background: #ffffff15;
}

.intake-header .language-switch [aria-current],
.intake-header .language-switch [aria-pressed='true'],
.intake-header .language-switch .is-active {
  border-color: var(--brass);
  color: var(--navy);
  background: var(--brass);
}

.intake-form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1rem, 4vw, 2.1rem) var(--inset) clamp(1.2rem, 4vw, 2.3rem);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: .95rem 1rem;
}

.form-section { display: grid; min-width: 0; gap: .67rem; }
.form-section + .form-section { padding-top: .9rem; border-top: 1px solid #d9d0bf; }
.form-section h2 { font: 500 clamp(1.25rem, 3vw, 1.55rem)/1.3 var(--display); }

.field {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: .32rem;
  margin: 0;
}

.field-full { grid-column: 1 / -1; }

label, legend {
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 680;
  line-height: 1.45;
}

fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { margin-bottom: .35rem; }
.hint, .optional { color: var(--muted); font-size: .875rem; font-weight: 400; }

input:not([type='checkbox'], [type='radio'], [type='hidden'], [type='submit']),
textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: .57rem .72rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  color: var(--ink);
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.45;
  transition: border-color .16s ease, box-shadow .16s ease;
}

textarea { min-height: 6.5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #676a66; opacity: 1; }
input[type='date'] { min-width: 0; }

input:not([type='checkbox'], [type='radio']):focus,
textarea:focus, select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}

.field-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  min-width: 0;
}

.field-check { font-weight: 550; cursor: pointer; }

input[type='checkbox'], input[type='radio'] {
  width: 1.125rem;
  height: 1.125rem;
  margin: .12rem 0 0;
  accent-color: var(--brass-dark);
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
}

.form-actions button[type='submit'], .submit-button, form input[type='submit'] {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.25rem;
  border: 1px solid var(--brass);
  border-radius: .24rem;
  color: var(--navy);
  background: var(--brass);
  font-weight: 710;
  line-height: 1.35;
  text-align: center;
  transition: background-color .16s ease, border-color .16s ease;
}

.form-actions button[type='submit']:hover:not(:disabled), .submit-button:hover:not(:disabled),
form input[type='submit']:hover:not(:disabled) {
  border-color: #a47a42;
  background: #dfbe88;
}

.form-actions button[type='submit']:disabled, .submit-button:disabled { opacity: .66; }

.embedded body {
  --inset: clamp(.9rem, 3.2vw, 1.65rem);
  background: var(--cream);
}

.embedded .intake-shell {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.embedded .intake-header { padding-block: .9rem 1rem; }
.embedded .intake-header h1 { font-size: clamp(1.65rem, 5vw, 2.35rem); }
.embedded .intake-logo { max-width: 5.75rem; margin-bottom: .4rem; }
.embedded .intake-header .language-switch { margin-top: .6rem; }
.embedded .intake-form { padding-block: .9rem 1.25rem; }

:lang(zh-Hans) .intake-header h1, :lang(zh-Hant) .intake-header h1 {
  font-size: clamp(1.7rem, 5.5vw, 2.75rem);
  letter-spacing: .015em;
}

@media (max-width: 480px) {
  .intake-shell { width: calc(100% - 1rem); margin-block: .5rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .intake-form { gap: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.brand-filters { position: absolute; }
.intake-logo { filter: url("#westgate-logo-on-dark"); }
