/* clankford.ie home page only, the top (round 40, C4 "Hello, side by side"; Michal, 22 and 23 Oct 2026:
   "Brilliant! Actually, I love it."). Loaded after home.css by lib/clankford-site.js. Ported from the mockup
   /home/studio/clankford-ie-samples/round39/c4/parts/c4.css.
   .meet    the top: Clankford's greeting on the left (the face in the brand mark's ring, the H1 as its own
            words, one line, the way to a person) and the chat window on the right, in the real chat's blocks
            (.msg, .proposal and the face from site.css), ending in the one box. The window is the real chat:
            the second mount of the ONE engine in site.js, beside the dialog.
   .rules   "My house rules": three rules in Clankford's own words, and a fourth that is yours, shown as the
            product's own "Learned from you" card (.qa-learn from site.css).
   The week under them keeps its rules in home.css. Tokens only, one accent (cyan). Barlow for H1 and H2
   only, Inter for everything else.
   Front door: vault/Workspaces/clank-websmith/projects/clankford-ie/PROJECT.md */

:root {
  --bot-face: #7cc6f0;                   /* design-check-ignore: the demo's lit robot (.demo .bot --bot-lit) */
  --bot-eye: #e6f7ff;                    /* design-check-ignore: the demo's robot eye (.demo .bot --bot-eye) */
}

/* ── the top: words left, the chat right ─────────────────────────────── */
.meet { padding: clamp(24px, 2.4vw, 32px) 0 clamp(52px, 6vw, 76px); }
/* side by side, the top fills the first screen: the greeting and the chat sit in the middle of it, with air round them */
@media (min-width: 901px) and (min-height: 640px) {
  .meet { display: grid; align-content: center; min-height: min(calc(100svh - 73px), 54rem); padding-bottom: 28px; }
}
.meet__grid {
  display: grid; grid-template-columns: minmax(17rem, 1fr) minmax(0, 44rem); grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(40px, 5vw, 96px); align-items: center;
}
/* in the page the conversation and its box come before "Rather talk to a person?"; here the person line is put
   back under the greeting, and the pair is centred against the chat */
.meet__say { grid-column: 1; grid-row: 2; }
.hello__person { grid-column: 1; grid-row: 3; align-self: start; }
.talk { grid-column: 2; grid-row: 1 / 5; }
.talk__intro { display: none; }
/* the greeting sits level with the middle of the chat, so neither side leaves a hole */
.meet__say { min-width: 0; }
.hello__who { display: flex; align-items: center; gap: 22px; min-width: 0; }

