/* intake.noahlot.com — the client intake form.
   Wears noahlot v2's light ground: cream paper, the brand blue as ink and as
   the action. No accent hue. A chosen tile reads by inversion, blue on cream,
   which is the same move the site's primary button makes. */

:root {
  --paper:   #F4F2EC;
  --ink:     #111111;
  --night:   #0B1030;   /* noahlot's brand blue taken down to a ground value */

  /* the cream ground, which is the whole form */
  --ground: var(--paper);
  --on: var(--ink);
  --panel: #FFFFFF;
  --rule: rgba(17, 17, 17, .16);         /* dividers only */
  --rule-strong: rgba(17, 17, 17, .55);  /* every interactive boundary */
  --action: var(--night);
  --on-action: var(--paper);
  --muted: rgba(17, 17, 17, .62);
  --bad: #A3231B;

  --t-xs: 13px;
  --t-s:  17px;
  --t-m:  22px;
  --t-l:  32px;
  --t-xl: 46px;

  --bar-h: 68px;
  --wrap: 980px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--on);
  font: 400 var(--t-s)/1.55 Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; }

h1, h2 { font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 14px; color: var(--night); }
h1 { font-size: clamp(30px, 5.2vw, var(--t-xl)); }
h2 { font-size: clamp(26px, 4.2vw, var(--t-l)); }

/* :visited only accepts explicitly declared colours, so `inherit` silently
   falls back to the browser's purple. Every link state is named. */
a, a:link, a:visited { color: var(--night); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--action); color: var(--on-action); padding: 12px 18px; font-weight: 800;
}
.skip:focus { left: 0; }

/* The honeypot. Off screen rather than display:none, because some bots skip
   fields they can tell are hidden. Without this it renders as a mystery empty
   box at the top of the form. */
#company_website {
  position: absolute; left: -9999px; top: 0;
  width: 1px; height: 1px; opacity: 0; border: 0; padding: 0;
}

/* Visible to a screen reader, not to the eye. */
.sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ── header + progress ─────────────────────────────────── */

.bar {
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(18px, 4vw, 40px);
  border-bottom: 1px solid var(--rule);
}
.mark {
  font-weight: 800; font-size: var(--t-m); text-decoration: none;
  letter-spacing: -.03em; color: var(--night);
}
.bar-note { margin: 0; font-size: var(--t-xs); color: var(--muted); }

.rail { height: 2px; background: var(--rule); }
.rail i {
  display: block; height: 100%; width: 11%;
  background: var(--night);
  transition: width .55s var(--ease);
}

/* ── layout ────────────────────────────────────────────── */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 68px) clamp(18px, 4vw, 40px) 120px;
}

.eyebrow {
  font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin: 0 0 18px;
}
.lede { font-size: var(--t-m); color: var(--muted); max-width: 46ch; margin: 0 0 40px; line-height: 1.45; }
.fine { font-size: var(--t-xs); color: var(--muted); margin: -8px 0 34px; }

.step { display: none; }
.step.on { display: block; animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── tiles: the big choices, name bold and specifics under it ── */

fieldset { border: 0; margin: 0 0 38px; padding: 0; min-width: 0; }

legend {
  font-weight: 800; font-size: var(--t-m); padding: 0;
  margin-bottom: 18px; letter-spacing: -.01em; color: var(--night);
}

.tiles { display: grid; gap: 12px; }
.up2 { grid-template-columns: 1fr; }
.up3 { grid-template-columns: 1fr; }

@media (min-width: 700px) {
  .up2 { grid-template-columns: 1fr 1fr; }
  .up3 { grid-template-columns: 1fr 1fr 1fr; }
}

.tile { display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; }

.tile-in {
  display: block; height: 100%;
  padding: 22px 22px 20px;
  border: 1px solid var(--rule);
  background: var(--panel);
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease),
              box-shadow .3s var(--ease);
}
.tile:hover .tile-in {
  transform: translateY(-2px);
  border-color: var(--night);
  box-shadow: 0 10px 22px rgba(17, 17, 17, .09);
}

