/* Home page, top to bottom: the ticker under the band, the hero (a big
   headline with the bracketed mono line, a facts line, the lead and two
   buttons), the boxed network strip, the dotted panel, then three numbered
   sections (what you can do, for businesses, network) and the footer. */

/* === Ticker: a dark strip of mono facts with blue "+" marks, scrolling
   endlessly (assets/js/home.js copies the list); still while motion is
   paused. === */
.ticker {
  display: flex;
  height: var(--ticker-height);
  background: var(--color-ticker);
  color: var(--color-ticker-text);
  font: var(--type-mono-caption);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
}
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; }
.ticker-track { display: flex; width: max-content; height: 100%; }
.ticker.is-live .ticker-track { animation: ticker var(--ticker-duration, 40s) linear infinite; }
.motion-paused .ticker.is-live .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; align-items: center; height: 100%; }
.ticker-list li { display: inline-flex; align-items: center; gap: 6px; padding-right: 56px; white-space: nowrap; }
/* The reference's blue "+" before every fact */
.ticker-list li::before {
  content: "";
  width: 11px;
  height: 11px;
  margin-right: 8px;
  background: var(--color-accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cpath d='M4 0h3v4h4v3H7v4H4V7H0V4h4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ticker-list .pair { width: 13px; height: 13px; }
@keyframes ticker { to { transform: translateX(var(--ticker-shift, -50%)); } }
/* Pause / play for every animation on the page */
.ticker-pause {
  --color-focus: var(--color-shell-focus);
  --color-focus-inset: var(--color-ticker);
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: var(--ticker-height);
  padding: 0;
  border: 0;
  border-left: 1px solid var(--color-shell-grid);
  background: var(--color-ticker);
  color: var(--color-ticker-text);
  cursor: pointer;
  transition: color var(--duration-fast-01) var(--ease-standard);
}
.ticker-pause:hover { color: var(--color-shell-text); }
.ticker-pause .icon-play, .ticker-pause[aria-pressed="true"] .icon-pause { display: none; }
.ticker-pause[aria-pressed="true"] .icon-play { display: block; }

/* === Hero === */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 96px);
  align-items: stretch;
  padding: clamp(40px, 5vw, 72px) 0 clamp(48px, 5.5vw, 80px);
}
.hero-title {
  font-family: var(--font-sans);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.hero-line { display: block; text-wrap: balance; }
/* "[ USDT█ ]": Geist Mono, light, in the accent, with a block cursor */
.hero-code {
  display: inline-flex;
  align-items: center;
  margin-top: 0.06em;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-weight: 300;
  letter-spacing: -0.06em;
}
.hero-code .bracket { font-weight: 200; }
.hero-code .bracket:first-child { margin-right: 0.3em; }
.hero-code .bracket:last-child { margin-left: 0.3em; }
/* Room for the whole word, so the closing bracket never moves while typing */
.hero-code .typed { display: inline-block; min-width: 3.6ch; white-space: pre; }
.cursor {
  display: inline-block;
  width: 0.62em;
  height: 0.86em;
  background: var(--color-accent);
  animation: blink 1.1s steps(1) infinite;
}
.motion-paused .cursor { animation: none; }
@keyframes blink { 50% { opacity: 0; } }

/* Typing (assets/js/typewriter.js; the shared rules are in components.css):
   the caret on the dark tiles */
.api-panel .tw-caret, .globe-meta .tw-caret { background: var(--color-accent-on-dark); }
/* A typed panel's own resting cursor waits for the end of the text */
.is-typing .cursor, .tw-wait .cursor { visibility: hidden; }

.hero-aside { display: flex; flex-direction: column; min-width: 0; padding-top: 0.4em; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-03) var(--spacing-04);
  color: var(--color-text-helper);
  font: 400 13px/18px var(--font-sans);
}
.hero-facts strong { font-weight: 500; color: var(--color-text-primary); }
.facts-pair { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.facts-pair svg { color: var(--color-accent); }
/* The divider hangs in the gap before the pair; when the pair wraps to a
   line of its own, it falls outside the line and is clipped. */
.hero-facts { overflow: hidden; }
.facts-pair::before { content: ""; position: absolute; top: 50%; left: calc(var(--spacing-04) / -2 - 0.5px); width: 1px; height: 14px; margin-top: -7px; background: var(--color-border-strong); }
/* The eight network coins overlapping, where the reference has avatars */
.coin-stack { display: inline-flex; }
.coin-stack img { width: 24px; height: 24px; border-radius: 50%; background: var(--color-background); box-shadow: 0 0 0 2px var(--color-background); }
.coin-stack img + img { margin-left: -8px; }
.hero-lead {
  max-width: 30rem;
  margin-top: var(--spacing-05);
  color: var(--color-text-secondary);
  font: 400 16px/24px var(--font-sans);
}
.hero-actions { display: flex; gap: var(--spacing-05); margin-top: auto; padding-top: var(--spacing-08); }
.hero-actions .btn { flex: 1 1 0; min-width: 0; }

/* === Supported networks: a row of boxes sharing 1px lines, each a link to
   the network's official site (a new tab, ↗ in the corner) with the logo
   over the network's name; the token standard of TRON, BNB Chain and
   Ethereum ("(TRC20)") on a mono line under it. Logos and names line up
   across the row. A logo is gray until its box is hovered, or lit by
   home.js, which lights the boxes in turn, one every 3 seconds. Phones show
   the logos only, four in a row. === */
.network-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-top: 1px solid var(--color-border-subtle);
  border-left: 1px solid var(--color-border-subtle);
}
.network-grid li {
  border-right: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}
