/* Riff 016: the launch candidate. Marko's pick from 015 (A · Big strip, option 06, client
   logos in the corner) with his notes of 17 Nov: the liquid-metal HUESET in the header, a
   hue gradient on Book a call (Display P3), no hue line, the header logo growing into the
   About sheet, only the latest work in the strip, and no case studies yet. */

main, .works, .intro, .art { transition: none; }
.hue-edge { display: none; }

/* Layout: a tall strip, then one row with the words left and the clients right. */
.works img, .works video { height: clamp(180px, 48vh, 560px); }
main { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto 1fr; column-gap: clamp(24px, 4vw, 64px); }
.works { grid-column: 1 / -1; }
.intro { grid-template-columns: 1fr; row-gap: 22px; align-content: end; justify-content: start; padding-bottom: 0; }
.intro-action { justify-content: start; }
.l-clients { align-self: end; justify-self: end; text-align: right; }
.l-clients span { display: block; margin-bottom: 14px; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.l-clients div { display: grid; grid-template-columns: repeat(3, auto); gap: 18px 34px; justify-content: end; align-items: center; }
.l-clients img { height: clamp(15px, 2vh, 20px); width: auto; opacity: .75; }
body.light .l-clients img { filter: invert(1); opacity: .8; }

/* The header logo: the page's liquid-metal wordmark (Paper shader) in the strip's corner,
   where the H was. The H keeps its box, unseen, so the rest of 010 still finds it. */
.works-mark { visibility: hidden; }
.art { --w: clamp(150px, 13vw, 210px); position: absolute; z-index: 2; left: calc(50% - 50vw + 20px); top: calc(20px + clamp(180px, 48vh, 560px) * .05 - var(--w) / 12.25); width: var(--w); margin: 0; padding: 0; pointer-events: none; }

/* Book a call: a third of the hue line at a time, sliding slowly from its start to its
   end and round again. The stops are Display P3 where the screen can show them. */
.cta { background-image: linear-gradient(90deg, hsl(0 100% 60%), hsl(60 100% 60%), hsl(120 100% 60%), hsl(180 100% 60%), hsl(240 100% 60%), hsl(300 100% 60%), hsl(360 100% 60%)); background-size: 300% 100%; background-repeat: repeat-x; animation: cta-hues 26s linear infinite; }
@supports (color: color(display-p3 1 0 0)) {
  .cta { background-image: linear-gradient(90deg in display-p3, color(display-p3 1 .2 .2), color(display-p3 1 1 .2), color(display-p3 .2 1 .2), color(display-p3 .2 1 1), color(display-p3 .2 .2 1), color(display-p3 1 .2 1), color(display-p3 1 .2 .2)); }
}
.reveal .cta { animation: intro-rise 700ms 800ms cubic-bezier(.22, 1, .36, 1) both, cta-hues 26s linear infinite; }
@keyframes cta-hues { from { background-position-x: 0%; } to { background-position-x: 150%; } }
@media (prefers-reduced-motion: reduce) { .cta, .reveal .cta { animation: none; } }

/* About, without a cut: the header logo grows into the top of the letter, as wide as the
   text column, and shrinks back when About closes (launch.js). The sheet's own H is not
   needed, and the letter's project names are plain words until the case studies return. */
.about .about-mark { display: none; }
.ab-logo-slot { width: 100%; aspect-ratio: 669 / 109.2; margin-bottom: clamp(28px, 5vh, 56px); }
.art.to-about { position: fixed; z-index: 12; transform-origin: 0 0; will-change: transform; }
.art.to-about.fly { transition: transform 760ms cubic-bezier(.22, 1, .36, 1); }
.about .ab-letter .ab-work { pointer-events: none; border-bottom: 0; cursor: text; }
.about .ab-peek { display: none; }

/* No case studies yet: the strip is for looking and dragging only. */
.works { cursor: grab; }

@media (max-width: 700px) {
  main { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; }
  .works img, .works video { height: clamp(170px, 34vh, 320px); }
  .l-clients { justify-self: start; text-align: left; margin-top: 28px; }
  .l-clients div { justify-content: start; }
  .art { --w: 128px; position: fixed; z-index: 5; left: 14px; top: calc(27px - var(--w) / 12.25); }
}

/* Light theme: the button's label stays dark on the bright gradient (it was taking the
   page colour, which is light there), and its hover fill stays dark too. */
.cta { color: #141414; }
.cta:hover { color: var(--cta); }
body.light .cta::before { background: #141414; }

/* Light theme: the same liquid metal, inverted to dark chrome so it reads on the pale page. */
body.light .art .paper-logo { filter: invert(1) hue-rotate(180deg); }

/* About: the second paragraph is as white as the first (was softer). */
.about .ab-letter .soft { color: var(--paper); }

/* Tooltip on the home page's client logos (the ones with a note). */
.l-clients img[data-note] { cursor: default; outline: none; transition: opacity 200ms ease; }
.l-clients img[data-note]:hover, .l-clients img[data-note]:focus { opacity: 1; }
.l-tip { position: fixed; z-index: 8; left: 0; top: 0; width: min(280px, calc(100vw - 24px)); margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--paper) 16%, transparent); background: color-mix(in srgb, var(--ink) 82%, var(--paper)); color: var(--paper); font-size: 13px; line-height: 1.45; text-align: left; box-shadow: 0 12px 40px rgb(0 0 0 / .35); pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity 180ms ease, transform 260ms cubic-bezier(.22, 1, .36, 1); }
.l-tip.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .l-tip { transition: opacity 120ms ease; transform: none; } }

