/* ---------- menu panel ---------- */

.panel{
  position:fixed;
  top:var(--header-h);
  right:var(--pad);
  bottom:var(--header-h);
  width:var(--panel-w);
  border-radius:var(--radius);
  overflow:hidden;
  z-index:50;

  opacity:0;
  transform:translateX(12px) scale(.98);
  pointer-events:none;
  transition:opacity 380ms var(--ease),transform 520ms var(--ease);
}
/* the frosted card, on its own layer so the scrolling column above it is not
   also a backdrop-filter element */
.panel::before{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(245,245,245,.72),rgba(235,235,235,.55));
  backdrop-filter:blur(28px) saturate(140%);
  -webkit-backdrop-filter:blur(28px) saturate(140%);
}
[data-theme="dark"] .panel::before{
  background:linear-gradient(180deg,rgba(28,28,28,.72),rgba(17,17,17,.55));
}
body.menu-open .panel{opacity:1;transform:none;pointer-events:auto}
/* The panel is a fixed-height card. With the form open — and taller still once a
   validation note appears — it holds more than a laptop window or a phone has
   room for, and the card was shrunk to fit: Send was clipped off inside its
   overflow:hidden. Nothing in it may shrink; its inner column scrolls instead.

   Content is clipped by the CARD, at both ends, so scrolling up behaves exactly
   like scrolling down: the form disappears behind the card's own rounded edge.
   Two alternatives were tried and rejected by Anthony — a fade (nothing else on
   the site fades) and letting the content run up over the header (it did not
   match the bottom edge). */
.panel-inner{
  position:absolute;
  inset:0;
  padding:var(--pad);
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
}
.panel-inner::-webkit-scrollbar{display:none}
.panel-inner > *{flex-shrink:0}

/* ---------- get in touch ----------
   The pill expands in place into the form card, and the card only grows DOWN
   (Anthony, 2026-09-18). The menu used to widen 300 -> 400 first, then the
   card came down: two movements where the phone has one. At 300 the fields are
   220 wide (the panel's 20 and the card's 20 each side), which holds Name,
   Email, the topic with its chevron and the message's first line — measured,
   not guessed; see README "Get in touch keeps the menu's width". */

/* The shell is the pill and the card both — only its height, radius and
   colour change, so the expansion is one continuous movement rather than one
   element being swapped for another. */
/* Black even when closed, so getting in touch reads as the primary action
   rather than a fifth menu item. It also means the pill and the card it opens
   into are the same colour — the expansion is purely a change of shape. */
/* THE CORNER NEVER CHANGES (Anthony, 2026-09-17). The radius is exactly half
   the closed pill's height, so the pill is a true pill — and the card keeps
   that same corner as it grows, which is what makes the growth read as one
   shape stretching rather than a pill turning into a box. It used to open from
   20 to 15: on a phone the closed pill was right and the corners visibly
   tightened as the card came down. There is nothing to animate now.
   30px row here, 40 on a phone (see the mobile rules), so this value is
   overridden there along with the height. */
.contact{
  border-radius:var(--chip-r);
  background-color:var(--contact-pill);
  overflow:hidden;
  transition:background-color var(--hover) var(--ease);
}
/* The open state lives on the ELEMENT, not on the body: there are two of these
   now — the menu's and the About header's — and they open independently. */
@media (hover:hover){.contact:not(.is-open):hover{background-color:var(--contact-pill-hover)}}.contact:not(.is-open).is-pressed{background-color:var(--contact-pill-hover)}
.contact.is-open{background-color:var(--contact-card)}
/* THE MENU'S GET IN TOUCH IS 40 ON A LAPTOP TOO (Anthony, 2026-09-21): every
   control in the menu — rows, switches, fields, Send — is 40 at both widths
   now. The About header's Get in touch stays on the header's 30 row. */
.panel .contact{border-radius:var(--ctl-r)}
.panel .contact-head{height:var(--ctl-h)}

/* the header keeps the pill's exact 30px row in both states, so the words
   "Get in touch" never shift as the card grows around them */