.tile-in b { display: block; font-size: var(--t-m); font-weight: 800; letter-spacing: -.01em; color: var(--night); }
.tile-in .price { display: block; font-size: var(--t-s); color: var(--muted); margin-top: 6px; font-style: normal; letter-spacing: -.01em; }
.tile-in b.price { font-size: var(--t-m); color: var(--night); margin-top: 0; }
.tile-in ul { list-style: none; margin: 14px 0 0; padding: 0; }
.tile-in li {
  font-size: var(--t-xs); color: var(--muted); padding: 4px 0 4px 16px;
  position: relative; line-height: 1.4;
}
/* A drawn 1px bar renders as a crisp solid rule while the text beside it is
   antialiased, so it always reads bolder than the line it belongs to. Using a
   real glyph means the marker is set in the same font at the same weight and
   can never out-weigh the text. */
.tile-in li::before {
  content: "\2013";
  position: absolute; left: 0; top: 4px;
  line-height: 1.4;
}

.tile input:checked + .tile-in {
  background: var(--night); color: var(--paper); border-color: var(--night);
}
.tile input:checked + .tile-in b { color: var(--paper); }
.tile input:checked + .tile-in .price,
.tile input:checked + .tile-in li { color: rgba(244, 242, 236, .72); }

.tile input:focus-visible + .tile-in { outline: 2px solid var(--night); outline-offset: 3px; }

/* ── the billing toggle ────────────────────────────────── */
/* A <legend> renders outside its fieldset's padding box, so absolutely
   positioning a sibling against the fieldset lands it on the tiles rather than
   the heading. The heading and the toggle share a plain flex row instead, and
   the fieldset points at it with aria-labelledby. */
.plan-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 0 0 18px;
}
.legend-like {
  margin: 0; font-weight: 800; font-size: var(--t-m);
  letter-spacing: -.01em; color: var(--night);
}
.seg {
  display: inline-flex; border: 1px solid var(--rule-strong); background: var(--panel);
}
.seg label { cursor: pointer; display: block; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; }
.seg span {
  display: block; padding: 9px 18px;
  font-size: var(--t-xs); font-weight: 800; color: var(--muted);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.seg label + label span { border-left: 1px solid var(--rule-strong); }
.seg input:checked + span { background: var(--night); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--night); outline-offset: 2px; }

/* ── compact choices ───────────────────────────────────── */