.net-link {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-03);
  min-height: 128px;
  padding: var(--spacing-06) var(--spacing-04) var(--spacing-05);
  color: var(--color-text-secondary);
  font: 500 15px/20px var(--font-sans);
  letter-spacing: -0.02em;
  text-align: center;
  transition: color var(--duration-fast-02) var(--ease-standard), background-color var(--duration-moderate-02) var(--ease-standard);
}
.net-link::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  background: currentColor;
  color: var(--color-text-decor);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M10 6 10 8 22.59 8 6 24.59 7.41 26 24 9.41 24 22 26 22 26 6 10 6z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: color var(--duration-fast-02) var(--ease-standard);
}
.net-name { text-wrap: balance; }
.net-std { display: block; margin-top: 2px; color: var(--color-text-helper); font: var(--type-mono-caption); letter-spacing: var(--tracking-mono); }
.network-grid img {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  filter: grayscale(1) contrast(1.1);
  opacity: 0.7;
  transition: filter var(--duration-moderate-02) var(--ease-standard), opacity var(--duration-moderate-02) var(--ease-standard);
}
.net-link:hover, .net-link:focus-visible, .net-link.is-lit { color: var(--color-text-primary); }
.net-link:hover::after, .net-link:focus-visible::after, .net-link.is-lit::after { color: var(--color-text-primary); }
.net-link:hover img, .net-link:focus-visible img, .net-link.is-lit img { filter: none; opacity: 1; }

/* Dotted panel: "· · ·  >  AZN → [coin] USDT ON 8 NETWORKS█  <  · · ·",
   its lines typed one after another (home.js). */
.dots-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-06);
  min-height: clamp(176px, 18vw, 272px);
  padding: var(--spacing-08) clamp(20px, 3vw, 48px);
  border: 1px solid var(--color-border-subtle);
  border-top: 0;
  background-color: var(--color-dots-panel);
  background-image: radial-gradient(circle at center, var(--color-dots-dot) 1px, transparent 1.5px);
  background-size: 12px 12px;
  background-position: 6px 6px;
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: clamp(16px, 0.55rem + 1.35vw, 30px);
  line-height: 1.3;
  text-transform: uppercase;
}
.dots-end { letter-spacing: 0.1em; white-space: nowrap; }
.dots-line { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: var(--spacing-06); min-width: 0; max-width: 64rem; margin: 0 auto; }
.dots-text { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 0.4em; color: var(--color-accent); text-align: center; }
/* Unbreakable groups, so a narrow panel wraps as "AZN → USDT" over "ON 8
   NETWORKS". Each group is as wide as its whole text (the hidden ghost); the
   typed part lies over it from the left, so nothing moves while it types. */
.dots-group { display: inline-grid; white-space: pre; }
.dots-ghost, .dots-typed { grid-area: 1 / 1; display: inline-flex; align-items: center; column-gap: 0.4em; }
.dots-ghost { visibility: hidden; }
.dots-typed { position: relative; justify-self: start; }
/* Out of the layout, so the line never grows or wraps under the caret */
.dots-caret { position: absolute; top: 50%; left: calc(100% + 0.15em); width: 0.6em; height: 0.9em; margin-top: -0.45em; background: var(--color-accent); }
.dots-text.is-holding .dots-caret { animation: blink 1.1s steps(1) infinite; }
.dots-arrow { width: 0.8em; height: 0.8em; color: var(--color-text-primary); }
.dots-coin { width: 0.95em; height: 0.95em; margin-right: -0.15em; color: var(--color-text-primary); }

