/* ==========================================================================
   Bleue Digital
   Centered, quiet, mostly white. Type, space and one blue do the work.
   ========================================================================== */

:root {
  /* Brand */
  --blue: #003BFF;          /* from brand/bleue logos.pdf */
  --blue-hover: #0030CC;
  --on-blue: #FFFFFF;

  /* Neutrals */
  --bg: #FDFDFC;
  --bg-soft: #F2F1EE;
  --fg: #121212;
  --fg-muted: #505358;
  --fg-faint: #707277;      /* soft grey text: 4.73:1 on --bg, passes WCAG AA at every size (was #8A8C91, 3.31:1) */
  --line: rgba(6, 6, 6, 0.09);
  --line-strong: rgba(6, 6, 6, 0.18);

  /* Image placeholders: swap each .ph for a real <img> later */
  --placeholder: var(--blue);

  --display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;

  --btn-radius: 10px;
  --card-radius: 8px;

  /* --- Motion --------------------------------------------------------------
     --speed scales every animation on the page at once:
       1 = default, 0.5 = twice as fast, 1.5 = 50% slower.
     Each duration below can also be tuned on its own. */
  --speed: 1;

  /* Ease out: starts quick, then glides to a soft stop. */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease: var(--ease-out);
  /* Looping glows and floats. Set to var(--ease-out) for a sharper rhythm. */
  --ease-loop: cubic-bezier(0.37, 0, 0.63, 1);

  --dur-press: calc(120ms * var(--speed));  /* click feedback */
  --dur-fast:  calc(200ms * var(--speed));  /* link and text color on hover */
  --dur-base:  calc(320ms * var(--speed));  /* buttons, menu, dock labels */
  --dur-slow:  calc(600ms * var(--speed));  /* dock slide-in, hero button */
  --dur-pop:   calc(864ms * var(--speed));  /* "+ You" bubble bounce (720ms slowed 20%) */
  --dur-pulse: calc(1.4s * var(--speed));   /* hero button pulse */
  --dur-glow:  calc(2s * var(--speed));     /* status dot glow */
  --dur-float: calc(6.5s * var(--speed));   /* process blocks drifting */

  --gutter: clamp(1rem, 2.5vw, 2rem);
  --measure: 1440px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  width: 100%;
  max-width: var(--measure);
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  padding: 0.5rem 0.9rem;
  border-radius: var(--btn-radius);
  background: var(--fg);
  color: #fff;
  font-size: 0.875rem;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(5rem, 10vw, 8.5rem); text-align: center; }

/* --- Placeholder blocks ----------------------------------------------------- */
.ph {
  display: block;
  width: 100%;
  background: var(--placeholder);
}

/* --- Logo: the /bleue wordmark (brand/bleue-wordmark-blue.svg) ------------
   Vector, already cropped to the artwork, so it just fills its link's width.
   Padding keeps the link a comfortable 44px tap target. */
.logo {
  display: block;
  padding-block: 0.625rem;
}

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

/* --- Typed logo (header) ----------------------------------------------------
   TextType-style: letters appear one at a time, a bar cursor glides to each new
   letter and stays solid while typing, then blinks with a soft fade. The cursor
   is allowed past the artwork's edge so the logo stays exactly where it was. */
.logo-type { display: block; width: 100%; height: auto; overflow: visible; }

.lt-cursor { opacity: 0; }                       /* only shown once the script runs */

/* Human preset values: fade-in 0.36s, blink 0.55s, glide 0.168s. */
.js .logo-type .lt { opacity: 0; }               /* typed in by script.js; deleting is instant */
.js .logo-type .lt.is-typed {
  opacity: 1;
  transition: opacity 0.36s cubic-bezier(0.25, 1, 0.5, 1);         /* the "fade" type effect */
}

/* The logo's own typeface, Helvetica Bold (fonts/Helvetica-Bold.woff), used for
   letters the typing effect draws itself. */
