/* Bismillah
   ============================================================
   YandiDesigns — base stylesheet
   Graphite and gold, matching the tools themselves.
   Playfair Display for headings, Atkinson Hyperlegible for text.
   ============================================================ */

/* ---------- fonts, all served from this folder ---------- */

@font-face {
  font-family: 'YD Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('yd-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('yd-display-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'YD Text';
  font-weight: 400;
  font-display: swap;
  src: url('yd-text-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 400;
  font-display: swap;
  src: url('yd-text-400-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 700;
  font-display: swap;
  src: url('yd-text-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'YD Text';
  font-weight: 700;
  font-display: swap;
  src: url('yd-text-700-latinext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The greeting above the front page headline turns through several languages,
   and Atkinson Hyperlegible has no kana or hangul. These two files carry just
   the letters those greetings use, a few kilobytes each, so the site still asks
   nobody else for anything. The ranges are whole blocks rather than the exact
   letters, so a later greeting in the same script falls through to the visitor's
   own font instead of breaking.

   A greeting that needs letters these files do not hold has to be cut again from
   Google Fonts with the new text, which is why this note is here. */
@font-face {
  font-family: 'YD Greet JP';
  font-weight: 500;
  font-display: swap;
  src: url('yd-greet-jp.woff2') format('woff2');
  unicode-range: U+3040-30FF;
}
@font-face {
  font-family: 'YD Greet KR';
  font-weight: 500;
  font-display: swap;
  src: url('yd-greet-kr.woff2') format('woff2');
  unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7AF;
}

/* ============================================================
   Tokens. These are the same values the tools use, so a tool
   opened from this site feels like part of it rather than a
   separate thing.
   ============================================================ */

:root {
  --yd-font:    'YD Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --yd-font-dp: 'YD Display', Georgia, 'Times New Roman', serif;
  --yd-font-ar: 'Segoe UI', 'Noto Naskh Arabic', 'Traditional Arabic', serif;
  /* the two greeting faces sit right after the text face, ahead of system-ui,
     because on some systems system-ui already carries its own fallback for kana
     and would answer before these were ever asked */
  --yd-font-greet: 'YD Text', 'YD Greet JP', 'YD Greet KR', system-ui, -apple-system,
                   'Segoe UI', sans-serif;

  --yd-r-sm: 10px;
  --yd-r-md: 14px;
  --yd-r-lg: 20px;
  --yd-r-pill: 999px;

  --yd-wrap: 1440px;
  --yd-gap:  clamp(1rem, 1.9vw, 1.6rem);
  --yd-top:  96px;

  --yd-t: .16s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- dark, the default ---------- */
:root,
:root[data-yd-theme="dark"] {
  --yd-bg:        #0E0E0F;
  --yd-surface:   #161618;
  --yd-surface-2: #1D1D20;
  --yd-border:    #2A2A2E;
  --yd-border-hi: #3A3A40;
  --yd-text:      #EDEBE8;
  --yd-text-dim:  #97938D;
  /* faint is for 10px uppercase labels only. It is deliberately quiet and
     does not carry enough contrast for a sentence — use text-dim for those. */
  --yd-text-faint:#5E5B57;

  --yd-accent:    #D8B56B;
  --yd-accent-hi: #E8C983;
  --yd-accent-lo: #9C7C33;
  --yd-on-accent: #17140C;

  --yd-lift:   0 5px 0 var(--yd-accent-lo), 0 12px 20px rgba(0,0,0,.50);
  --yd-lift-a: 0 1px 0 var(--yd-accent-lo), 0 4px 10px rgba(0,0,0,.45);
  --yd-card:   0 1px 0 rgba(255,255,255,.03) inset;
  --yd-ring:   0 0 0 3px rgba(216,181,107,.28);
  /* the wordmark is drawn in white, so it needs flipping on a light page */
  --yd-logo-filter: none;
  color-scheme: dark;
}

/* ---------- light ---------- */
:root[data-yd-theme="light"] {
  --yd-bg:        #F5F3EF;
  --yd-surface:   #FFFFFF;
  --yd-surface-2: #EFECE5;
  --yd-border:    #DFDAD1;
  --yd-border-hi: #C9C2B6;
  --yd-text:      #1A1917;
  --yd-text-dim:  #6C6862;
  --yd-text-faint:#9A958D;

  --yd-accent:    #CBA65A;
  --yd-accent-hi: #DEBB72;
  --yd-accent-lo: #8E6C26;
  --yd-on-accent: #1A1408;

  --yd-lift:   0 5px 0 var(--yd-accent-lo), 0 10px 18px rgba(80,62,20,.22);
  --yd-lift-a: 0 1px 0 var(--yd-accent-lo), 0 4px 8px rgba(80,62,20,.18);
  --yd-card:   0 1px 2px rgba(60,50,30,.05);
  --yd-ring:   0 0 0 3px rgba(203,166,90,.30);
  --yd-logo-filter: invert(1);
  color-scheme: light;
}

/* ============================================================
   Base
   ============================================================ */

* { box-sizing: border-box; }

html, body { margin: 0; }

/* an anchor must not land underneath the sticky header, and the jump is
   eased unless the visitor has asked for less motion */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--yd-top) + 20px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--yd-bg);
  color: var(--yd-text);
  font-family: var(--yd-font);
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  transition: background var(--yd-t), color var(--yd-t);
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--yd-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--yd-accent); color: var(--yd-on-accent); }

:focus-visible { outline: 0; box-shadow: var(--yd-ring); border-radius: 4px; }

.yd-wrap { max-width: var(--yd-wrap); margin: 0 auto; padding: 0 clamp(18px, 3vw, 40px); }
.yd-sp { flex: 1; }
.yd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ============================================================
   Header
   ============================================================ */

.yd-top {
  position: sticky; top: 0; z-index: 20;
  height: var(--yd-top);
  background: color-mix(in srgb, var(--yd-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--yd-border);
}
.yd-top .yd-wrap { height: 100%; display: flex; align-items: center; gap: 16px; }

.yd-brand { display: flex; align-items: center; flex: none; min-width: 0; }
.yd-brand img { display: block; width: 132px; height: 66px; filter: var(--yd-logo-filter); }

/* The suffix that tells the two addresses apart. It arrives letter by letter,
   holds long enough to be read, then clears the same way. Gold, because Yandi
   asked for gold: it belongs to the mark rather than to the things you press. */
.yd-ar {
  flex: none; align-self: center;
  margin-left: -10px;
  /* the wordmark sits low inside its own box, so the suffix drops to meet it */
  transform: translateY(7px);
  font-family: var(--yd-font-dp);
  font-size: 21px; font-weight: 700; letter-spacing: 0;
  color: var(--yd-accent);
  white-space: nowrap; user-select: none;
}
.yd-ar-type { display: inline-flex; }
.yd-ar-type i {
  font-style: italic;
  opacity: 0;
  animation: ydAr 5.2s cubic-bezier(.33, 1, .68, 1) 1 both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
/* in quickly, held long enough to read, out again, then a short breath of
   nothing before the other word takes its place */
@keyframes ydAr {
  0%,   4%   { opacity: 0; transform: translateY(5px);  filter: blur(1.5px); }
  12%,  70%  { opacity: 1; transform: none;             filter: none; }
  84%, 100%  { opacity: 0; transform: translateY(-5px); filter: blur(1.5px); }
}
/* this one is motion for its own sake, so it is the kind that stops */
@media (prefers-reduced-motion: reduce) {
  .yd-ar-type i { animation: none; opacity: 1; }
}

/* the basmalah sits in the middle of the bar, quiet and gold */
.yd-bism {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--yd-font-ar);
  font-size: 20px; line-height: 1;
  color: var(--yd-accent);
  pointer-events: none;
  user-select: none;
}

.yd-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; min-width: 0; }
.yd-nav a {
  font-size: 17px; color: var(--yd-text-dim);
  padding: 9px 14px; border-radius: var(--yd-r-sm);
  transition: var(--yd-t);
}
.yd-nav a:hover { color: var(--yd-text); background: var(--yd-surface-2); text-decoration: none; }
.yd-nav a[aria-current="page"] { color: var(--yd-accent); }

.yd-theme {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; margin-left: 8px; padding: 0;
  border-radius: var(--yd-r-pill);
  background: var(--yd-surface-2);
  border: 1px solid var(--yd-border);
  color: var(--yd-text-dim);
  cursor: pointer; transition: var(--yd-t);
}
.yd-theme:hover { color: var(--yd-accent); border-color: var(--yd-accent); }
.yd-theme svg { display: block; }
:root[data-yd-theme="dark"]  .yd-ico-sun  { display: none; }
:root[data-yd-theme="light"] .yd-ico-moon { display: none; }

/* ============================================================
   Buttons — the raised gold one is the signature
   ============================================================ */

.yd-btn {
  font: 700 17px/1 var(--yd-font);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px; min-height: 48px;
  border: 0; border-radius: var(--yd-r-md);
  color: var(--yd-on-accent);
  background: linear-gradient(180deg, var(--yd-accent-hi), var(--yd-accent));
  box-shadow: var(--yd-lift);
  cursor: pointer; text-decoration: none;
  transition: transform var(--yd-t), box-shadow var(--yd-t), filter var(--yd-t);
}
.yd-btn:hover { filter: brightness(1.05); text-decoration: none; }
.yd-btn:active { transform: translateY(4px); box-shadow: var(--yd-lift-a); }
.yd-btn:focus-visible { box-shadow: var(--yd-lift), var(--yd-ring); }

.yd-btn2 {
  font: 400 17px/1 var(--yd-font);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 24px; min-height: 48px;
  border-radius: var(--yd-r-md);
  color: var(--yd-text);
  background: var(--yd-surface);
  border: 1px solid var(--yd-border-hi);
  cursor: pointer; text-decoration: none; transition: var(--yd-t);
}
.yd-btn2:hover {
  background: var(--yd-surface-2);
  border-color: var(--yd-accent); color: var(--yd-accent);
  text-decoration: none;
}
.yd-btn2:active { transform: translateY(1px); }

.yd-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   Sections
   ============================================================ */

.yd-sec { padding: clamp(42px, 7vw, 76px) 0; }
.yd-sec + .yd-sec { border-top: 1px solid var(--yd-border); }
/* a section opened by an eyebrow already draws its own rule beside the label,
   so the full divider above it would read as a double line */
.yd-sec + .yd-sec:has(> .yd-wrap > .yd-eyebrow:first-child) { border-top: 0; }
/* a hero already carries its own breathing room underneath */
.yd-hero + .yd-sec { padding-top: clamp(18px, 3vw, 32px); }

.yd-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--yd-text-faint); margin-bottom: 22px;
}
.yd-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--yd-border); }