/* the face: the robot inside the brand mark's ring (a faint ring, a cyan arc over the top right) */
.hello__face { --face: 112px; --ring: 10px; position: relative; flex: none; width: var(--face); height: var(--face); margin: var(--ring); }
.hello__face::before,
.hello__face::after { content: ''; position: absolute; inset: calc(-1 * var(--ring)); border-radius: 50%; pointer-events: none; }
.hello__face::before { border: 1px solid var(--hud-faint); transition: border-color 0.15s var(--ease); }
.hello__face::after { border: 2px solid transparent; border-top-color: var(--hud); border-right-color: var(--hud); }
.hello__disc {
  position: absolute; inset: 0; overflow: hidden; border-radius: 50%;
  background: var(--hud-shell-far); border: 1px solid var(--hud-soft);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.hello__bot { display: block; width: 100%; height: 100%; max-width: none; }
.hello__bot .b-body { fill: var(--bot-face); }
.hello__bot .b-limb { fill: var(--hud-steel); }
.hello__bot .b-ring, .hello__bot .b-pix { fill: var(--hud); }
.hello__bot .b-core, .hello__bot .b-visor { fill: var(--hud-bg); }
.hello__bot .b-eye { fill: var(--bot-eye); }
.hello__bot .b-ant { fill: var(--bot-face); transition: fill 0.15s var(--ease); }
/* listening: while the box on the right has focus or holds words, the antenna lights and the ring comes on,
   the way a robot on the Floor lights when it is working */
.hello__face.is-listening::before { border-color: var(--hud-soft); }
.hello__face.is-listening .hello__disc { border-color: var(--hud); box-shadow: 0 0 26px var(--hud-faint); }
.hello__face.is-listening .b-ant { fill: var(--hud); }
.hello__face.is-listening .b-eye { fill: var(--hud-text); }

.hello__by { max-width: 15em; margin: 0; font-size: 0.95rem; line-height: 1.4; color: var(--hud-dim); }

/* the greeting small, the question the one big thing on the left */
.meet__say h1 { margin-top: 26px; max-width: 11em; font-size: clamp(2.6rem, 4.6vw, 4.8rem); line-height: 1.02; }
.hello__hi { display: block; margin-bottom: 0.14em; font-size: 0.62em; line-height: 1.1; color: var(--hud-dim); }
.hello__lead { max-width: 40ch; margin-top: 22px; font-size: clamp(1.08rem, 1.3vw, 1.2rem); line-height: 1.55; color: var(--hud-dim); }
.hello__person { max-width: none; margin: 26px 0 0; font-size: 1rem; line-height: 1.5; color: var(--hud-dim); }
.hello__person a { color: var(--hud-text); font-weight: 600; white-space: nowrap; }
.hello__person a:hover { color: var(--hud-bright); }

/* the face wakes once, on the first view: the arc turns into place, the eye comes on. Under
   half a second, never again. Reduced motion: the face is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .js .hello__face::after { animation: hello-arc 0.45s var(--ease) 0.1s both; }
  .js .hello__bot .b-eye { transform-box: fill-box; transform-origin: center; animation: hello-eye 0.3s var(--ease) 0.35s both; }
}
@keyframes hello-arc { from { transform: rotate(-110deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hello-eye { from { transform: scaleX(0); } to { transform: none; } }

/* the chat window: the real one's shell, calm. One border round the window, none inside it: the head and the
   thread are told apart by tone and by air, not by lines */
.talk { min-width: 0; margin: 0; }
.talk__win {
  border: 1px solid var(--hud-soft); border-radius: 10px; background: var(--hud-shell);
  box-shadow: 0 0 0 1px var(--hud-wash), 0 0 40px var(--hud-faint);
  overflow: hidden;
}
.talk__head {
  display: flex; align-items: center; gap: 16px; padding: 16px 28px;
  background: var(--hud-shell-far); scroll-margin-top: 88px;
}
.talk__face, .rules__face {
  display: grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--hud-bg); border: 1px solid var(--hud); box-shadow: 0 0 16px var(--hud-faint); --bot-alpha: 1;
}
.talk__face { width: 58px; height: 58px; }
.talk__face .bot { width: 46px; height: 46px; }
.talk__who { min-width: 0; flex: 1 1 auto; }
.talk__name { font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.talk__with { font-size: 0.9rem; line-height: 1.35; color: var(--hud-dim); }
/* the quiet tag, and the way back to the example once a conversation has begun */
.talk__tag { flex: none; margin: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud-dim); }
.talk__again {
  flex: none; min-height: 28px; margin: 0; padding: 2px 6px; background: none; border: 0; border-radius: 4px;
  font: 600 0.92rem/1.3 var(--body); color: var(--hud-dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.talk__again:hover { color: var(--hud-text); }
.talk__again:focus-visible { outline: 2px solid var(--hud); outline-offset: 2px; }

.talk__thread { display: grid; align-content: start; gap: 20px; padding: 28px 28px 26px; }
.talk__example { display: grid; gap: 20px; transition: opacity 0.25s var(--ease); }
.talk__example[hidden] { display: none; }
/* a short window: the thread scrolls inside the window, like the real chat, held at its latest line,
   so the box is always on the first screen (the script makes it focusable only when it scrolls) */
@media (min-width: 901px) {
  .js .talk__thread { max-height: max(340px, calc(100svh - 300px)); overflow-y: auto; overscroll-behavior: contain; }
  /* once a conversation has begun the window keeps the example's height (the conversation scrolls inside it, as in
     any chat), so nothing round it moves */
  .js .talk.is-live .talk__thread { height: min(var(--thread-h, 440px), max(340px, calc(100svh - 300px))); }
}
.talk__thread:focus-visible { outline: 2px solid var(--hud); outline-offset: -2px; }
.talk .msg { max-width: 86%; }
.talk .msg--you { max-width: 92%; }
.talk .msg__box { padding: 12px 18px; font-size: 1rem; line-height: 1.55; border: 0; }
.talk .msg--card { width: 100%; max-width: 86%; }
.talk .msg--card .proposal { grid-column: 2; }
.talk .msg--cf { gap: 12px; grid-template-columns: 30px minmax(0, 1fr); }
.talk .msg__who { border: 0; background: var(--hud-bg); }

/* the visitor starts: the example steps back, still readable */
.talk.is-engaged .talk__example { opacity: 0.68; }

/* the price card, simple: the job, the two figures in one row, one small line. One border, no lines inside */
.proposal--mini { margin-top: 0; padding: 18px 22px 16px; border: 1px solid var(--hud-faint); border-radius: 10px; background: var(--hud-shell-far); box-shadow: none; }
.proposal--mini .proposal__title { margin: 0; font-family: var(--body); font-size: 1.12rem; font-weight: 600; line-height: 1.3; color: var(--hud-text); }
.proposal--mini .proposal__figs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 34px; max-width: none; margin: 10px 0 0; }
.proposal--mini .proposal__fig { font-size: 0.98rem; color: var(--hud-dim); white-space: nowrap; }
.proposal--mini .proposal__fig b { margin-right: 2px; font-family: var(--display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; color: var(--hud-text); }
.proposal--mini .proposal__fine { max-width: none; margin: 12px 0 0; padding: 0; font-size: 0.85rem; color: var(--hud-dim); }

/* what the visitor sends and what comes back, in this window */
.talk__note { max-width: 36em; margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--hud-dim); }
.talk__note a { color: var(--hud-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.talk__note a:hover { color: var(--hud-bright); }
/* "Send us this chat": a button (it opens the dialog on this conversation, at its enquiry step) dressed as the
   link beside it */
.talk__link {
  display: inline; margin: 0; padding: 0; background: none; border: 0; border-radius: 2px;
  font: inherit; font-weight: 600; color: var(--hud-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.talk__link:hover { color: var(--hud-bright); }
.talk__link:focus-visible { outline: 2px solid var(--hud); outline-offset: 2px; }

/* the box: the visitor's turn. A real text box in a real chat; Ask Clankford (Enter) sends here, in this window */
.talk__box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  padding: 4px 28px 26px; background: var(--hud-shell);
}
.talk__input {
  min-width: 0; min-height: 52px; margin: 0; padding: 0 16px;
  background: var(--hud-bg); color: var(--hud-text);
  border: 1px solid var(--hud); border-radius: 6px;
  font: 400 1rem/1.4 var(--body);
}
.talk__input::placeholder { color: var(--hud-dim); opacity: 1; }
.talk__input:focus-visible { outline: 2px solid var(--hud); outline-offset: 2px; }
.talk__input:disabled { opacity: 0.6; }
.talk__go { min-height: 52px; }
/* while Clankford is answering, and once the chat has ended, the button says so */
.talk__go:disabled { opacity: 0.6; cursor: default; }
.talk__hint { grid-column: 1 / -1; margin: 0; font-size: 0.92rem; line-height: 1.4; color: var(--hud-text); }
.talk__hint:empty { display: none; }
.talk__cap { margin-top: 12px; font-size: 0.95rem; line-height: 1.5; color: var(--hud-dim); }
.talk__cap [hidden] { display: none; }
.talk__cap a { color: var(--hud-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 901px) { .talk__cap { min-height: 3.2em; } }

/* the example plays once (about 4 seconds in all, then still): Clankford types, its answer arrives, the price card,
   and the box lights once for your turn. Reduced motion, or no script: the finished example. The words are in the
   page from the start, so a screen reader has them all. */
.talk__step--1 .msg__box { position: relative; }
.talk__dots { display: none; position: absolute; left: 20px; top: 24px; gap: 5px; transform: translateY(-50%); }
.talk__dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--hud-dim); }
@media (prefers-reduced-motion: no-preference) {
  .js .talk:not(.is-on) .talk__step { opacity: 0; }
  .talk.is-on .talk__step--1 { animation: talk-in 0.35s var(--ease) 0.4s both; }
  .talk.is-on .talk__step--1 .talk__words { animation: talk-fade 0.3s var(--ease) 1.9s both; }
  .talk.is-on .talk__step--1 .talk__dots { display: flex; animation: talk-out 0.2s linear 1.9s both; }
  .talk.is-on .talk__dots i { animation: talk-dot 0.7s ease-in-out 0.4s 2 both; }
  .talk.is-on .talk__dots i:nth-child(2) { animation-delay: 0.55s; }
  .talk.is-on .talk__dots i:nth-child(3) { animation-delay: 0.7s; }
  .talk.is-on .talk__step--2 { animation: talk-in 0.4s var(--ease) 2.3s both; }
  .talk.is-on:not(.is-engaged) .talk__input { animation: talk-turn 1.4s var(--ease) 2.9s both; }
}
@keyframes talk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes talk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes talk-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes talk-dot { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes talk-turn {
  0% { box-shadow: 0 0 0 0 transparent; }
  35% { box-shadow: 0 0 0 4px var(--hud-soft), 0 0 22px var(--hud-glow); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ── the house rules, a band under both ──────────────────────────────── */
.rules { padding: clamp(56px, 6vw, 84px) 0; border-top: 1px solid var(--hud-faint); background: var(--band); }
.rules__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  gap: 44px clamp(48px, 6vw, 112px); align-items: start;
}
.rules__h { display: flex; align-items: center; gap: 18px; }
.rules__face { width: 56px; height: 56px; }
.rules__face .bot { width: 42px; height: 42px; }
.rules__list { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hud-faint); }
.rule {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 40px; align-items: baseline;
  margin: 0; padding: 22px 0; border-bottom: 1px solid var(--hud-faint);
}
.rule__say { max-width: none; font-size: clamp(1.35rem, 2vw, 1.85rem); font-weight: 600; line-height: 1.3; color: var(--hud-text); text-wrap: balance; }
.rule__how { max-width: 38ch; font-size: 1.02rem; line-height: 1.5; color: var(--hud-dim); }
/* yours: level with the heading, the product's own card for a rule an owner taught it */
.rules__yours { padding-top: 12px; }
.rules__learn { margin-top: 20px; }
.rules__yours .rule__how { margin-top: 16px; }

/* ── narrower ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .meet__say h1 { font-size: clamp(2.4rem, 4.3vw, 3.4rem); }
  .rule { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .meet__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 0; }
  .meet__say h1 { font-size: clamp(2.5rem, 8vw, 3.4rem); }
  .rules__grid { grid-template-columns: minmax(0, 1fr); }
  .rules__yours { padding-top: 0; }

  /* Stacked, the box is the answer to the greeting: it sits straight under the lead line, then "Rather talk to a
     person?", then "Here's how a chat with me goes" and the example. It is the SAME box as on a wide screen (one
     element, inside the chat window in the page): the three wrappers stop making boxes, so the greeting's
     lines, the window's parts and the person line are all items of one column, and order sets the sequence.
     Once a conversation has begun (.is-live) the box drops under the conversation, as in any chat. */
  .meet__say, .talk, .talk__win { display: contents; }
  .hello__who { order: 1; }
  .meet__say h1 { order: 2; }
  .hello__lead { order: 3; }
  .talk__box { order: 4; margin-top: 28px; padding: 0; background: none; }
  .hello__person { order: 5; grid-column: 1; grid-row: auto; margin-top: 22px; }
  .talk__intro { order: 6; display: block; max-width: none; margin: 52px 0 14px; font-size: 1.3rem; font-weight: 600; line-height: 1.3; color: var(--hud-text); }
  .talk__head { order: 7; }
  .talk__thread { order: 8; }
  .talk__cap { order: 10; }
  .talk.is-live .talk__intro { display: none; }
  .talk.is-live .talk__box { order: 9; margin-top: 16px; }
  .talk.is-live .talk__head { margin-top: 44px; }
  /* the window's frame, drawn on its head and its thread now they are separate pieces */
  .talk__head, .talk__thread { border: 1px solid var(--hud-soft); box-shadow: 0 0 0 1px var(--hud-wash), 0 0 40px var(--hud-faint); }
  .talk__head { border-radius: 10px 10px 0 0; border-bottom: 0; }
  .talk__thread { border-top: 0; border-radius: 0 0 10px 10px; background: var(--hud-shell); }
}
@media (max-width: 560px) {
  .hello__face { --face: 76px; --ring: 7px; }
  .hello__who { gap: 18px; }
  .talk__head { padding: 14px 18px; gap: 14px; }
  .talk__thread { padding: 22px 18px 22px; gap: 16px; }
  .talk .msg { max-width: 94%; }
  .talk .msg--card { max-width: 100%; }
  .talk .msg__box { padding: 11px 15px; }
  .proposal--mini { padding: 16px 16px 14px; }
  .proposal--mini .proposal__figs { gap: 4px 26px; }
  .talk__box { grid-template-columns: minmax(0, 1fr); }
}