.contact-head{
  display:flex;
  align-items:center;
  width:100%;
  height:var(--chip-h);
  padding:0 var(--word-x);
  border:0;
  background:none;
  font:inherit;
  font-size:var(--fs-s);
  color:var(--contact-ink);   /* the label never changes within a theme */
  text-align:left;
  cursor:pointer;
}

/* Height is driven from JS against the measured content and released to auto
   once open. The 0fr -> 1fr grid trick reads better but Chrome would not
   interpolate it here — it applied the value only with the transition removed,
   so the animation swallowed the change entirely. */
.contact-clip{
  height:0;
  overflow:hidden;
  transition:height var(--contact-open) var(--glide);
}
.contact-fields{
  display:flex;
  flex-direction:column;
  /* 10px ON A LAPTOP (Anthony, 2026-09-18: "the spacing between the elements —
     the name, the email and so on — seems a bit too much"). It was 20, which
     made sense while every field had its label ABOVE it and the gap had to
     separate one label-and-field pair from the next. The names moved INSIDE
     the fields on 2026-09-16, so each field is now one line, and 10 is the
     menu's own rhythm — every row 30px, 10px apart — and the checkout's, which
     made exactly this change for exactly this reason. One form, all three
     places it appears (the menu, About's header, Start a project). */
  gap:10px;
  padding:20px var(--word-x);   /* inside the clip, so it collapses with the height; the sides match the rows' word inset, so Get in touch and the fields' edge share a line */
  opacity:0;
  transition:opacity 260ms var(--ease);
}
.contact.is-open .contact-fields{opacity:1;transition:opacity 360ms var(--ease) 200ms}

/* ---------- sent (see showSent in app.js) ----------
   Send itself answers: the Low-res green and "Sent", or the error red and
   "Error". Its three words share one grid cell (so its width never changes),
   and the one in use rolls up into place as the other rolls out. Ink on the
   green (white is ~2:1), white on the red. */
/* `.rolls` — Send, and the checkout's pay buttons (the same answer, 2026-09-19) */
.rolls{display:inline-grid;align-items:center;justify-items:center;overflow:hidden;
  transition:background-color 300ms var(--ease),color 300ms var(--ease)}