.yd-hero { position: relative; isolation: isolate; padding: clamp(50px, 9vw, 96px) 0 clamp(40px, 6vw, 64px); }
.yd-hero .yd-wrap { position: relative; z-index: 1; }

/* the dot field sits behind everything in the hero and catches the pointer */
.yd-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.yd-hero-text { min-width: 0; }

/* The mark, spinning. Decoration only, so it is hidden from the reading order
   and dropped entirely when the column it lives in would squeeze the words. */
.yd-hero-art { display: none; }
@media (min-width: 1000px) {
  .yd-hero .yd-wrap {
    display: grid; align-items: center; gap: clamp(24px, 4vw, 64px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  }
  .yd-hero-art { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: 460px; }
}

/* the mark can be taken hold of and spun, so the cursor offers it.
   pan-y keeps a touch screen scrolling: only the sideways sweep is ours */
.yd-hero-art { cursor: grab; touch-action: pan-y; }
.yd-hero-art:active { cursor: grabbing; }
.yd-hero h1 {
  font-family: var(--yd-font-dp); font-style: italic; font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem); line-height: 1.06; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.yd-hero p { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--yd-text-dim); max-width: 60ch; }
.yd-hero .yd-btns { margin-top: 30px; }

/* A label, not an action. It stays in the neutral range so the gold button
   beside it is the only thing on the page asking to be pressed. */