/* === Numbered sections === */
.section { margin-top: clamp(80px, 10vw, 152px); }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-07);
  margin: clamp(24px, 3vw, 40px) 0 clamp(40px, 4.5vw, 64px);
}
.section-head .btn { margin-top: 0.35em; }
/* A paragraph under a section's heading, before its content */
.section-lead {
  max-width: 44rem;
  margin: calc(clamp(16px, 2vw, 32px) - clamp(40px, 4.5vw, 64px)) 0 clamp(40px, 4.5vw, 64px);
  color: var(--color-text-secondary);
  font: 400 16px/24px var(--font-sans);
}

/* What you can do: three white boxes with a "// 001" index. The art turns
   into blue pixels on the active card: the hovered one, else the middle one
   (on touch screens the one in the middle of the screen, see home.js). */
/* Each card spans four shared rows (art, space, title, text), so titles line
   up across the row whatever the length of the texts. */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto minmax(clamp(96px, 13vw, 200px), 1fr) auto auto;
  column-gap: var(--spacing-03);
}
.card {
  position: relative;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: var(--spacing-06);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-background);
}
.card .card-index { position: absolute; top: var(--spacing-06); right: var(--spacing-06); }
.card-art { grid-row: 1; position: relative; width: clamp(136px, 11vw, 168px); aspect-ratio: 1; color: var(--color-text-primary); }
.card-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.art-line { transition: opacity var(--duration-moderate-02) var(--ease-standard); }
.art-line * { vector-effect: non-scaling-stroke; }
.art-pixels rect { opacity: 0; transition: opacity 90ms steps(1); transition-delay: calc(var(--d, 0) * 1ms); }
.art-pixels .solid { fill: var(--color-accent); }
.art-pixels .ghost, .art-pixels .line { fill: var(--color-background); stroke: var(--color-accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.card-title {
  grid-row: 3;
  font: var(--type-heading-03);
  letter-spacing: -0.02em;
  transition: color var(--duration-fast-02) var(--ease-standard);
}
.card-text { grid-row: 4; max-width: 22rem; margin-top: var(--spacing-04); color: var(--color-text-secondary); font: var(--type-body-01); }
.card.is-active .card-title { color: var(--color-accent); }
.card.is-active .art-line { opacity: 0; }
.card.is-active .art-pixels rect { opacity: 1; }
.motion-paused .art-pixels rect, .motion-paused .art-line { transition: none; }

/* For businesses: four facts in boxes beside the API's endpoints on a dark
   tile. */
.business { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--spacing-03); }
/* Shared rows (value, space, title, text) line the titles up, as in .cards */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto minmax(var(--spacing-08), 1fr) auto auto;
  border-top: 1px solid var(--color-border-subtle);
  border-left: 1px solid var(--color-border-subtle);
}
.facts-grid li {
  position: relative;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: var(--spacing-06);
  border-right: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}
.facts-grid .card-index { position: absolute; top: var(--spacing-06); right: var(--spacing-06); }
/* Clear of the "// 001" index */
.fact-value { grid-row: 1; padding-right: 3.5rem; font-size: clamp(40px, 1.6rem + 1.6vw, 56px); font-weight: 400; line-height: 1; letter-spacing: -0.04em; }
.fact-value-mono { font-family: var(--font-mono); font-weight: 300; letter-spacing: -0.06em; color: var(--color-accent); }
.fact-unit { color: var(--color-text-helper); font-size: 0.6em; letter-spacing: -0.02em; }
.fact-title { grid-row: 3; font: 500 16px/22px var(--font-sans); letter-spacing: -0.01em; }
.fact-text { grid-row: 4; margin-top: var(--spacing-03); color: var(--color-text-secondary); font: var(--type-body-01); }