@font-face {
  font-family: 'Bleue Logo';
  src: url('fonts/Helvetica-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

/* A mistyped key (not a logo letter), in Helvetica Bold at the logo's size. */
.lt-typo {
  font-family: 'Bleue Logo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 238.5px;            /* measured: matches the logo's "l" height and "b" width */
  animation: lt-fade-in 0.36s cubic-bezier(0.25, 1, 0.5, 1) both;
}
@keyframes lt-fade-in { from { opacity: 0; } to { opacity: 1; } }

.logo-type.is-running .lt-cursor {
  opacity: 1;
  transition: transform 0.168s cubic-bezier(0.215, 0.61, 0.355, 1);  /* the glide */
  animation: lt-blink 1.1s ease-in-out infinite;
}
.logo-type.is-typing .lt-cursor { animation: none; opacity: 1; }    /* solid while typing */

/* TextType's blink (0.55s in the Human preset): hold, fade out, rest, fade back. */
@keyframes lt-blink {
  0%, 35%   { opacity: 1; }
  57.5%     { opacity: 0; }
  77.5%     { opacity: 0; }
  100%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .js .logo-type .lt { opacity: 1; }
  .logo-type .lt-cursor { display: none; }
}

/* --- Type ------------------------------------------------------------------- */
h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 60px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--fg);
  text-wrap: balance;
}

h1 .accent { color: inherit; }

h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.lede {
  margin: 1rem auto 0;
  max-width: 44rem;
  font-family: var(--body);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--fg-faint);
  text-wrap: balance;
}

.section-head { margin-bottom: clamp(2rem, 3.5vw, 3rem); }

/* Section label: the slash from /bleue names the section above its heading.
   The founder selector outranks `.founder p`, which would otherwise restyle it. */
.eyebrow,
.founder p.eyebrow {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--blue);
}

/* --- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.875rem;
  padding-inline: 1.35rem;
  border-radius: var(--btn-radius);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

.btn:active { transform: scale(0.985); }

.btn-blue { background: var(--blue); color: var(--on-blue); }
.btn-blue:hover { background: var(--blue); }  /* stays #003BFF; the dock button glows and grows instead */

.btn-light { background: #fff; color: var(--fg); border: 1px solid var(--line-strong); }
.btn-light:hover { background: var(--bg-soft); }

/* --- Hero call to action ---------------------------------------------------- */
.cta {
  /* Button-only speed: 0.85 = 15% faster than the rest of the page.
     Scales the widening, the "You" bounce and its delay, hover, press and pulse. */
  --cta-speed: 0.85;
  --dur-press: calc(120ms * var(--speed) * var(--cta-speed));
  --dur-fast:  calc(200ms * var(--speed) * var(--cta-speed));
  --dur-base:  calc(320ms * var(--speed) * var(--cta-speed));
  --dur-slow:  calc(600ms * var(--speed) * var(--cta-speed));
  --dur-pop:   calc(864ms * var(--speed) * var(--cta-speed));
  --dur-pulse: calc(1.4s * var(--speed) * var(--cta-speed));

  display: inline-flex;
  align-items: center;
  height: 4.05rem;
  padding: 0.5rem 1.9rem 0.5rem 0.5rem;
  border-radius: 999px;
  background: var(--blue);
  color: var(--on-blue);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 0 0 0 #fff, 0 10px 24px -14px rgba(0, 59, 255, 0.6);
  transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-slow) var(--ease-out);
}

.cta:active { transform: scale(0.99); transition: transform var(--dur-press) var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .cta:hover {
    box-shadow: 0 10px 24px -14px rgba(0, 59, 255, 0.6);
  }
  /* linear on purpose: the keyframes already draw the springy landing. */
  /* Starts once the button is ~65% open (about 140ms in at default speed). */
  .cta:hover .cta-you { animation: cta-you-land var(--dur-pop) linear calc(var(--dur-slow) * 0.23) both; }
  .cta:hover .cta-join {
    grid-template-columns: 1fr;
    margin-right: 0.2rem;
    opacity: 1;
  }
}

/* Luis's headshot (brand/luis-arriaga-*.jpg) in a white-ringed circle. */
.cta-face {
  display: block;
  width: 2.95rem;
  height: 2.95rem;
  margin-right: 0.75rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 3px solid #fff;
  background: var(--bg-soft);
  object-fit: cover;
}

/* The button widens to fit "+ You" by growing a grid column from 0fr to 1fr.
   That animates the exact width, so the ease-out plays across the whole move
   instead of finishing early the way a max-width guess does. */
.cta-join {
  display: inline-grid;
  grid-template-columns: 0fr;
  opacity: 0;
  transition: grid-template-columns var(--dur-slow) var(--ease-out),
    margin-right var(--dur-slow) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
}

