/* Fraser Support Portal
   One stylesheet, no build step. Palette is derived from the Fraser wordmark
   navy (#16167e); neutrals are tinted toward the same hue so nothing reads dead
   grey next to it. */

@font-face {
  font-family: "Inter";
  src: url("/assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand */
  --brand:        #16167e;  /* the wordmark navy */
  --brand-hover:  #22229a;
  --brand-press:  #0e0e55;
  --brand-tint:   #f0f0fa;
  --brand-line:   #cdcdec;

  /* ink — cooled toward the brand hue */
  --ink:    #16161f;  /* 17:1 on white */
  --ink-2:  #3d3d4d;  /* 9.9:1 */
  --ink-3:  #62627a;  /* 6.0:1 — the floor for muted text */

  /* surfaces */
  --page:   #f4f4f8;
  --card:   #ffffff;
  --line:   #e4e4ee;  /* decorative hairline */
  --field:  #8e8ea6;  /* control boundary, 3.2:1 on white */

  /* status */
  --danger:      #b3261e;
  --danger-ink:  #7a1a15;
  --danger-bg:   #fdf1f0;
  --danger-line: #f0c4c0;
  --good:        #1e6b3a;

  --shadow-1: 0 1px 2px rgba(16, 16, 60, .05), 0 8px 24px -14px rgba(16, 16, 60, .22);
  --shadow-2: 0 1px 2px rgba(14, 14, 85, .30), 0 8px 20px -8px rgba(14, 14, 85, .40);

  --radius:   10px;
  --radius-s: 8px;
  --shell:    768px;

  /* one easing for the whole page: exponential ease-out */
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
  accent-color: var(--brand);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  background-image: radial-gradient(1100px 420px at 50% -160px, rgba(22, 22, 126, .07), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 16px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis-weight: none;
  caret-color: var(--brand);
  scrollbar-color: #b6b6c9 transparent;
  scrollbar-width: thin;
}

::selection { background: #d6d6f4; color: var(--brand-press); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb {
  background: #b6b6c9;
  border-radius: 6px;
  border: 3px solid var(--page);
}
::-webkit-scrollbar-thumb:hover { background: #9a9ab2; }
::-webkit-scrollbar-track { background: transparent; }

a {
  color: var(--brand);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

svg { flex: none; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  border-radius: 4px;
  line-height: 0;
}

.brand img { width: 108px; height: 28px; display: block; }

.account {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
  text-align: right;
  text-wrap: balance;
}

.account strong { font-weight: 600; color: var(--ink-2); }

/* ---------- page ---------- */

main {
  flex: 1;
  padding-block: clamp(32px, 6vw, 60px) clamp(48px, 8vw, 76px);
}

/* the required-fields note is stale once the submission is confirmed */
main:has(#done:not([hidden])) .lede { display: none; }

h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 clamp(24px, 4vw, 34px);
  max-width: 62ch;
  font-size: 17px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 9px 12px 9px 8px;
  margin-left: -8px;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}

.back svg { transition: transform .22s var(--ease); }
.back:hover { background: var(--brand-tint); }
.back:hover svg { transform: translateX(-2px); }

/* ---------- panels ---------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: clamp(20px, 4vw, 36px);
}

.panel--list { padding: 0; overflow: hidden; }

/* ---------- landing choices ---------- */

.choice {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px clamp(18px, 3.5vw, 28px);
  color: inherit;
  text-decoration: none;
  transition: background-color .18s var(--ease);
}

.choice + .choice { border-top: 1px solid var(--line); }

.choice__text { display: block; min-width: 0; }

.choice__title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--ink);
  transition: color .18s var(--ease);
}

.choice__desc {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
  text-wrap: pretty;
}

.choice__go {
  margin-left: auto;
  color: var(--field);
  transition: transform .22s var(--ease), color .18s var(--ease);
}

.choice:hover { background: var(--brand-tint); }
.choice:hover .choice__title { color: var(--brand); }
.choice:hover .choice__go { color: var(--brand); transform: translateX(4px); }
.choice:active { background: #e7e7f6; }

.choice:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  border-radius: 2px;
  background: var(--brand-tint);
}

/* ---------- form structure ---------- */

.section + .section { margin-top: 38px; }

.section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section__body { display: grid; gap: 18px; }

.row { display: grid; gap: 18px; }

@media (min-width: 560px) {
  .row--2 { grid-template-columns: 1fr 1fr; }
  .row--3 { grid-template-columns: 1fr 1fr 1fr; }
  .row--address { grid-template-columns: 2fr 1.3fr 1fr; }
}

.field { display: grid; gap: 7px; min-width: 0; }

label, legend {
  padding: 0;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  color: var(--ink);
}

.req {
  color: var(--danger);
  font-weight: 600;
}

.hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink-3);
}