.yd-tag {
  display: inline-block; margin-bottom: 22px;
  font-family: var(--yd-font-greet);
  font-size: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 18px; border-radius: var(--yd-r-pill);
  color: var(--yd-text-dim);
  background: var(--yd-surface-2);
  border: 1px solid var(--yd-border);
}

/* The part of the tag that turns through languages. It holds one width, set from
   the longest greeting when the page loads, so the pill does not breathe in and
   out as the words change, and it fades rather than cuts. */
.yd-greet {
  display: inline-block; text-align: center;
  transition: opacity .28s cubic-bezier(.4, 0, .2, 1);
}
.yd-greet.is-out { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .yd-greet { transition: none; } }

h2.yd-h { font-family: var(--yd-font-dp); font-style: italic;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; margin-bottom: 14px; }
h3.yd-h { font-family: var(--yd-font-dp); font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: 10px; }

/* ============================================================
   Cards
   ============================================================ */

/* Rows, not cards.

   A grid of cards asks to be scanned and compared, which is right for a list of
   things on offer and wrong for an explanation. Four rows read in order, which
   is what somebody landing here needs: what is on it, where it runs, where it
   lives, why it is here.

   The number is not decoration. It is what tells the eye there is an order and
   that it is short. */
.yd-rows-h {
  font-family: var(--yd-font-dp); font-style: italic;
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08;
  letter-spacing: -.01em; margin: 0 0 clamp(26px, 3.6vw, 44px);
  text-wrap: balance;
}
.yd-rows { list-style: none; margin: 0; padding: 0; }
/* The gold bar is the only thing that moves. It grows from the top edge of
   the row rather than fading in, so it reads as the row being picked out
   rather than something arriving on top of it.

   The padding on the left is there whether or not the bar is, otherwise the
   whole row would jump sideways the moment a pointer touched it. */