.send-w{grid-area:1 / 1;transition:transform 360ms var(--ease),opacity 260ms var(--ease)}
.send-ok,.send-bad{transform:translateY(100%);opacity:0}
.rolls.is-ok{background-color:#34c759;color:#111111}@media (hover:hover){.rolls.is-ok:hover{background-color:#34c759;color:#111111}}.rolls.is-ok.is-pressed{background-color:#34c759;color:#111111}
.rolls.is-bad{background-color:var(--contact-error);color:#ffffff}@media (hover:hover){.rolls.is-bad:hover{background-color:var(--contact-error);color:#ffffff}}.rolls.is-bad.is-pressed{background-color:var(--contact-error);color:#ffffff}
.rolls.is-ok .send-now,.rolls.is-bad .send-now{transform:translateY(-100%);opacity:0}
.rolls.is-ok .send-ok,.rolls.is-bad .send-bad{transform:none;opacity:1;transition-delay:80ms}
.rolls[disabled].is-ok,.rolls[disabled].is-bad{opacity:1;cursor:default}
.rolls.no-roll,.rolls.no-roll .send-w{transition:none}

/* A FULL-WIDTH BUTTON STARTS ITS WORDS 20 FROM ITS LEFT EDGE — never centred
   (Anthony, 2026-09-19, one rule everywhere). It is where the menu's rows,
   every field's text and a sized button's label already start, so the eye
   runs one line down a form and lands on the button; and when a button goes
   from sized (laptop) to full width (phone) its word does not move, only the
   button grows. The exception is THE CHECKOUT (Anthony, 2026-09-19): its
   wallet is Apple's / Google's own button, drawn and centred by them, so Pay
   by card and Pay centre too — the checkout's buttons read as one set.
   Phone-only full-width buttons join this in the stacked block. */
.panel .send{justify-content:flex-start;justify-items:start;text-align:left}
.co-bycard{justify-content:center}
/* paid: the rest of the checkout settles back, the way a sent form's fields do */
.checkout.is-paid .co-field input,
.checkout.is-paid .co-field select{color:color-mix(in srgb, var(--ink) 40%, transparent);-webkit-text-fill-color:currentColor;cursor:default}
.checkout.is-paid .co-step,
.checkout.is-paid .co-bycard:disabled,
.checkout.is-paid .co-x:disabled:not(.is-ok),
.checkout.is-paid .co-pay:disabled:not(.is-ok){opacity:.4;transition:opacity 400ms var(--ease)}

/* sent: the fields settle back — what was written stays readable, but it is done */
/* sent: every field greys out THE SAME WAY (Anthony, 2026-09-19 — dimming
   the whole field made the empty ones, already at placeholder grey, fade
   twice and look more "off" than the filled ones). What was typed and what
   was left empty both turn the placeholder grey, and nothing takes a caret. */
.contact-fields.is-sent .field input,
.contact-fields.is-sent .field select,
.contact-fields.is-sent .field textarea{
  color:var(--contact-ph);
  -webkit-text-fill-color:var(--contact-ph);
  cursor:default;
  transition:color 400ms var(--ease),-webkit-text-fill-color 400ms var(--ease);
}
.form-note a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.form-note.is-quiet{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* THE FIELD'S NAME SITS INSIDE IT (Anthony, 2026-09-16), everywhere a contact
   form appears — the menu, the About header's clone, the services page. It
   halves the height of the card, and it is what the checkout already does. The
   label stays in the markup for screen readers; `setupContact` copies its words
   into the field's placeholder (a select's empty first option carries its own).
   This replaces the 2026-09-14 decision to show no sample text: the names are
   not samples, they are the labels, and they read as such. */
.field{display:flex;flex-direction:column;gap:10px}
.field label{
  position:absolute;
  width:1px;height:1px;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

.field input,
.field select,
.field textarea{
  width:100%;
  /* background-COLOR, never the shorthand: the select below adds a chevron as
     a background IMAGE with its own repeat, position and size, and a shorthand
     anywhere in this group silently resets all four. See :focus. */
  background-color:var(--contact-field);
  border:1px solid transparent;
  border-radius:var(--ctl-r);
  /* 19 + the 1px border: the words start 20 from the field's edge, like the
     message's (Anthony's Figma, 2026-09-19) */
  padding:0 calc(var(--word-x) - 1px);   /* + the 1px border */
  height:var(--ctl-h);
  color:var(--contact-ink);
  font:inherit;
  font-size:var(--fs-s);
  transition:border-color var(--hover) var(--ease),background-color var(--hover) var(--ease);
}
.field textarea{
  height:100px;
  border-radius:20px;
  /* THE FIRST LINE'S LETTERS SIT 20 FROM THE TOP AND 20 FROM THE LEFT
     (Anthony's Figma, 2026-09-19: "on the top left, with equal spacing
     around"). A textarea cannot trim its line box the way the rest of the site
     does (text-box), so the padding does it: the 1px border, then the 4.5px
     the 18.85px line leaves above a 13px capital — 20 of padding put the
     letters at 26. 14 + 1 + 4.5 lands them on 20 (19.5, measured in Safari —
     15 gave 20.5, which Figma rounds to 21). Sides 19 + the border, like the
     other fields. */
  /* the first line sits as far from the top as the words do from the side (2026-11-16,
     his note): the 1px border and the ~4.5px the line box leaves above a capital
     come off --word-x */
  padding:calc(var(--word-x) - 5.5px) calc(var(--word-x) - 1px);
  resize:none;
  line-height:1.45;
}
.field input::placeholder,
.field textarea::placeholder{color:var(--contact-ph)}
/* the topic before it is chosen reads as a placeholder, like the three beside
   it — in full ink it looked already answered (2026-09-18). `is-empty` is set
   by wireContactForm; the list itself stays in ink. */
.field select.is-empty{color:var(--contact-ph)}
.field select option{color:initial}
.field textarea::placeholder{color:var(--contact-ph-soft)}

.field input:focus,
.field select:focus,
.field textarea:focus{
  outline:none;
  border-color:var(--contact-ring);
  /* THE SHORTHAND HERE WAS A BUG (Anthony, 2026-09-17). `background:` resets
     background-image to none, background-repeat to `repeat`, position to 0 0
     and size to auto — so focusing a select threw its chevron away. It went
     unnoticed while the image was only ever set by `.field select`, which is
     earlier in the file and so lost the property outright: the glyph simply
     vanished on focus. The panel's own chevron rule is LATER, so it put the
     image back while the reset repeat/position/size stood — and a chevron
     tiled across a field is the zigzag he photographed. */
  background-color:var(--contact-field-focus);
}
.field [aria-invalid="true"]{border-color:var(--contact-error)}

/* native select, restyled — the chevron is Figma's own asset */
.field select{
  appearance:none;
  -webkit-appearance:none;
  background-image:var(--chevron);
  background-repeat:no-repeat;
  background-position:right calc(var(--word-x) - 1px) center;   /* the word inset from the field's edge, with the border */
  background-size:9px 5px;
  padding-right:43px;
  cursor:pointer;
}
.field select option{background:var(--contact-field);color:var(--contact-ink)}

.send{
  /* sized to its label rather than stretched, same as Read more */
  align-self:flex-start;
  height:var(--ctl-h);
  padding:0 var(--word-x);
  border:0;
  border-radius:var(--ctl-r);
  background-color:var(--contact-send);
  color:var(--contact-send-ink);
  font:inherit;
  font-size:var(--fs-s);   /* every button is 14px (13 until 2026-09-21) */
  cursor:pointer;
  transition:background-color var(--hover) var(--ease);
}
/* the menu's Send is as wide as its fields on a laptop too (Anthony, 2026-09-19);
   About's header card and the Start panel keep it sized to its word there */
.panel .send{align-self:stretch}
@media (hover:hover){.send:hover{background-color:var(--contact-send-hover)}}.send.is-pressed{background-color:var(--contact-send-hover)}
.send[disabled]{opacity:.5;cursor:default}

.form-note{
  font-size:var(--fs-s);   /* notes are 13 at the secondary .55, like About's note; there is no 12 (2026-09-18 sweep) */
  color:var(--contact-note);
  min-height:0;
}
.form-note:empty{display:none}
.form-note.is-error{color:var(--contact-error)}

.panel-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.panel-nav li[hidden]{display:none}



.pill{
  /* 30px, Get in touch's height, so every row of the menu is the same size
     (Anthony, 2026-09-15; it was 31.5 from its padding) */
  display:flex;
  align-items:center;
  height:var(--ctl-h);
  width:100%;
  text-align:left;
  border:0;
  font:inherit;
  cursor:pointer;
  padding:0 var(--word-x);   /* the inset of Get in touch and the fields above */
  border-radius:var(--ctl-r);
  background-color:rgba(255,255,255,.55);
  font-size:var(--fs-s);
  color:var(--ink);
  transition:background-color var(--hover) var(--ease),color 420ms var(--ease);
}
@media (hover:hover){.pill:hover{background-color:rgba(255,255,255,.9)}}.pill.is-pressed{background-color:rgba(255,255,255,.9)}
.pill.is-active{background-color:var(--contact-pill);color:var(--contact-ink)}
@media (hover:hover){.pill.is-active:hover{background-color:var(--contact-pill-hover)}}.pill.is-active.is-pressed{background-color:var(--contact-pill-hover)}
[data-theme="dark"] .pill{background-color:rgba(255,255,255,.06);color:var(--ink)}
@media (hover:hover){[data-theme="dark"] .pill:hover{background-color:rgba(255,255,255,.11)}}[data-theme="dark"] .pill.is-pressed{background-color:rgba(255,255,255,.11)}

/* The panel's contents settle in after the panel itself, as a plain fade —
   the same delayed-opacity treatment the project captions use. No movement,
   no stagger.

   SCOPED TO THE PANEL. There is a second `.contact` now — the clone in the
   About header — and unscoped this rule held it at opacity 0 whenever the menu
   was shut, which is exactly when it needs to be visible. Its own fade lives
   with the other header actions. */
/* The panel's contents fade in together. THE CONTACT CARD IS LISTED SEPARATELY
   because a `transition` declaration REPLACES the whole list: folded in with
   the others it lost the card's own `border-radius` and `background-color`
   transitions, and the corners snapped from pill to card the moment it opened
   instead of easing (Anthony, 2026-09-17, on a phone). Whatever is added to
   .contact's transition list has to be repeated here. */
.panel-nav{
  opacity:0;
  transition:opacity 200ms var(--ease);
}
.panel .contact{
  opacity:0;
  transition:opacity 200ms var(--ease),
             background-color var(--hover) var(--ease);
}
body.menu-open .panel-nav{
  opacity:1;
  transition:opacity 340ms var(--ease) 180ms;
}
body.menu-open .panel .contact{
  opacity:1;
  transition:opacity 340ms var(--ease) 180ms,
             background-color var(--hover) var(--ease);
}

/* The invisible native switch laid over a round button for its haptic
   (addHaptic in app.js). Transparent, never appearance:none or hidden — it has
   to stay the native control for iOS to tick. */
.haptic-hit{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:inherit;
}
.icon-btn:has(> .haptic-hit){position:relative}

/* ---------- settings ----------

   Light · Dark and High-res · Low-res (2026-09-15): the header's Feed · Index
   control, full width in the menu — both choices named, the one in use at full
   ink on a highlight that slides across, the other at 40%. Anthony's call over
   a pair of switches: a switch only says on or off, this names both states.
   Same chip, same highlight (--chip / --seg-glide), so it stays tonal in both
   themes; Low-res alone lights its highlight Apple green, the one colour in the
   chrome, saying "eco" without a word. A little more space above the pair than
   between them, so places to go and ways to look at them read as two groups.

   The theme used to be a native switch for the iPhone's haptic tick; like
   Feed · Index, this has none. */
.settings{display:flex;flex-direction:column;gap:10px}
/* The two settings now live in the small print's fold (2026-09-24); they used
   to sit 60 under the places to go (Figma 943:1986). */
/* EXACTLY a pill's size (30px) and on the same 10px rhythm as the pills, with
   the highlight inset 3px inside the track exactly as Feed · Index draws it
   (Anthony, 2026-09-15 — a full-height highlight was tried first and read as
   edge to edge). */
.set-seg{
  position:relative;
  display:flex;
  height:var(--ctl-h);
  padding:3px;               /* the highlight sits INSIDE the track, as in Feed · Index */
  border-radius:var(--ctl-r);
  background-color:var(--chip);
  transition:background-color var(--seg-t) var(--seg-ease);
}
.set-seg .seg-glide{top:3px;height:calc(var(--ctl-h) - 6px);border-radius:calc(var(--ctl-r) - 3px)}
.set-seg .seg-opt{flex:1 1 0;height:calc(var(--ctl-h) - 6px);padding:0 16px;border-radius:calc(var(--ctl-r) - 3px)}
.set-seg.is-eco .seg-glide{background-color:#34c759}
/* in dark mode the highlight has to be a clear step up from the track, or the
   pill around the chosen side disappears (Anthony, 2026-09-15) */
[data-theme="dark"] .set-seg{background-color:rgba(255,255,255,.06)}
[data-theme="dark"] .set-seg .seg-glide{background-color:#444444}
[data-theme="dark"] .set-seg.is-eco .seg-glide{background-color:#34c759}
[data-theme="dark"] .set-seg.is-eco .seg-opt[aria-pressed="true"]{color:#111}
/* the side already chosen does not tick */
.seg-opt[aria-pressed="true"] .haptic-hit{pointer-events:none}

/* Low-res: the dots stay dots. The images are 250px wide with eight colours
   each, scaled up without smoothing, so on a wide column they read as a print,
   not a blur. */
html.set-lowres img,
canvas.lowvid{image-rendering:pixelated}

.panel-small{margin-top:auto;display:flex;flex-direction:column;gap:20px}
.panel-foot{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  /* two links now (Privacy & Access, Terms & shipping), and they read as a pair
     rather than as two ends of a bar — the foot is 300 wide on a laptop and
     space-between pushed them apart into two separate things. */
  gap:20px;
  font-size:var(--fs-s);
  color:var(--ink);   /* was unset in light mode, so it fell through to #000 */
}
/* the small print is dimmed link by link, not as a row (2026-09-24), so the
   play chip at its end can be at full strength like every other chip */
.panel-foot > a{opacity:.55}
