/* For-sale film, v2: the firstlastdomains.com look. White page, Outfit, the address-bar pill
   with the yellow globe, Google-style blue buttons, brand colours as accents only. */

@font-face { font-family: Outfit; font-weight: 300; font-display: swap; src: url(../fonts/outfit-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 400; font-display: swap; src: url(../fonts/outfit-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 500; font-display: swap; src: url(../fonts/outfit-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 700; font-display: swap; src: url(../fonts/outfit-latin-700-normal.woff2) format("woff2"); }

:root {
  --ink: #202124;
  --grey: #5F6368;
  --line: #DADCE0;
  --mist: #F8F9FA;
  --blue: #1A73E8;
  --yellow: #FBBC04;
  --red: #D93025;     /* the deeper red/green used for text on the site's heading */
  --green: #188038;
  --paper: #fff;
  --surface: #fff;
  --glass: rgba(255, 255, 255, 0.9);
  --tint: #E8F0FE;            /* pale blue behind "For sale" */
  --on-blue: #fff;
  --blue-hover: #1765CC;
  --word-0: #1A73E8; --word-1: #D93025; --word-2: #E37400; --word-3: #188038;
  --sans: Outfit, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* pill text size; the whole pill scales from this */
  --fs: clamp(26px, 6.4vw, 76px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; }

/* ── stage ─────────────────────────────────────────────────────────────── */
#stage { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, var(--paper) 40%, var(--mist) 100%); }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Everything on the stage is centred on the middle of the screen; film.js moves it from there. */
#stage > :not(canvas) { position: absolute; left: 50%; top: 50%; will-change: transform, opacity; }
/* Until film.js has placed everything (it waits for the font and portraits), keep the pieces hidden:
   unplaced, they'd flash in the top-left corner. render() sets visibility inline from then on. */
html.js body:not(.ready) #stage > :not(canvas) { visibility: hidden; }

.caption {
  margin: 0; transform: translate(-50%, -50%); white-space: nowrap; opacity: 0;
  font-weight: 500; font-size: clamp(22px, 3.6vw, 44px); letter-spacing: -0.03em; color: var(--ink);
}

.pill {
  display: flex; align-items: center; gap: .32em; padding: .3em .7em .3em .46em;
  font-size: var(--fs); line-height: 1; white-space: nowrap;
  background: var(--surface); border: max(2px, .04em) solid var(--line); border-radius: 999px;
  box-shadow: 0 .35em 1.1em rgba(26, 115, 232, 0.12), 0 2px 6px rgba(60, 64, 67, 0.08);
}
.pill__globe { width: .78em; height: .78em; color: var(--yellow); flex: none; }
.pill__text { display: flex; align-items: baseline; letter-spacing: -0.035em; }
.w { position: relative; display: inline-block; }
.w--first .w__t, .w--last .w__t { font-weight: 700; color: var(--ink); }
.w--tld .w__t { font-weight: 300; color: var(--grey); }
/* Underlines + labels for the "first name / last name / the address" beat (the site heading's idea). */
.ul { position: absolute; left: 0; right: 0; bottom: -.16em; height: .07em; border-radius: 1px; transform-origin: 0 50%; transform: scaleX(0); background: currentColor; }
.w--first { color: var(--red); }
.w--last { color: var(--blue); }
.w--tld { color: var(--green); }
.lab {
  position: absolute; left: 50%; top: calc(100% + 1.05em); transform: translateX(-50%); opacity: 0;
  font: normal 500 max(.3em, calc(13px / var(--fit, 1)))/1 var(--sans); letter-spacing: 0; white-space: nowrap; color: currentColor;
}
.caret { display: inline-block; width: .06em; height: .9em; margin-left: .04em; align-self: center; background: var(--blue); border-radius: 1px; }

.sale {
  position: fixed; left: 50%; top: 50%; z-index: 3; opacity: 0; visibility: hidden;
  display: flex; align-items: center; gap: .55em; white-space: nowrap; font-size: clamp(18px, 2.6vw, 30px);
  color: var(--ink); text-decoration: none; padding: .25em .3em .25em .25em; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 22px rgba(60, 64, 67, 0.12);
}
.sale__tag { font-weight: 500; font-size: .7em; color: var(--blue); background: var(--tint); padding: .5em .9em; border-radius: 999px; }
.sale__price { font-weight: 700; letter-spacing: -0.02em; }
.sale__buy { font-weight: 500; font-size: .75em; color: var(--on-blue); background: var(--blue); padding: .55em 1.05em; border-radius: 999px; transition: background .15s; }
.sale:hover .sale__buy, .sale:focus-visible .sale__buy { background: var(--blue-hover); }

/* ── who: the homepage's profession portraits ───────────────────────────── */
.who { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  --face: clamp(96px, min(21vh, 15vw), 190px); --cols: 4; --gx: clamp(18px, 3vw, 44px);
  gap: clamp(14px, 2.4vh, 26px) var(--gx); width: calc(var(--cols) * var(--face) + (var(--cols) - 1) * var(--gx)); }
.who li { width: var(--face); }
.who li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.who__face { display: block; width: var(--face); height: var(--face); border-radius: 50%; transition: box-shadow .25s; }
.who__face svg { display: block; width: 100%; height: 100%; }
/* each profession gets one of the brand colours (film.js sets --c per item and on the caption word) */
.who li.is-now .who__face { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--c, var(--blue)); }
.who__label { font-weight: 500; font-size: clamp(13px, 1.3vw, 17px); color: var(--grey); transition: color .25s; }
.who li.is-now .who__label { color: var(--c, var(--blue)); }
.fl-eye { transform-box: fill-box; transform-origin: center; }
.is-blinking .fl-eye { transform: scaleY(.12); }
.who-slot { display: inline-block; text-align: left; }   /* fixed width (film.js) so only the word changes */
.who-word { color: var(--c, var(--blue)); background: linear-gradient(currentColor, currentColor) 0 100% / 100% .08em no-repeat; padding-bottom: .04em; }

/* ── uses: four little cards ───────────────────────────────────────────── */
.uses { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, auto); gap: clamp(12px, 2vw, 28px); }
.use { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.use__label { font-weight: 500; font-size: clamp(14px, 1.4vw, 18px); color: var(--grey); }
.use__art {
  position: relative; display: block; width: clamp(140px, 16vw, 220px); aspect-ratio: 11 / 8;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(60, 64, 67, 0.10), 0 2px 6px rgba(60, 64, 67, 0.06);
  --c: var(--blue);
}
.use--red .use__art { --c: #EA4335; }
.use--yellow .use__art { --c: var(--yellow); }
.use--green .use__art { --c: #34A853; }
.use__art b { position: absolute; left: 0; right: 0; bottom: 9%; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-weight: 500; font-size: clamp(10px, .95vw, 13px); color: var(--ink); letter-spacing: -0.01em; }
/* email: an envelope with the address on it */
.mail__flap { position: absolute; inset: 0 0 45% 0; background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.use__art--mail { border-top: 6px solid var(--c); }
.mail__to { position: absolute; left: 0; right: 0; bottom: 12%; padding: 0 8px; text-align: center; overflow-wrap: anywhere; line-height: 1.25; font-weight: 500; font-size: clamp(10px, .95vw, 13px); color: var(--ink); }
/* portfolio: a tiny browser window */
.site__bar { position: absolute; inset: 0 0 auto 0; height: 22%; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--mist); border-bottom: 1px solid var(--line); }
.site__bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.site__bar b { position: static; flex: 1; margin-left: 6px; text-align: left; font-size: clamp(9px, .8vw, 11px); background: var(--surface); border-radius: 99px; padding: 2px 8px; color: var(--grey); }
.site__hero { position: absolute; left: 10%; right: 10%; top: 31%; height: 30%; border-radius: 8px; background: var(--c); opacity: .85; }
.site__row { position: absolute; left: 10%; right: 10%; top: 69%; height: 16%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; }
.site__row i { border-radius: 5px; background: var(--line); }
/* business card */
.bcard__mark { position: absolute; left: 10%; top: 16%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.bcard__lines { position: absolute; left: 34%; right: 10%; top: 20%; display: grid; gap: 7px; }
.bcard__lines i { height: 7px; border-radius: 4px; background: var(--ink); opacity: .85; }
.bcard__lines i + i { width: 60%; background: var(--line); opacity: 1; }
.use__art--card { border-bottom: 6px solid var(--c); }
/* résumé */
.cv__head { position: absolute; left: 10%; right: 10%; top: 12%; height: 12%; border-radius: 4px; background: var(--c); }
.cv__lines { position: absolute; left: 10%; right: 25%; top: 32%; display: grid; gap: 6px; }
.cv__lines i { height: 5px; border-radius: 3px; background: var(--line); }
.cv__lines i:nth-child(2n) { width: 75%; }


.brand { transform: none; left: max(18px, 3vmin) !important; top: auto !important; bottom: max(18px, 3vmin); opacity: .9; }
.brand img { display: block; height: clamp(22px, 2.6vw, 30px); width: auto; }

@media (max-aspect-ratio: 9/10) {
  :root { --fs: clamp(22px, 7.6vw, 56px); }
  .uses { grid-template-columns: repeat(2, auto); }
  .use__art { width: clamp(130px, 38vw, 200px); }
  .who { --face: clamp(76px, min(14vh, 26vw), 140px); --cols: 3; --gx: clamp(14px, 4vw, 28px); }
  .brand { display: none; }
}

/* ── for-sale bar (visible from the first frame) ───────────────────────── */
.bar {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 4;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px);
  padding: 6px 6px 6px 20px; border-radius: 999px; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 6px 24px rgba(60, 64, 67, 0.12);
  animation: bar-in 0.7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes bar-in { from { opacity: 0; transform: translate(-50%, -14px); } }
.bar-domain { font: 700 clamp(15px, 1.7vw, 19px)/1 var(--sans); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar-tag { font: 500 13px/1 var(--sans); color: var(--blue); background: var(--tint); padding: 7px 11px; border-radius: 999px; }
.bar-price { font: 700 clamp(15px, 1.7vw, 19px)/1 var(--sans); }
.bar-buy {
  font: 500 15px/1 var(--sans); color: var(--on-blue); text-decoration: none; background: var(--blue);
  padding: 11px 18px; border-radius: 999px; transition: background 0.15s;
}
.bar-buy:hover, .bar-buy:focus-visible { background: var(--blue-hover); }
:where(a, button):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (max-width: 460px) {
  .bar { gap: 8px; padding-left: 14px; }
  .bar-price { display: none; }
  .bar-buy { padding: 10px 13px; font-size: 14px; }
}
@media (max-width: 360px) { .bar-buy { display: none; } .bar { padding-right: 14px; } }
@media (prefers-reduced-motion: reduce) { .bar { animation: none; } }

/* ── skip ─────────────────────────────────────────────────────────────── */
.skip {
  position: fixed; right: max(16px, 3vmin); bottom: max(16px, 3vmin); z-index: 3;
  font: 500 14px/1 var(--sans); color: var(--grey); background: var(--glass);
  border: 1px solid var(--line); padding: 11px 16px; border-radius: 999px; cursor: pointer; opacity: 0;
  transition: opacity 0.4s, color 0.15s, border-color 0.15s;
}
.skip:hover, .skip:focus-visible { color: var(--blue); border-color: var(--blue); }
body.ready.playing .skip { opacity: 1; }
body:not(.playing) .skip { pointer-events: none; }

/* ── end card ─────────────────────────────────────────────────────────── */
.card {
  position: fixed; left: 0; right: 0; top: 50%; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 3vh 20px max(16px, env(safe-area-inset-bottom)); text-align: center; overflow-y: auto;
}
html.js .card { opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1); }
html.js body.show-card .card { opacity: 1; transform: none; pointer-events: auto; }

.card > * { margin: 0; }
.kicker { font-size: clamp(14px, 1.5vw, 17px); font-weight: 500; color: var(--grey); }
.price { margin-top: .25em; font: 700 clamp(40px, 6vw, 68px)/1 var(--sans); letter-spacing: -0.04em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.btn {
  font: 500 17px/1 var(--sans); color: var(--blue); text-decoration: none; cursor: pointer;
  padding: 15px 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover, .btn:focus-visible { background: var(--tint); border-color: var(--blue); }
.btn.primary { background: var(--blue); color: var(--on-blue); border-color: var(--blue); box-shadow: 0 6px 18px rgba(26, 115, 232, 0.25); }
.btn.primary:hover, .btn.primary:focus-visible { background: var(--blue-hover); }
.btn.ghost { border-color: transparent; color: var(--grey); background: transparent; }
.btn.ghost:hover { color: var(--blue); background: transparent; }
.legal { margin-top: auto; padding-top: 18px; max-width: 78ch; font-size: 12px; line-height: 1.6; color: var(--grey); }
.legal a { color: var(--blue); }
.offered { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--grey); }
.offered img { display: block; height: 24px; width: auto; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-aspect-ratio: 9/10) { .card { top: 44%; } }
@media (max-height: 600px) { .offered { display: none; } .actions { margin-top: 12px; } }

/* Dark mode: follows the system setting, like firstlastdomains.com (same Google dark surfaces). */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #E8EAED; --grey: #9AA0A6; --line: #3C4043; --mist: #17181A;
    --blue: #8AB4F8; --yellow: #FDD663; --red: #F28B82; --green: #81C995;
    --paper: #202124; --surface: #303134; --glass: rgba(48, 49, 52, 0.9);
    --tint: rgba(138, 180, 248, 0.16); --on-blue: #202124; --blue-hover: #AECBFA;
    --word-0: #8AB4F8; --word-1: #F28B82; --word-2: #FDD663; --word-3: #81C995;
  }
  .pill { border-color: #5F6368; }
}