.yd-row {
  position: relative;
  display: grid; grid-template-columns: 52px 1fr; gap: 0 10px;
  padding: clamp(20px, 2.6vw, 30px) 0 clamp(20px, 2.6vw, 30px) 16px;
  border-top: 1px solid var(--yd-border);
}
.yd-row::before {
  content: ""; position: absolute; left: 0; top: -1px; bottom: 0; width: 2px;
  background: var(--yd-accent);
  transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.yd-row:hover::before, .yd-row:focus-within::before { transform: scaleY(1); }

/* and the row steps aside for it. The nudge is on the two children, not on the
   padding, so nothing is laid out again while it moves. */
.yd-row-n, .yd-row-body { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.yd-row:hover .yd-row-n, .yd-row:focus-within .yd-row-n,
.yd-row:hover .yd-row-body, .yd-row:focus-within .yd-row-body {
  transform: translateX(11px);
}
@media (prefers-reduced-motion: reduce) {
  .yd-row::before { transition: none; }
  .yd-row-n, .yd-row-body { transition: none; transform: none !important; }
}
.yd-row:hover .yd-row-n,
.yd-row:focus-within .yd-row-n,
.yd-row:hover .yd-row-body h3,
.yd-row:focus-within .yd-row-body h3 { color: var(--yd-accent); }
.yd-row:last-child { border-bottom: 1px solid var(--yd-border); }
.yd-row-n {
  transition: var(--yd-t);
  font-size: 12px; font-weight: 400; letter-spacing: .1em;
  color: var(--yd-text-faint); font-variant-numeric: tabular-nums;
  padding-top: 7px;
}
.yd-row-body h3 {
  transition: var(--yd-t);
  margin: 0; font-family: var(--yd-font); font-style: normal;
  font-size: clamp(19px, 2.2vw, 25px); font-weight: 500; line-height: 1.2;
}
/* the small line beside the big word, the way a caption sits beside a plate */
.yd-row-body h3 em {
  font-style: normal; font-size: 11px; font-weight: 400;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--yd-text-faint); margin-left: 10px;
  white-space: nowrap;
}
.yd-row-body p {
  margin: 10px 0 0; max-width: 62ch;
  color: var(--yd-text-dim); font-weight: 400;
  text-wrap: pretty;
}
.yd-row-tags {
  display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 14px;
}
.yd-row-tags span {
  font-size: 11.5px; font-weight: 400; color: var(--yd-text-faint);
  padding: 4px 10px; border-radius: var(--yd-r-pill);
  border: 1px solid var(--yd-border);
}
@media (max-width: 560px) {
  .yd-row { grid-template-columns: 1fr; gap: 0; }
  .yd-row-n { padding: 0 0 6px; }
  .yd-row-body h3 em { display: block; margin: 5px 0 0; white-space: normal; }
}

/* Three across on a desktop. The 300px floor let two fat cards fill the row
   and left the shots looking like posters; at 260px a third fits and each
   card becomes a thing you scan rather than a thing you read. It is still
   auto-fill, so a narrow window drops to two and then to one by itself. */
.yd-grid { display: grid; gap: var(--yd-gap); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
/* Pinned to three on a wide screen rather than left to auto-fill, which made
   four tracks and stood two cards next to two holes. */
@media (min-width: 1100px) { .yd-grid { grid-template-columns: repeat(3, 1fr); } }

.yd-card {
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--yd-r-lg);
  background: var(--yd-surface);
  border: 1px solid var(--yd-border);
  box-shadow: var(--yd-card);
  transition: var(--yd-t);
  display: flex; flex-direction: column; gap: 10px;
}
/* These are notes, not doors — so pointing at one warms it rather than
   flooding it. The gold wash stays faint and the number lights up; nothing
   here pretends to be clickable. */
.yd-card { position: relative; isolation: isolate; overflow: hidden; }
.yd-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(152deg,
    color-mix(in srgb, var(--yd-accent) 16%, transparent) 0%,
    color-mix(in srgb, var(--yd-accent) 5%, transparent) 55%,
    transparent 100%);
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1);
}
.yd-card:hover::before { opacity: 1; }
.yd-card:hover { border-color: var(--yd-accent); transform: translateY(-3px); }
.yd-card:hover .yd-num {
  color: var(--yd-on-accent);
  background: var(--yd-accent);
  border-color: var(--yd-accent);
}
.yd-card:hover h3 { color: var(--yd-accent); }
.yd-card .yd-num, .yd-card h3 { transition: var(--yd-t); }
.yd-card p { color: var(--yd-text-dim); font-size: 17px; }
/* Counting, not calling. Neutral like every other label on the page. */
.yd-card .yd-num {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border-radius: var(--yd-r-sm); font-size: 16px; font-weight: 500;
  color: var(--yd-text-dim);
  background: var(--yd-surface-2);
  border: 1px solid var(--yd-border);
}
.yd-card .yd-head { display: flex; align-items: center; gap: 12px; }
.yd-card .yd-head h3 { font-family: var(--yd-font); font-style: normal; font-size: 20px; margin: 0; }

/* a tool card links somewhere, so the whole card reacts */
a.yd-card { color: inherit; }
a.yd-card:hover { border-color: var(--yd-accent); text-decoration: none; }
a.yd-card:hover h3 { color: var(--yd-accent); }
.yd-card .yd-meta {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--yd-border);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--yd-text-faint);
}
/* A status word is grey. Only a card you can actually open earns the gold. */
.yd-card .yd-go { margin-left: auto; color: var(--yd-text-dim); }
a.yd-card .yd-go { color: var(--yd-accent); }

.yd-soon { opacity: .55; }
.yd-soon:hover { border-color: var(--yd-border); }

/* ============================================================
   Tool cards — a 3:2 preview on top, the whole card is the link
   ============================================================ */

.yd-tool {
  display: flex; flex-direction: column;
  border-radius: var(--yd-r-lg);
  background: var(--yd-surface);
  border: 1px solid var(--yd-border);
  box-shadow: var(--yd-card);
  overflow: hidden;
  color: inherit; text-decoration: none;
  transition: transform var(--yd-t), border-color var(--yd-t), box-shadow var(--yd-t);
}