.cta-join-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  /* Clip so "+ You" stays hidden while closed, but let the clip reach a little
     past the edge so the bubble's overshoot is never cut flat. */
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 1rem;
  padding-block: 0.9rem;
  margin-block: -0.9rem;
  padding-right: 0.3rem;   /* room for the bubble's overshoot */
}

.cta-plus { font-size: 1.3rem; line-height: 1; }

.cta-you {
  display: grid;
  place-items: center;
  width: 2.95rem;
  height: 2.95rem;
  margin-right: 0.4rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 600;
}

@keyframes cta-you-land {
  0%   { transform: scale(0.45); opacity: 0; }
  25%  { transform: scale(1.09); opacity: 1; }
  46%  { transform: scale(0.955); }
  64%  { transform: scale(1.035); }
  81%  { transform: scale(0.988); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0, 59, 255, 0.45); }
  70%  { box-shadow: 0 0 0 22px rgba(0, 59, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 59, 255, 0); }
}
@keyframes pulse-lift {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.05); }
}
.is-pulsing { animation: pulse-ring var(--dur-pulse) var(--ease-out) 3, pulse-lift var(--dur-pulse) var(--ease-out) 3; }

.hero-proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.35rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
}

.hero-proof .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  background: #22C773;
  box-shadow: 0 0 4px 1px rgba(52, 224, 138, 0.55);
  animation: led-bloom var(--dur-glow) var(--ease-loop) infinite;
}

/* Light spilling outward: a ring leaves the dot and fades as it travels. */
.hero-proof .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(52, 224, 138, 0.55);
  animation: led-ping var(--dur-glow) var(--ease-out) infinite;
}

/* The glow swells as the ring leaves, then eases back to its resting light. */
@keyframes led-bloom {
  0%, 100% { box-shadow: 0 0 4px 1px rgba(52, 224, 138, 0.45); }
  18%      { box-shadow: 0 0 9px 2px rgba(52, 224, 138, 0.8); }
}

@keyframes led-ping {
  0%       { transform: scale(1);   opacity: 0.7; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; margin-top: 2.25rem; }

/* --- Header ----------------------------------------------------------------- */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1.5rem;
}

.masthead-time {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.masthead-brand { grid-column: 2; display: block; width: 108px; }

.masthead-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.masthead-links a { padding-block: 0.4rem; transition: color var(--dur-fast) var(--ease-out); }
.masthead-links a:hover { color: var(--blue); }

/* --- Hero ------------------------------------------------------------------- */
.hero {
  max-width: 1024px;
  margin-inline: auto;
  padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(3.35rem, 6.7vw, 5.375rem);
  padding-inline: clamp(1rem, 2vw, 1.5rem);
}

.hero h1 { margin-inline: auto; max-width: 18ch; }

/* --- Work ------------------------------------------------------------------- */
.work { padding-block: clamp(3rem, 6vw, 4rem); }

.work-shell { width: 100%; padding-inline: 8px; }

.work-grid { display: flex; flex-direction: column; gap: 12px; }

.piece {
  margin: 0;
  overflow: hidden;
  border-radius: var(--card-radius);
}

/* Each piece reserves its space so nothing jumps when real images land. */
.piece .ph { aspect-ratio: 16 / 10; }
.piece--tall .ph { aspect-ratio: 4 / 3; }

/* Real screenshots: shown whole at their own 16:10 shape, never cropped.
   The soft ground shows while a lazy image is still on its way. */
.piece img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
}

.work-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-pair .ph { aspect-ratio: 4 / 5; }

.work-more { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* "See more work" wears the booking chip style: white pill, lift and blue
   edge on hover, a small press on click. */
#more-work {
  min-height: 3.25rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  touch-action: manipulation;
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  #more-work:hover { background: #fff; border-color: rgba(0, 59, 255, 0.45); transform: translateY(-1px); box-shadow: 0 6px 18px -12px rgba(0, 59, 255, 0.45); }
}
#more-work:active { transform: scale(0.98); transition-duration: var(--dur-press); }
@media (max-width: 640px) { #more-work { min-height: 3rem; font-size: 0.9688rem; } }

/* --- Process ---------------------------------------------------------------- */
#process .wrap { max-width: 1440px; padding-inline: 8px; }

.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.process-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: 0.776;       /* a minimum shape: the card grows when its text runs long */
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: var(--card-radius);
  background: var(--bg-soft);
  text-align: left;
}

.process-card h3 { font-size: clamp(22px, 1.9vw, 28px); }

.process-no { margin-right: 0.35em; color: var(--blue); }