.cards { display: grid; gap: 10px; }
@media (min-width: 700px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards.two { grid-template-columns: 1fr 1fr; }
  .cards.three-up { grid-template-columns: repeat(3, 1fr); }
}
.card { display: block; cursor: pointer; }
.card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; }
.card-in {
  display: block; padding: 15px 18px;
  border: 1px solid var(--rule); background: var(--panel);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.card-in b { font-weight: 800; font-size: var(--t-s); color: var(--night); }
.card-in span { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 3px; }
.card:hover .card-in { border-color: var(--night); }
.card input:checked + .card-in { background: var(--night); color: var(--paper); border-color: var(--night); }
.card input:checked + .card-in b { color: var(--paper); }
.card input:checked + .card-in span { color: rgba(244, 242, 236, .72); }
.card input:focus-visible + .card-in { outline: 2px solid var(--night); outline-offset: 3px; }

/* A rush window set by the date is not a choice any more. The inputs stay
   enabled so the answer still posts; only the interaction is removed. */
fieldset.locked .card { pointer-events: none; }
fieldset.locked .card input:not(:checked) + .card-in { opacity: .38; }

/* ── chips ─────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* A note that follows a chip row sits under it, not beside it. The chips are a
   flex container, so this has to be a sibling rather than a child. */
.plan-note { margin: -26px 0 30px; }
.plan-note:empty { display: none; }
.chips legend { width: 100%; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: -1px; }
.chip span {
  display: block; padding: 9px 16px; background: var(--panel);
  border: 1px solid var(--rule); font-size: var(--t-xs);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.chip:hover span { border-color: var(--night); }
.chip input:checked + span { background: var(--night); color: var(--paper); border-color: var(--night); }
.chip input:focus-visible + span { outline: 2px solid var(--night); outline-offset: 3px; }

/* ── fields ────────────────────────────────────────────── */

.field { display: block; margin: 0 0 24px; }
.field.narrow { max-width: 420px; }
.label { display: block; font-weight: 800; font-size: var(--t-s); margin-bottom: 8px; color: var(--night); }
.help { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 7px; line-height: 1.4; }

input[type=text], input[type=email], input[type=tel], input[type=url],
input[type=number], input[type=date], input[type=time], textarea {
  width: 100%; font: inherit; color: var(--on);
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  padding: 13px 15px;
  border-radius: 0;
  transition: border-color .25s var(--ease);
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { outline: 2px solid var(--night); outline-offset: 2px; border-color: var(--night); }
input::placeholder, textarea::placeholder { color: rgba(17, 17, 17, .38); }
input[type=date], input[type=time] { color-scheme: light; }

/* An unanswered question should be obvious at a glance without shouting. Two
   pixels and a soft halo, not a thin hairline. */
.field.bad input, .field.bad textarea, .field.bad .stepper .step-btn,
.field.bad .drop {
  border-color: var(--bad);
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(163, 35, 27, .16);
}
fieldset.bad > legend { color: var(--bad); }
fieldset.bad .card-in, fieldset.bad .tile-in, fieldset.bad .chip span {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(163, 35, 27, .12);
}

/* ── stepper ───────────────────────────────────────────── */
/* The native number spinner is a grey nub that belongs to the browser, not to
   this page. Hidden, and replaced with two real buttons. */

.stepper input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.stepper input[type=number]::-webkit-outer-spin-button,
.stepper input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper { display: grid; grid-template-columns: 56px 1fr 56px; max-width: 220px; }

.step-btn {
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  color: var(--night);
  font-size: var(--t-m); font-weight: 800; line-height: 1;
  padding: 0; height: 100%; min-height: 52px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.step-btn:hover { background: var(--night); color: var(--paper); border-color: var(--night); }
.step-btn:focus-visible { outline: 2px solid var(--night); outline-offset: 2px; z-index: 1; }

/* One shared border between the three, so it reads as a single control. */
.stepper .step-btn:first-child { border-right: 0; }
.stepper .step-btn:last-child { border-left: 0; }
.stepper input[type=number] { text-align: center; font-weight: 800; font-size: var(--t-m); }

.row { display: grid; gap: 0 18px; }
@media (min-width: 700px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row.three { grid-template-columns: 2fr 1fr 1fr; }
}

/* ── hours ─────────────────────────────────────────────── */

.hours .na {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; font-size: var(--t-xs); font-weight: 800;
  color: var(--night); cursor: pointer;
}

.hours #hoursGrid { display: grid; gap: 8px; }

/* Somebody with no set hours should not have to tick seven Closed boxes, and
   the grid below should visibly stop asking. */
.hours.na-on #hoursGrid { opacity: .32; pointer-events: none; }
.hrow {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
}
@media (min-width: 620px) {
  .hrow { grid-template-columns: 110px 1fr 1fr auto; align-items: center; gap: 12px; }
}
.hrow > b { font-weight: 800; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--night); }
.hrow input[type=time] { padding: 9px 12px; }
.hrow .closed { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--muted); cursor: pointer; }
.hrow.is-closed input[type=time] { opacity: .3; pointer-events: none; }
input[type=checkbox] { accent-color: var(--night); width: 16px; height: 16px; }

/* ── uploads ───────────────────────────────────────────── */

.drop { position: relative; border: 1px dashed var(--rule-strong); background: var(--panel); transition: border-color .25s var(--ease); }
.drop:hover, .drop.over { border-color: var(--night); }
.drop input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.drop-face { display: block; padding: 26px 20px; text-align: center; }
.drop-face b { display: block; font-weight: 800; color: var(--night); }
.drop-face i { display: block; font-size: var(--t-xs); color: var(--muted); margin-top: 5px; font-style: normal; }
.drop input:focus-visible ~ .drop-face { outline: 2px solid var(--night); outline-offset: 3px; }

/* ── nav ───────────────────────────────────────────────── */

.nav {
  display: flex; gap: 12px; align-items: center;
  margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rule);
}
button { font: inherit; cursor: pointer; border-radius: 0; }
.go {
  background: var(--action); color: var(--on-action); border: 1px solid var(--action);
  font-weight: 800; padding: 14px 30px;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.go:hover { transform: translateY(-1px); }
.ghost {
  background: transparent; color: var(--on); border: 1px solid var(--rule-strong);
  padding: 14px 24px; transition: border-color .25s var(--ease);
}
.ghost:hover { border-color: var(--night); }
.ghost[hidden] { display: none; }
button:focus-visible { outline: 2px solid var(--night); outline-offset: 3px; }
.go[disabled] { opacity: .5; cursor: default; transform: none; }

/* `a:link` outranks `.go`, so without naming the states here the button renders
   as a dark rectangle with dark text: a solid black box, no label. */
a.go, a.go:link, a.go:visited { color: var(--on-action); text-decoration: none; display: inline-block; }

.error {
  margin: 24px 0 0; padding: 14px 18px;
  border: 1px solid var(--bad); color: var(--bad);
  background: #FBF0EE;
  font-size: var(--t-xs);
}
.error[hidden] { display: none; }

.disclosure {
  margin: 36px 0 0; padding: 20px 22px;
  border: 1px solid var(--rule); color: var(--muted);
  font-size: var(--t-xs); line-height: 1.6; max-width: 62ch;
}

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

footer {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  padding: 26px clamp(18px, 4vw, 40px);
  border-top: 1px solid var(--rule);
  font-size: var(--t-xs); color: var(--muted);
}
footer a, footer a:link, footer a:visited { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--night); text-decoration: underline; }

/* ── address rows and suggestions ──────────────────────── */

.addr-rows { display: grid; gap: 8px; }
.addr-row { display: grid; grid-template-columns: 1fr auto; align-items: stretch; max-width: 520px; }
.addr-row input { border-right: 0; }
.addr-row .at {
  display: flex; align-items: center; padding: 0 16px;
  border: 1px solid var(--rule-strong); background: transparent;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--t-xs);
  color: var(--muted); white-space: nowrap;
}