/* Only a card that actually goes somewhere reacts to the pointer, and what it
   does is lift and sharpen rather than change colour. Gold on the border and
   gold on the heading at the same time made pointing at a card feel like
   setting it on fire. The movement is the answer; the colour was noise. */
a.yd-tool:hover {
  transform: translateY(-3px);
  border-color: var(--yd-border-hi);
  text-decoration: none;
}

.yd-tool-shot {
  position: relative; isolation: isolate;
  /* flatter than the 3:2 it was: a narrower card with a tall shot reads as a
     poster with a caption, and the eye never gets to the words */
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--yd-border);
  display: grid; place-items: center;
  overflow: hidden;
  /* until there is a screenshot, the dot grid from the tools themselves */
  background:
    radial-gradient(circle at 1px 1px, var(--yd-border-hi) 1px, transparent 0) 0 0/16px 16px,
    var(--yd-surface-2);
}

/* Pointing at a card used to flood the whole panel with the brand colour and
   turn the artwork into black ink on gold. It read as a button being pressed,
   not as a card being looked at, and once the cards carried real screenshots
   it hid the only honest picture on the page behind a sheet of gold.

   What replaces it is the effect the rows on the front page already use: a
   two pixel gold line that grows, and the content moving a little. A hairline
   is enough to say which one the hand is on. The picture gets to stay a
   picture — it sits back slightly at rest and comes forward when pointed at,
   so the reward for looking is seeing it properly. */
.yd-tool-shot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 3;
  background: var(--yd-accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
a.yd-tool:hover .yd-tool-shot::after,
a.yd-tool:focus-visible .yd-tool-shot::after { transform: scaleX(1); }

.yd-tool-shot img {
  position: relative; z-index: 1;
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.9) brightness(.84);
  transition: filter .3s cubic-bezier(.4, 0, .2, 1), transform .45s cubic-bezier(.4, 0, .2, 1);
}
a.yd-tool:hover .yd-tool-shot img,
a.yd-tool:focus-visible .yd-tool-shot img {
  filter: none; transform: scale(1.04);
}

/* The three ways to give.

   Two arrive as pictures that belong to somebody else, in their own colours,
   and nothing here recolours either of them. Saweria has no mark of its own to
   use, so it gets the house button rather than one invented for it.

   One row of three, the same shape as the wallet cards above them. They are
   centred in their own column rather than stretched, because the three marks
   are drawn to different proportions and forcing them to one height would
   leave two of them swimming in empty plate. */
.yd-give {
  display: grid; gap: 14px; margin: 26px 0 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 620px) { .yd-give { grid-template-columns: 1fr; } }
.yd-give-one {
  /* all three the same height, so the code can be big enough to point a
     camera at without the other two looking stunted beside it */
  box-sizing: border-box; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px; border-radius: var(--yd-r-md);
  background: #FFFFFF; color: #1A1917;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  text-decoration: none; transition: var(--yd-t);
}
.yd-give-one img { display: block; width: 100%; height: auto; }
.yd-give-one:hover, .yd-give-one:focus-visible { transform: translateY(-2px); }
.yd-give-one:focus-visible { outline: 0; box-shadow: var(--yd-ring); }

/* The one with no mark of its own, so it offers a code instead.

   It is a link and a thing to point a camera at, at the same time.

   The white is not decoration. The code arrives on a transparent background,
   and on the dark theme its dark squares sit on a dark page with almost no
   contrast left between them: readable to the eye, unreadable to a camera.
   White behind it is what makes it work at all, and the quiet border around
   the code has to stay for the same reason.

   It is also never recoloured, never tinted by a theme, and never covered.
   Those are the three ways to break one. */
.yd-give-qr img { width: 190px; max-width: 100%; }

/* A real screenshot is not a line drawing.

   The hover above turns the picture black so the gold behind it reads as a
   silhouette, which is right for the drawn placeholders and wrong for a
   photograph: a dark screenshot would just become a dark rectangle and cover
   the gold entirely.

   So a photographed card keeps its picture, and the gold comes over the top as
   a wash instead of showing through from behind. */
/* is-photo no longer needs rules of its own: every card behaves the same way
   now, whether it carries a screenshot or a drawing. The class stays on the
   markup because a drawing still wants a little more opacity than a photo. */
.yd-tool-shot svg {
  position: relative; z-index: 1; opacity: .45;
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1);
}
a.yd-tool:hover .yd-tool-shot svg,
a.yd-tool:focus-visible .yd-tool-shot svg { opacity: .8; }

.yd-tool-body {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
  padding: clamp(18px, 2.2vw, 24px);
}
.yd-tool-body h3 {
  font-family: var(--yd-font); font-style: normal;
  font-size: 20px; margin: 0; transition: var(--yd-t);
}
.yd-tool-body p { color: var(--yd-text-dim); font-size: 17px; }

.yd-tool .yd-meta {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--yd-border);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--yd-text-faint);
}
/* The arrow is the one place gold still belongs, and only where the hand is.
   Four cards each carrying a gold word at rest was four claims for attention
   on a page that is meant to be read in order. */