.process-desc {
  margin: 0.75rem 0 0;
  max-width: 32ch;
  font-size: 16px;
  line-height: 1.45;
  color: var(--fg-muted);
}

/* The art keeps its full size plus a gap under the text; when a description
   runs long, the card grows past its usual shape instead of overlapping. */
.process-art {
  flex: 1;
  display: grid;
  place-items: center;
  padding-top: 1.25rem;
  min-height: calc(min(67cqi, 284px) + 1.25rem);   /* the block's own size + the gap */
}

.process-card { container-type: inline-size; }   /* lets the block size itself from the card */

/* 3D glass icons (process/*.png), rendered on the card's own #F2F1EE so they sit seamlessly. */
.process-art .process-icon {
  width: min(67cqi, 284px);  /* the renders are cropped tight to the glass */
  /* Turn is set per card below; `rotate` is separate from the float, which uses transform. */
  height: auto;
  aspect-ratio: 1;
  animation: pa-float var(--dur-float) var(--ease-loop) infinite;
}

.process-card:nth-child(2) .process-art .process-icon { animation-delay: calc(var(--dur-float) * 0.13); }
.process-card:nth-child(3) .process-art .process-icon { animation-delay: calc(var(--dur-float) * 0.26); rotate: 38deg; }

/* A turned image's square corners can reach up toward the text; keep the text on top. */
.process-card h3,
.process-card .process-desc { position: relative; z-index: 1; }

.process-art .ph {
  width: min(62cqi, 220px);
  aspect-ratio: 1;
  border-radius: 6px;
  animation: pa-float var(--dur-float) var(--ease-loop) infinite;
}

.process-card:nth-child(2) .process-art .ph { animation-delay: calc(var(--dur-float) * 0.13); }
.process-card:nth-child(3) .process-art .ph { animation-delay: calc(var(--dur-float) * 0.26); }

@keyframes pa-float {
  /* `translate` moves along the page's own vertical, before any `rotate`,
     so a turned icon still rises straight up rather than along its tilt. */
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

/* --- Founder ---------------------------------------------------------------- */
.founder .wrap,
#faq .wrap,
.footer .wrap { max-width: 1024px; }

.founder-portrait {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 2rem;
  border-radius: 999px;
  background: var(--bg-soft);
  object-fit: cover;
}

.founder h2 { margin-bottom: 1.5rem; }

.founder-copy { max-width: 42rem; margin-inline: auto; }

.founder p {
  margin: 0 0 1.5rem;
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--fg-faint);
}

.founder p:last-child { margin-bottom: 0; }
.founder p strong { color: var(--fg); font-weight: 500; }
.founder p .blue { color: var(--blue); font-weight: 500; }

.founder .founder-sign {
  margin: 2rem 0 0;
  letter-spacing: 0;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.founder-sign .founder-name { color: var(--fg); }   /* the site's black, #121212 */

/* "five" counts down to "one" when the paragraph scrolls into view.
   Same motion as React Bits' RotatingText slide: each letter rises in from
   below on a short stagger while the old word leaves upward, and the word's
   width eases to fit. Screen readers always get the plain word. */
.count-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.count-word-roll {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  clip-path: inset(0 -0.3em);          /* hides letters above and below the line only */
  transition: width var(--dur-base) var(--ease-out);
}

.cw-word { display: inline-block; white-space: nowrap; }
.cw-word.is-leaving { position: absolute; left: 0; top: 0; }

.cw-letter {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

/* The "s" of "seconds" folds away while the countdown shows "one". */
.count-s {
  display: inline-block;
  vertical-align: bottom;                /* keeps it on the text baseline while it clips */
  max-width: 1ch;
  overflow: hidden;
  transition: max-width var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.count-s.is-off { max-width: 0; opacity: 0; transform: translateY(-40%); }

.cw-word.is-below .cw-letter { transform: translateY(100%); opacity: 0; transition: none; }
.cw-word.is-gone .cw-letter  { transform: translateY(-120%); opacity: 0; }

/* --- FAQ -------------------------------------------------------------------- */
#faq { padding-bottom: clamp(6rem, 10vw, 8rem); }

.faq-list {
  max-width: 42rem;
  margin-inline: auto;
  text-align: left;
  border-top: 1px solid var(--line);
}

.qa { border-bottom: 1px solid var(--line); }

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.35rem;
  list-style: none;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color var(--dur-fast) var(--ease-out);
}

.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--blue); }