.api-panel {
  --color-focus: var(--color-shell-focus);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--spacing-06);
  background-color: var(--color-shell);
  background-image:
    linear-gradient(to right, var(--color-shell-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-shell-grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: -1px -1px;
  color: var(--color-shell-text);
  font: 400 13px/20px var(--font-mono);
}
.api-head { color: var(--color-shell-text-secondary); font: var(--type-mono-caption); letter-spacing: var(--tracking-mono); text-transform: uppercase; }
.api-table { width: 100%; margin-top: var(--spacing-06); border-collapse: collapse; }
.api-table td { padding: 10px 0; border-bottom: 1px solid var(--color-shell-grid); vertical-align: baseline; background: var(--color-shell); }
.api-table td:first-child { width: 4.5em; color: var(--color-accent-on-dark); }
.api-table td:nth-child(2) { padding-right: var(--spacing-06); white-space: nowrap; }
.api-table td:last-child { color: var(--color-shell-text-secondary); font-family: var(--font-sans); }
/* The signing headers: name | value. The signature wraps only between its
   parts (each kept whole), under itself; on phones it starts on a line of
   its own under its name. */
.api-sign {
  margin: 0;
  margin-top: auto;
  padding-top: var(--spacing-07);
  color: var(--color-shell-text-secondary);
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.api-sign code { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 1ch; font: inherit; }
.api-long > span { white-space: nowrap; }
.api-sign .api-key { color: var(--color-shell-text); }
.api-sign .cursor { width: 0.6em; height: 1.1em; margin-left: 4px; vertical-align: -0.2em; background: var(--color-accent-on-dark); }

/* Network: the globe on a dark grid tile, Baku and the networks beside it. */
.globe-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  min-height: clamp(480px, 42vw, 640px);
  background-color: var(--color-shell);
  background-image:
    linear-gradient(to right, var(--color-shell-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-shell-grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: -1px -1px;
  color: var(--color-shell-text);
  overflow: hidden;
}
.globe { position: relative; grid-column: 2; grid-row: 1; min-height: 0; }
.globe canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.2s var(--ease-entrance);
  user-select: none;
  -webkit-user-select: none;
}
.globe.is-live canvas { opacity: 1; }
.globe-meta {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-07);
  font: var(--type-mono-caption);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-shell-text-secondary);
}
.globe-place { color: var(--color-shell-text); font: var(--type-mono-label); letter-spacing: var(--tracking-mono); }
.globe-coords { margin-top: var(--spacing-02); }
.globe-networks { display: grid; gap: 10px; margin-top: auto; padding-top: var(--spacing-08); }
.globe-networks li { display: flex; align-items: center; gap: 10px; }
.globe-networks li::before { content: ""; width: 7px; height: 7px; background: var(--color-pixel-4); }
.globe-hint { margin-top: var(--spacing-07); }

site-footer { margin-top: clamp(80px, 10vw, 152px); }

/* === Laptops: the networks in two rows; the API facts in one row above the
   endpoints === */
@media (max-width: 1279px) {
  .network-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .net-link { min-height: 120px; }
  .business { grid-template-columns: minmax(0, 1fr); }
  .facts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* === Tablets === */
@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: var(--spacing-07); }
  .hero-aside { padding-top: 0; max-width: 36rem; }
  .cards { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; row-gap: var(--spacing-03); }
  .card { grid-row: auto; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto auto; column-gap: var(--spacing-07); }
  .card-art { grid-row: 1 / 4; width: 136px; }
  .card-title { grid-row: 2; padding-top: var(--spacing-09); }
  .card-text { grid-row: 3; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .globe-tile { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(360px, 1fr); }
  .globe { grid-column: 1; grid-row: 2; }
  .globe-meta { grid-row: 1; }
  .globe-networks { grid-template-columns: repeat(4, max-content); gap: 10px 24px; margin-top: 0; padding-top: var(--spacing-06); }
  .globe-hint { display: none; }
}
@media (max-width: 1023px) and (min-width: 640px) {
  .wide-only { display: none; }
}
/* === Phones === */
@media (max-width: 639px) {
  .section-head { flex-direction: column; gap: var(--spacing-06); }
  .section-head .btn { margin-top: 0; }
  /* All eight networks as logos, four in a row. The names are hidden from
     sight only, so each link keeps its name for screen readers; the ↗ goes,
     and #net-ext still tells them the link opens a new tab. */
  .network-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .net-link { justify-content: center; min-height: 72px; padding: var(--spacing-05) 0; }
  .net-link::after { display: none; }
  .net-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .network-grid img { width: 32px; height: 32px; }
  /* Get started and For business side by side */
  .hero-actions { gap: var(--spacing-03); }
  .hero-actions .btn { gap: var(--spacing-04); padding: 0 var(--spacing-04); }
  .dots-panel { min-height: 152px; padding: var(--spacing-07) var(--spacing-05); }
  .dots-end { display: none; }
  .wide-only { display: none; }
  .card { display: flex; flex-direction: column; }
  .card-art { width: 128px; }
  .card-title { padding-top: var(--spacing-07); }
  .facts-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto var(--spacing-07) auto auto; }
  .api-table tr { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--color-shell-grid); background: var(--color-shell); }
  .api-table td { padding: 0; border: 0; }
  .api-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; padding-right: 0; }
  .api-long { grid-column: 1 / -1; padding-left: 2ch; }
  .api-table td:last-child { grid-column: 2; }
  .globe-tile { grid-template-rows: auto minmax(300px, 1fr); }
  /* As tall as it is wide, so the globe fills the phone's width */
  .globe { aspect-ratio: 1; }
  .globe-networks { grid-template-columns: repeat(2, max-content); }
}
@media (max-width: 359px) {
  .hero-actions .btn { gap: 10px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .net-link, .net-link::after, .network-grid img, .art-line, .card-title { transition: none; }
}