.yd-tool .yd-go { margin-left: auto; color: var(--yd-text-faint); transition: color var(--yd-t); }
a.yd-tool:hover .yd-go,
a.yd-tool:focus-visible .yd-go { color: var(--yd-accent); }

/* not ready yet: quieter, and it does not pretend to be clickable */
.yd-tool.yd-soon { opacity: .62; }

/* ============================================================
   Prose — about, privacy, terms
   ============================================================ */

.yd-prose { max-width: 68ch; }
.yd-prose h2 {
  font-family: var(--yd-font-dp); font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  margin: 42px 0 12px;
}
.yd-prose h2:first-child { margin-top: 0; }
.yd-prose h3 { font-size: 1.16rem; margin: 28px 0 8px; }
/* No word left alone on the last line. Chrome, Edge and Safari lay a paragraph
   out so its final line carries at least a couple of words; a browser that
   does not know the property simply wraps as it always did. */
.yd-prose p, .yd-prose li, .yd-hero p, .yd-note, .yd-tool-body p { text-wrap: pretty; }
.yd-prose h2, .yd-hero h1 { text-wrap: balance; }

.yd-prose p { margin-bottom: 16px; color: var(--yd-text-dim); }
.yd-prose strong { color: var(--yd-text); font-weight: 700; }
.yd-prose ul { margin: 0 0 18px; padding-left: 20px; color: var(--yd-text-dim); }
.yd-prose li { margin-bottom: 8px; }
.yd-prose .yd-lead { font-size: 1.3rem; color: var(--yd-text); }

.yd-note {
  padding: 18px 20px; border-radius: var(--yd-r-md);
  background: var(--yd-surface); border: 1px solid var(--yd-border);
  color: var(--yd-text-dim); font-size: 17px;
}

/* three to a row while there is room for them, one under the other when not */
.yd-addrs {
  display: grid; gap: 12px; margin: 10px 0 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 620px) { .yd-addrs { grid-template-columns: 1fr; } }

/* Each card is tinted towards the coin it belongs to. The tint is faint on
   purpose: it has to carry a name and an address on top of it, and the name
   is written out anyway, so nobody has to tell the cards apart by colour. */
.yd-eth { --coin: #4C8DFF; }   /* Ethereum blue, pushed bluer */
.yd-btc { --coin: #F7931A; }   /* Bitcoin orange */
.yd-sol { --coin: #14F195; }   /* Solana mint rather than its purple, which a
                                  red-green blind eye cannot separate from the
                                  blue above it */

.yd-addr {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding: 17px 16px 14px; margin: 0;
  border-radius: var(--yd-r-sm);
  background: color-mix(in srgb, var(--coin, var(--yd-accent)) 13%, var(--yd-surface-2));
  border: 1px solid color-mix(in srgb, var(--coin, var(--yd-accent)) 34%, var(--yd-border));
  font-size: 16px; color: var(--yd-text);
  cursor: pointer; transition: var(--yd-t);
}
.yd-addr:hover { border-color: color-mix(in srgb, var(--coin, var(--yd-accent)) 62%, var(--yd-border)); }

/* the coin, said in full strength. A block of colour carries no text, so it is
   free to be as strong as it needs to be to stay apart from its neighbours. */
.yd-addr::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--coin, var(--yd-accent));
}
/* the address itself, which is the thing the button hands over */
.yd-addr code {
  font-family: inherit; font-size: 16px;
  flex: none; width: 100%; min-width: 0; word-break: break-all;
  /* one click takes the whole address, so nothing has to be dragged across.
     This also stands in for the button if the clipboard is ever refused. */
  user-select: all; -webkit-user-select: all;
}
/* once shortened it must NOT be selectable, or a hand-made copy would be an
   address with a hole punched through the middle of it */
.yd-addr code.is-short {
  user-select: none; -webkit-user-select: none;
  letter-spacing: .03em;
}

/* An address is far too long to pick up by hand without dropping a character,
   and a dropped character is somebody else's wallet. The button is built by
   yd-boot.js rather than written here, so a visitor without scripting sees the
   plain address instead of a button that does nothing. */
.yd-copy {
  flex: none;
  font: 500 15px/1 var(--yd-font);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 10px 18px;
  border-radius: var(--yd-r-sm);
  color: var(--yd-text-dim);
  background: var(--yd-surface);
  border: 1px solid var(--yd-border-hi);
  cursor: pointer; transition: var(--yd-t);
}
.yd-copy:hover { color: var(--yd-accent); border-color: var(--yd-accent); }
/* gold only once it has actually done something */
.yd-copy.is-done {
  color: var(--yd-bg); background: var(--yd-accent); border-color: var(--yd-accent);
}
.yd-addr span { width: 100%; flex: none; font-size: 16px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--yd-text); margin-bottom: 0; }

/* ============================================================
   Footer — mark on the left, a wide gap, then columns
   ============================================================ */

.yd-foot { border-top: 1px solid var(--yd-border); margin-top: 24px; padding: clamp(44px, 6vw, 72px) 0 36px; }