.qa .sign {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  transition: transform var(--dur-base) var(--ease-out);
}

.qa .sign::before,
.qa .sign::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.qa .sign::after { transform: translate(-50%, -50%) rotate(90deg); }
/* With script, .is-open drives the icon so it turns the moment you click,
   not after the closing animation ends. Without script, [open] still works. */
.qa.is-open .sign,
html:not(.js) .qa[open] .sign { transform: rotate(135deg); color: var(--blue); }

.qa .answer { max-width: 36rem; color: var(--fg-muted); font-size: 0.9688rem; }
.qa .answer p { margin: 0 0 1.4rem; }

/* Unveil: the answer's height grows from 0 to its natural size (grid 0fr -> 1fr)
   while the text fades in and settles down from slightly above.
   Closing is quicker than opening so it gets out of the way. */
.js .qa .answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}
.js .qa.is-open .answer {
  grid-template-rows: 1fr;
  transition-duration: var(--dur-slow);
}
.js .qa .answer > p {
  min-height: 0;
  overflow: hidden;
  margin: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
/* Spacing below the answer lives inside the clip (padding would keep a closed row 22px tall). */
.js .qa .answer > p::after { content: ""; display: block; height: 1.4rem; }
.js .qa.is-open .answer > p {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-base) var(--ease-out) calc(var(--dur-press) * 0.6),
    transform var(--dur-slow) var(--ease-out);
}

/* --- Closing band ----------------------------------------------------------- */
.closing { padding-block: 0 clamp(5rem, 9vw, 7rem); }

.closing-card {
  margin-inline: 8px;
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  border-radius: var(--card-radius);
  background: var(--blue);
  color: var(--on-blue);
}

.closing-card h2 { color: var(--on-blue); }
.closing-card p { margin: 1rem auto 2rem; max-width: 34rem; font-size: 1.125rem; color: rgba(255, 255, 255, 0.82); }
/* Same chip style as "See more work": white pill, lift on hover, press on click.
   On the blue band the edge stays white and the shadow is a deeper blue. */
.closing-card .btn {
  min-height: 3.25rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid #fff;
  background: #fff;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  touch-action: manipulation;
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .closing-card .btn:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px -12px rgba(0, 20, 90, 0.7); }
}
.closing-card .btn:active { transform: scale(0.98); transition-duration: var(--dur-press); }
@media (max-width: 640px) { .closing-card .btn { min-height: 3rem; font-size: 0.9688rem; } }

/* --- Footer ----------------------------------------------------------------- */
.footer { padding-block: 3rem 8rem; text-align: center; border-top: 1px solid var(--line); }

.footer-brand { width: 92px; margin: 0 auto 1.25rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.footer-links a:hover { color: var(--blue); }

.footer small { display: block; margin-top: 1.5rem; color: var(--fg-muted); font-size: 0.8rem; }

/* --- Privacy page (/privacy) ------------------------------------------------ */
.legal {
  max-width: calc(42rem + 2 * var(--gutter));
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(4rem, 8vw, 6rem);
  text-align: left;
}
.legal h1 { font-size: clamp(36px, 6vw, 56px); }
.legal h2 { margin: 2.5rem 0 0.75rem; font-size: 1.5rem; line-height: 1.2; }
.legal p:not(.eyebrow), .legal li { color: var(--fg-muted); font-size: 1.0625rem; line-height: 1.65; }
.legal p:not(.eyebrow) { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { margin-bottom: 0.35rem; }
.legal strong { color: var(--fg); font-weight: 500; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal .legal-updated { margin-top: 0.75rem; font-family: var(--mono); font-size: 0.875rem; }

/* Consent note under the booking calendar. */
.consent-note { margin: 0.75rem 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--fg-muted); }
.consent-note a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

/* --- Email chooser ---------------------------------------------------------- */
.mail-menu {
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 232px;
  padding: 0.4rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgba(11, 11, 12, 0.28);
  text-align: left;
  animation: mail-in calc(var(--dur-base) * 1.15) var(--ease-out);  /* 15% longer ease-out */
}

.mail-menu[hidden] { display: none; }

@keyframes mail-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.mail-menu-addr {
  margin: 0;
  padding: 0.45rem 0.75rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--fg-muted);
  user-select: all;
}

.mail-menu-item {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fg);
  text-align: left;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.mail-menu-item:hover,
.mail-menu-item:focus-visible { background: var(--bg-soft); color: var(--blue); }

/* --- Sticky dock ------------------------------------------------------------ */
.dock {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px -12px rgba(11, 11, 12, 0.22);
  transform: translate(-50%, 130%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}

.dock.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }

.dock .to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.5rem;
  padding-inline: 1.1rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.dock .to-top:hover { color: var(--fg); background: var(--bg-soft); }

/* Label + arrow swap as a vertical scroll, like an odometer:
   into "Skip the work" the old line rolls up and out while the new one rolls up from below;
   back to "Go to top" the whole thing rolls down. Each slot clips, so lines never overlap. */
.dock .arrow-slot { position: relative; display: block; width: 13px; height: 13px; flex: none; overflow: hidden; }
.dock .arrow {
  position: absolute;
  inset: 0;
  width: 13px;
  height: 13px;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out);
}
.dock .arrow-down { transform: translateY(110%); opacity: 0; }
.dock .to-top.is-skip .arrow-up { transform: translateY(-110%); opacity: 0; }
.dock .to-top.is-skip .arrow-down { transform: none; opacity: 1; }