/* About: no notes on the logo cards for now (they return with proper copy later). */
.about .ab-logos p { display: none; }
.about .ab-logos li.has-note:hover img, .about .ab-logos li.has-note:focus img { opacity: 1; transform: none; }
.about .ab-logos li.has-note:hover, .about .ab-logos li.has-note:focus { border-color: var(--line); background: color-mix(in srgb, var(--paper) 3%, transparent); }
body.light .l-tip { background: #fbfbf8; border-color: rgb(0 0 0 / .1); box-shadow: 0 12px 36px rgb(0 0 0 / .12); }

/* About page content: stats under the letter, then sections with a small label on top. */
.ab-stats, .ab-rest { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter, 20px); color: var(--paper); transition: opacity 420ms ease 160ms, transform 560ms cubic-bezier(.22, 1, .36, 1) 160ms; }
.about:not(.shown) .ab-stats, .about:not(.shown) .ab-rest { opacity: 0; transform: translateY(22px); }
.ab-stats { list-style: none; margin-top: clamp(40px, 7vh, 72px); margin-bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ab-stats li { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.ab-stats strong { font-weight: 400; font-size: clamp(32px, 4.4vw, 56px); line-height: 1; letter-spacing: -.03em; }
.ab-stats span { color: var(--muted); font-size: 14px; }
.about .ab-clients { margin-top: clamp(48px, 8vh, 88px); }
.ab-rest { margin-top: clamp(64px, 11vh, 120px); padding-bottom: clamp(72px, 12vh, 140px); display: grid; gap: clamp(56px, 9vh, 104px); }
.ab-rest h3 { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.ab-rest p { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; letter-spacing: -.01em; }
.ab-rest p + p { margin-top: 1em; }
.ab-ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
.ab-ways li { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line); }
.ab-ways strong { font-weight: 400; font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -.01em; }
.ab-ways span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.ab-quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ab-quotes figure { margin: 0; display: grid; gap: 22px; align-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--paper) 3%, transparent); }
.ab-quotes blockquote { margin: 0; font-size: 16px; line-height: 1.45; }
.ab-quotes figcaption { font-size: 14px; }
.ab-quotes figcaption span { display: block; color: var(--muted); }
.ab-rest .ab-end { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ab-end a { color: inherit; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.ab-end a:hover { color: var(--cta); }
@media (max-width: 700px) { .ab-stats { grid-template-columns: 1fr; } .ab-ways, .ab-quotes { grid-template-columns: 1fr; } }

/* The earlier letter paragraphs (project list) are replaced by the sections above. */
.about .ab-more-text { display: none; }

/* Phones: the client logos get their own full-width block under the works, left aligned,
   three even columns (they were pushed right and cut off by the strip). */
@media (max-width: 700px) {
  .page main > .l-clients { order: 3; align-self: stretch; margin: 2px 0 0; padding: 0 0 12px; text-align: left; }
  .page main > .works { margin-top: 26px; }
  .l-clients span { margin-bottom: 18px; }
  .l-clients div { grid-template-columns: repeat(3, 1fr); gap: 26px 16px; justify-content: stretch; justify-items: start; }
  .l-clients img { height: 18px; max-width: 100%; object-fit: contain; object-position: left center; }
}

/* About's logo, full width of the sheet (about-logo.js): riff 006's 3D letters and motion
   with the home page's Paper Liquid Metal as their surface. If WebGL is missing, a flat wordmark shows. */
.ab-glass { position: relative; width: 100%; aspect-ratio: 619 / 150; margin-top: clamp(28px, 6vh, 72px); }
.ab-glass .ab-logo-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 160ms ease; cursor: pointer; }
.ab-glass .ab-logo-canvas.ready { opacity: 1; }
/* Paper's Liquid Metal is drawn here, unseen, and used as the texture on the 3D letters. */
.ab-metal-source { position: fixed; left: 0; top: 0; width: clamp(900px, 100vw, 1400px); opacity: 0; pointer-events: none; z-index: -1; } /* at least 900px so phones get a sharp texture too */
.ab-glass.flat { background: var(--paper); -webkit-mask: url("./assets/hueset-wordmark.svg") center / 92% auto no-repeat; mask: url("./assets/hueset-wordmark.svg") center / 92% auto no-repeat; }
.about .ab-logo-slot { display: none; }
.about .ab-letter { margin-top: clamp(20px, 4vh, 48px); }

/* Testimonials: on hover (or focus, which a tap gives) the person appears large in the
   card's bottom right corner, cut out of their photo: white where the photo is light,
   see-through elsewhere, standing on the card's bottom edge. */
.ab-quotes figure { position: relative; overflow: hidden; min-height: 250px; outline: none; transition: border-color 250ms ease, background-color 250ms ease; }
.ab-quotes figure:hover, .ab-quotes figure:focus-visible { border-color: color-mix(in srgb, var(--paper) 45%, transparent); background: color-mix(in srgb, var(--paper) 6%, transparent); }
.ab-quotes blockquote, .ab-quotes figcaption { position: relative; z-index: 1; }
.ab-quotes figcaption { max-width: calc(100% - 150px); } /* the name and role keep clear of the face */
.ab-quotes .ab-face { position: absolute; z-index: 0; right: 0; bottom: 0; height: min(66%, 172px); width: auto; opacity: 0; transform: translateY(14px); transform-origin: 100% 100%; transition: opacity 240ms ease, transform 420ms cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
.ab-quotes figure:hover .ab-face, .ab-quotes figure:focus .ab-face { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ab-quotes .ab-face { transition: opacity 200ms ease; transform: none; } }

/* Founders: the names are slightly dimmed (no underline); hovering one shows the photo. */
.ab-founder { opacity: .72; cursor: default; outline: none; transition: opacity 200ms ease; }
.ab-founder:hover, .ab-founder:focus { opacity: 1; }
.ab-founder-face { position: fixed; z-index: 12; left: 0; top: 0; width: clamp(120px, 12vw, 168px); height: auto; aspect-ratio: 1; border-radius: 14px; background: #fff; box-shadow: 0 14px 44px rgb(0 0 0 / .4); opacity: 0; transform: translateY(8px) scale(.96); transition: opacity 180ms ease, transform 300ms cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
.ab-founder-face.on { opacity: 1; transform: none; }

/* Desktop (16 Nov): the liquid-metal HUESET moved out of the strip's corner into the right
   column, large, above the client logos. Phones keep it in the top bar. */
@media (min-width: 701px) {
  /* Its top is set from launch.js (--art-top) so it lines up with the top of the headline's letters. */
  .page main > .art { position: relative; left: auto; top: auto; grid-column: 2; grid-row: 2; align-self: start; justify-self: end; width: 80%; max-width: 720px; margin: var(--art-top, 0px) 0 0; padding: 0; }
  .l-clients { grid-column: 2; grid-row: 2; }
}

/* Light theme is off for now (16 Nov): the switch is hidden, the page is dark only.
   Delete this rule to bring it back. */
.theme-switch { display: none !important; }

/* About's logo sits as far from the top of the sheet as from its sides (about 1% of the
   width). The numbers: the letters start 4.12% of the width below the canvas top and 0.98%
   in from the sides; the sticky top bar above is 84px tall (72px on phones). The close
   button now lies over the logo's corner, so it gets a dark, blurred disc to stay readable,
   and the bar lets clicks through to the logo. */
@media (min-width: 701px) { .about .ab-glass { margin-top: calc(-3.14vw - 84px); } }
.about .lb-top { pointer-events: none; }
.about .lb-top .lb-close { pointer-events: auto; background: rgb(10 10 10 / .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* Phones keep the logo under the close button (it would cover the T there). */

/* Book a call only for now (16 Nov): the email button on the home page and the email link
   at the end of About are hidden. Delete this rule to bring them back. */
.intro-action .cta-ghost, .ab-end a[href^="mailto:"] { display: none; }

/* Book a call at the smaller size of the earlier versions (was 20px type, 20px 32px padding). */
.intro-action .cta { padding: 13px 22px; font-size: 16px; gap: 8px; min-height: 46px; }

/* While a sheet is open the page underneath holds still (less work under the sheet's blur). */
.lightbox-open .page .cta { animation-play-state: paused; }