.yd-foot-top {
  display: grid; align-items: start;
  /* the mark keeps a readable column of its own; the links take what is left */
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}

/* same size as the header mark — it is the signature, not a footnote */
.yd-foot-mark img {
  display: block; width: 132px; height: 66px;
  filter: var(--yd-logo-filter);
}
.yd-foot-mark p {
  margin-top: 14px; max-width: 30ch;
  font-size: 16px; color: var(--yd-text-dim);
}

/* Columns flow onto a second row on their own, so the footer grows with
   the collection instead of being redesigned every time. */
.yd-foot-cols { display: flex; justify-content: flex-end; gap: clamp(28px, 3.2vw, 56px) clamp(32px, 5vw, 86px); flex-wrap: wrap; }
.yd-foot-col { display: flex; flex-direction: column; gap: 9px; min-width: 136px; max-width: 200px; }
.yd-foot-col h2 {
  font-family: var(--yd-font); font-size: 16px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--yd-text-faint); margin-bottom: 4px;
}
.yd-foot-col a { font-size: 17px; color: var(--yd-text-dim); }
.yd-foot-col a:hover { color: var(--yd-accent); }

.yd-foot-end {
  display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 60px); padding-top: 24px;
  border-top: 1px solid var(--yd-border);
  font-size: 16px; color: var(--yd-text-faint);
}

/* ============================================================
   The runner on the closing line
   ============================================================ */

/* The section gives up its lower padding so a small runner can use the
   border underneath as ground. That border belongs to the footer, so what
   the eye reads as the floor is a real part of the page. */
.yd-play { position: relative; padding-bottom: 152px; }
/* The footer normally stands 24px clear of what came before it. Where the
   runner is, that gap would leave it treading on nothing, so the section is
   allowed to finish exactly on the footer border it uses as ground. */
main:has(.yd-play) + .yd-foot { margin-top: 0; }
/* the words and buttons ride above the scene, and keep their own clicks */
.yd-play > .yd-wrap { position: relative; z-index: 1; }
.yd-run {
  position: absolute; inset: 0; z-index: 0;
  display: block; width: 100%; height: 100%;
  cursor: pointer;
}
/* The site rings anything focused in gold. Here that frames the scene in a
   box and breaks the sense that it simply lives on the page, so focus that
   arrived from a hand is given nothing. Someone who came by Tab still needs
   to see where they are, and keeps the ring. */