.dock .label-slot { display: grid; align-items: center; justify-items: start; overflow: hidden; transition: width var(--dur-slow) var(--ease-out); }
.dock .label {
  grid-area: 1 / 1;
  white-space: nowrap;
  transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur-slow) var(--ease-out);
}
.dock .label-skip { transform: translateY(110%); opacity: 0; }
.dock .to-top.is-skip .label-top { transform: translateY(-110%); opacity: 0; }
.dock .to-top.is-skip .label-skip { transform: none; opacity: 1; }

.dock .btn { height: 2.5rem; border-radius: 999px; }

/* Dock CTA: glows and grows on mouse hover (real pointers only, so it never sticks on touch). */
.dock .btn-blue {
  box-shadow: 0 0 0 0 rgba(0, 59, 255, 0);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .dock .btn-blue:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 4px rgba(0, 59, 255, 0.14), 0 6px 22px 2px rgba(0, 59, 255, 0.45);
  }
}

.dock .btn-blue:active { transform: scale(1.02); transition-duration: var(--dur-press); }

/* --- Responsive ------------------------------------------------------------- */
@media (min-width: 641px) {
  #process { padding-bottom: 4rem; }
  .founder { padding-bottom: 4rem; }
}

@media (max-width: 860px) {
  .masthead-links { display: none; }
  .process-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .masthead { grid-template-columns: 1fr; padding-block: 1.35rem; }
  .masthead-time { display: none; }
  .masthead-brand { grid-column: 1; margin-inline: auto; width: 100px; }

  section { padding-block: 3.5rem; }
  .hero { padding-block: 3rem 3.5rem; }
  .work { padding-block: 2.5rem 3rem; }
  .footer { padding-block: 2.5rem 9rem; }

  h1, h2 { font-size: clamp(34px, 9vw, 60px); line-height: 1.06; }
  .hero h1 br { display: none; }
  .lede { margin-top: 0.9rem; font-size: 18px; }

  .work-pair { grid-template-columns: 1fr; }
  .work-pair .ph { aspect-ratio: 16 / 10; }

  .process-grid { grid-template-columns: 1fr; }
  .process-card { aspect-ratio: auto; }
  .process-art { padding-block: 1.75rem 0.25rem; min-height: 0; }
  .process-art .ph { width: min(46cqi, 160px); }
  .process-art .process-icon { width: min(67cqi, 251px); }

  .founder-portrait { width: 84px; height: 84px; margin-bottom: 1.5rem; }
  .founder p { font-size: 18px; line-height: 1.6; margin-bottom: 1.25rem; }

  .qa summary { padding-block: 1.15rem; font-size: 1rem; }

  .actions { margin-top: 1.75rem; }
  .cta { height: 3.5rem; font-size: 1.125rem; padding-right: 1.5rem; }
  .cta-face, .cta-you { width: 2.65rem; height: 2.65rem; }

  .dock {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    flex-direction: column;
    align-items: stretch;
    padding: 0.3rem;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(140%);
  }
  .dock.is-visible { transform: translateY(0); }
  .dock .to-top { justify-content: center; height: 2.4rem; border-radius: 1.1rem; font-size: 1rem; }
  .dock .btn { height: 2.75rem; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-pulsing { animation: none; box-shadow: 0 0 0 3px rgba(0, 59, 255, 0.35); }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