/* ---------- controls ---------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--field);
  border-radius: var(--radius-s);
  box-shadow: 0 1px 1px rgba(16, 16, 60, .03) inset;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

input[type="number"] { font-variant-numeric: tabular-nums; }

::placeholder { color: var(--ink-3); opacity: 1; }

textarea {
  min-height: 124px;
  line-height: 1.6;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2362627a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

input:hover,
select:hover,
textarea:hover { border-color: var(--ink-3); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 22, 126, .16);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid { border-color: var(--danger); }

input:user-invalid:focus-visible,
select:user-invalid:focus-visible,
textarea:user-invalid:focus-visible {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .16);
}

/* ---------- checkbox grid ---------- */

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 12px;
}

.checks {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}

.checks label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease);
}

.checks input {
  width: 19px;
  height: 19px;
  margin: 0;
  flex: none;
  cursor: pointer;
}

.checks label:hover { border-color: var(--field); background: #fafaff; }

.checks label:has(:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 550;
}

.checks label:has(:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.checks input:focus-visible { outline: none; }

/* honeypot: out of view and out of the tab order */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- actions ---------- */

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px calc(-1 * clamp(20px, 4vw, 36px)) calc(-1 * clamp(20px, 4vw, 36px));
  padding: 26px clamp(20px, 4vw, 36px) clamp(20px, 4vw, 36px);
  border-top: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.005em;
  color: #fff;
  background: var(--brand);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-2);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(14, 14, 85, .30), 0 12px 26px -10px rgba(14, 14, 85, .48);
}

.btn:active {
  background: var(--brand-press);
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(14, 14, 85, .34);
}

.btn[disabled] {
  background: #6f6f92;
  box-shadow: none;
  transform: none;
  cursor: default;
}

.btn.is-loading::before {
  content: "";
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(1turn); } }

.btn--ghost {
  color: var(--brand);
  background: var(--card);
  border-color: var(--field);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--brand-tint);
  border-color: var(--brand);
  box-shadow: none;
  transform: none;
}

.btn--ghost:active { background: #e7e7f6; }

@media (max-width: 559px) {
  .actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* ---------- banner ---------- */

.banner {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 15px 18px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius);
  color: var(--danger-ink);
  animation: banner-in .32s var(--ease) both;
}

.banner[hidden] { display: none; }
.banner__icon { color: var(--danger); margin-top: 2px; }
.banner a { color: inherit; font-weight: 600; white-space: nowrap; }
.banner:focus-visible { outline-offset: 2px; }

@keyframes banner-in {
  from { opacity: 0; transform: translateY(-6px); }
}

/* ---------- confirmation ---------- */

.done { text-align: center; animation: rise .55s var(--ease) both; }
.done[hidden] { display: none; }

.done__mark {
  display: block;
  margin: 4px auto 20px;
  color: var(--good);
}

.done__mark circle {
  fill: #eaf4ee;
  stroke: currentColor;
  stroke-width: 1.5;
}

.done__mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  animation: draw .55s .22s var(--ease) forwards;
}

.done h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.done__lead { margin: 0 0 14px; color: var(--ink-2); }

.ref {
  display: inline-block;
  margin: 0;
  padding: 11px 20px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-s);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
  color: var(--brand);
}

.done__note {
  margin: 14px 0 26px;
  font-size: 15px;
  color: var(--ink-3);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
}

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- footer ---------- */

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 26px;
  padding-bottom: 26px;
  font-size: 14px;
  color: var(--ink-3);
}

.site-footer p { margin: 0; }
.site-footer__lead { color: var(--ink-2); font-weight: 550; }

.callus {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-tint);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}

.callus:hover { background: #e4e4f6; border-color: var(--brand); }

.site-footer__hours { margin-left: auto; }

@media (max-width: 559px) {
  .site-footer__inner { flex-direction: column; align-items: center; text-align: center; }
  .site-footer__hours { margin-left: 0; }
}

/* ---------- motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .done__mark path { stroke-dashoffset: 0; }
}