.suggest { position: relative; }
.suggest-list {
  position: absolute; z-index: 12; left: 0; right: 0; top: 100%;
  margin: -1px 0 0; padding: 0; list-style: none;
  background: var(--panel); border: 1px solid var(--night);
  max-height: 260px; overflow-y: auto;
  box-shadow: 0 14px 30px rgba(17, 17, 17, .14);
}
.suggest-list[hidden] { display: none; }
.suggest-list li {
  padding: 11px 15px; font-size: var(--t-xs); cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.suggest-list li:last-child { border-bottom: 0; }
.suggest-list li:hover, .suggest-list li[aria-selected="true"] {
  background: var(--night); color: var(--paper);
}

.status-free { color: #1B6B3A; font-weight: 800; }
.status-taken { color: var(--bad); font-weight: 800; }
.status-checking { color: var(--muted); }

.branch, [data-show-when] { display: none; }
fieldset.cards[data-show-when].on { display: grid; }
.branch.on { display: block; animation: rise .45s var(--ease) both; }
.field[data-show-when].on, .drop-wrap.on { display: block; animation: rise .45s var(--ease) both; }
fieldset[data-show-when].on { display: block; animation: rise .45s var(--ease) both; }
fieldset.chips[data-show-when].on { display: flex; }
div.field[data-show-when].on { display: block; }
/* The reveal rules are all element-specific, so a bare span carrying
   data-show-when stays hidden without its own line here. */
span.plan-note[data-show-when].on { display: block; }

.nojs .step { display: block; }
.nojs .branch, .nojs [data-show-when] { display: block; }
.nojs .nav { display: none; }

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