.yd-run:focus { outline: none; box-shadow: none; }
.yd-run:focus-visible { outline: none; box-shadow: var(--yd-ring); }
.yd-run.yd-byhand:focus-visible { box-shadow: none; }
@media (max-width: 620px) { .yd-play { padding-bottom: 122px; } }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 860px) {
  .yd-bism { display: none; }
  .yd-nav a { padding: 8px 10px; font-size: 16.5px; }
}
@media (max-width: 900px) {
  .yd-foot-top { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .yd-foot-cols { gap: 26px 32px; }
  .yd-foot-col { min-width: 112px; }
}

@media (max-width: 620px) {
  /* the menu no longer fits beside the logo, so it drops to a row of its own */
  .yd-top { height: auto; }
  .yd-top .yd-wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; gap: 8px 12px; }
  .yd-brand img { width: 104px; height: 52px; }
  .yd-theme { margin-left: auto; }
  .yd-nav {
    order: 3; flex: 1 1 100%; margin-left: 0;
    justify-content: center; gap: 2px;
    border-top: 1px solid var(--yd-border); padding-top: 8px;
  }
  .yd-nav a { padding: 8px 11px; font-size: 16px; }
  .yd-btn, .yd-btn2 { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Front page: the shelf you can see, and the doors to the rest
   ============================================================ */

/* Four across on a desktop, two on a tablet, one on a phone. Fixed counts and
   not auto-fill, so four never breaks into three and one. The cards are the
   Tools page cards with the paragraph left out, so the pictures do the talking. */
.yd-shelf { display: grid; gap: var(--yd-gap); grid-template-columns: repeat(4, 1fr); }
.yd-shelf .yd-tool-body { padding: 16px 18px 18px; gap: 6px; }
.yd-shelf .yd-tool-body h3 { font-size: 18px; }
.yd-shelf .yd-meta { margin-top: 8px; padding-top: 12px; font-size: 12.5px; }
.yd-shelf + .yd-btns { margin-top: 28px; }
@media (max-width: 1000px) { .yd-shelf { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .yd-shelf { grid-template-columns: 1fr; } }

/* More from me. A wide row you can press anywhere on. The hover is the numbered
   rows' own: a two pixel gold line growing down its left edge while the words
   step in. A line across the top was tried first, and at the width of the page it
   read as a gold bar rather than a hairline, and sat badly on the grey border
   beneath it. It is a list, so a second row later would simply stack under the
   first. */
.yd-more { display: block; }
.yd-more-one {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 12px 28px; padding: 24px 0;
  color: inherit; text-decoration: none;
}
/* the site underlines any link on hover, and a rule on a:hover outranks the
   plain class above, so the underline has to be refused on the hover state too */
.yd-more-one:hover, .yd-more-one:focus-visible { text-decoration: none; }
/* no rule of its own: the line beside the heading is already its top edge, and a
   second and third border stacked under it made the row look boxed in. A line
   appears only between rows, so it is there the day a second one is added. */
.yd-more-one + .yd-more-one { border-top: 1px solid var(--yd-border); }
.yd-more-one::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--yd-accent);
  transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.yd-more-one:hover::before, .yd-more-one:focus-visible::before { transform: scaleY(1); }
.yd-more-one:focus-visible { outline: 0; }
.yd-more-txt { transition: transform .3s cubic-bezier(.4, 0, .2, 1); min-width: 0; }
/* 20px, not the 11 the numbered rows use. Their step-in moves a small number; this
   one moves a heading, and 11px left it about nine pixels from the gold line. */
.yd-more-one:hover .yd-more-txt, .yd-more-one:focus-visible .yd-more-txt { transform: translateX(20px); }
.yd-more-one h3 {
  margin: 0; font-family: var(--yd-font); font-style: normal;
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 500; line-height: 1.2;
}
.yd-more-one p { margin: 6px 0 0; color: var(--yd-text-dim); text-wrap: pretty; }
.yd-more-one .yd-go {
  flex: none; font-size: 15px; font-weight: 500; letter-spacing: .02em;
  color: var(--yd-text-dim); transition: color var(--yd-t);
}
.yd-more-one:hover .yd-go, .yd-more-one:focus-visible .yd-go { color: var(--yd-accent); }
@media (max-width: 560px) {
  .yd-more-one { flex-direction: column; align-items: flex-start; padding: 24px 0; }
}

/* ============================================================
   Shelf as a slide: cards run sideways and snap, with two round
   buttons beside the heading. A long shelf stays one row high
   instead of pushing the rest of the page down.
   ============================================================ */
.yd-slidehead { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.yd-slidehead .yd-eyebrow { flex: 1; min-width: 0; margin-bottom: 0; }
.yd-slidenav { display: flex; gap: 8px; flex: none; }
.yd-slidenav[hidden] { display: none; }
.yd-slidebtn {
  width: 42px; height: 42px; padding: 0; display: grid; place-items: center;
  border-radius: 999px; cursor: pointer;
  background: var(--yd-surface); color: var(--yd-text-dim);
  border: 1px solid var(--yd-border);
  transition: color var(--yd-t), border-color var(--yd-t), opacity var(--yd-t);
}
.yd-slidebtn:hover { color: var(--yd-text); border-color: var(--yd-border-hi); }
.yd-slidebtn:disabled { opacity: .3; cursor: default; }
.yd-slidebtn:disabled:hover { color: var(--yd-text-dim); border-color: var(--yd-border); }
.yd-slide {
  display: grid; grid-auto-flow: column; gap: var(--yd-gap);
  grid-auto-columns: calc((100% - 2 * var(--yd-gap)) / 3);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  /* room for a card to lift on hover without being clipped */
  padding: 6px 0 8px; margin: -6px 0 -8px;
}
.yd-slide::-webkit-scrollbar { display: none; }
.yd-slide > * { scroll-snap-align: start; }
.yd-slide:focus-visible { outline: 0; box-shadow: var(--yd-ring); border-radius: var(--yd-r-lg); }
@media (max-width: 1000px) { .yd-slide { grid-auto-columns: calc((100% - var(--yd-gap)) / 2); } }
/* on a phone the next card shows a little, so it reads as something to swipe */
@media (max-width: 620px)  { .yd-slide { grid-auto-columns: 86%; } }
/* the front page shelf: four across, smaller cards, sliding like the others */
.yd-shelf.yd-slide { display: grid; grid-template-columns: none; grid-auto-columns: calc((100% - 3 * var(--yd-gap)) / 4); }
@media (max-width: 1000px) { .yd-shelf.yd-slide { grid-template-columns: none; grid-auto-columns: calc((100% - var(--yd-gap)) / 2); } }
@media (max-width: 620px)  { .yd-shelf.yd-slide { grid-template-columns: none; grid-auto-columns: 86%; } }

/* ---------- 404: the text beside a puzzled cat ---------- */
.yd-lost-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 5vw, 64px); }
.yd-lost-cat { display: block; width: clamp(220px, 30vw, 380px); height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
@media (max-width: 760px) {
  .yd-lost-grid { grid-template-columns: 1fr; }
  .yd-lost-cat { order: -1; width: min(240px, 62vw); margin: 0 auto; }
}
/* the number itself, big, the way a lost sign should be */
.yd-lost-num { margin: 0 0 18px; font-family: 'YD Display', Georgia, serif; font-weight: 700; font-style: italic;
  font-size: clamp(5.5rem, 15vw, 11rem); line-height: .9; letter-spacing: -.02em; color: var(--yd-text); }
.yd-hero p.yd-lost-num { color: var(--yd-text); max-width: none; font-size: clamp(5.5rem, 15vw, 11rem); font-family: var(--yd-font-dp); }
