/*
 * Visual layer, loaded after styles.css.
 *
 * Richness through craft — layered ornament, depth, texture, motion — rather
 * than through loud colour. A financial page that looks expensive earns
 * attention; one that looks excitable loses trust. The palette in styles.css is
 * unchanged; everything here adds dimension to it.
 *
 * Kept separate from styles.css so the base (which the legal pages rely on)
 * stays small and legible, and so this can be tuned without risking that.
 */

/* Paper grain. A single inline SVG turbulence, so texture costs no request and
   cannot fail to load. Very low opacity: felt, not seen. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

/* ---- ornament ---------------------------------------------------------- */
.orn { color: var(--patina); opacity: .28; pointer-events: none; }
.orn-rule { display: block; width: 100%; height: 14px; color: var(--patina); opacity: .3; }
.wreath { display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--patina); }
.wreath svg { width: 26px; height: 52px; }
.wreath .r { transform: scaleX(-1); }
.wreath span {
  font: 600 .6875rem/1 var(--body); letter-spacing: .2em; text-transform: uppercase;
  color: var(--stone); white-space: nowrap;
}

/* ---- hero, layered ----------------------------------------------------- */
.hero {
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--patina) 9%, transparent), transparent 62%),
    linear-gradient(180deg, var(--paper), var(--marble) 70%);
}
.hero-arch {
  position: absolute; left: 50%; top: 4%; translate: -50% 0;
  width: min(74rem, 130%); height: auto; color: var(--patina);
  opacity: .11; pointer-events: none;
}
.hero-cols { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-cols svg {
  position: absolute; bottom: -6%; width: 4.5rem; height: auto;
  color: var(--patina); opacity: .13;
}
.hero-cols svg:first-child { left: 3%; }
.hero-cols svg:last-child  { right: 3%; }
@media (max-width: 60rem) { .hero-cols { display: none; } }

.hero h1 .em { color: var(--patina); font-style: italic; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3125rem .75rem; margin-bottom: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--patina) 35%, transparent);
  border-radius: 100px; background: color-mix(in srgb, var(--patina) 7%, transparent);
  font: 600 .6875rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--patina);
}
.hero .kicker::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--patina); animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

/* Imagery strip beneath the hero copy. */
.hero-strip { display: grid; gap: .625rem; margin-top: 3rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 48rem) { .hero-strip { grid-template-columns: repeat(2, 1fr); } }
.hero-strip figure {
  margin: 0; position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: 3px; border: 1px solid var(--marble-deep); background: var(--paper);
}
.hero-strip img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) contrast(1.02); }
.hero-strip figcaption {
  position: absolute; inset: auto 0 0 0; padding: .5rem .625rem;
  font: 600 .6875rem/1.2 var(--body); letter-spacing: .1em; text-transform: uppercase;
  color: #fff; text-align: left;
  background: linear-gradient(0deg, rgba(0,0,0,.72), transparent);
}
/* Empty slot — an honest placeholder, never a fake image. */
.hero-strip figure.empty { display: grid; place-items: center; border-style: dashed; border-color: var(--stone-light); }
.hero-strip figure.empty figcaption {
  position: static; background: none; color: var(--stone); text-align: center;
  text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .75rem;
}

/* ---- depth on cards ---------------------------------------------------- */
.tile, .price-card, .panel {
  box-shadow: 0 1px 2px rgba(20,23,26,.04), 0 8px 24px -12px rgba(20,23,26,.10);
}
.tile { position: relative; overflow: hidden; }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--patina) 8%, transparent), transparent 55%);
  opacity: 0; transition: opacity .2s;
}
.tile:hover::after { opacity: 1; }
.tile .boss {
  position: absolute; right: -10px; top: -10px; width: 54px; height: 54px;
  color: var(--patina); opacity: .12; transition: opacity .2s, rotate .4s;
}
.tile:hover .boss { opacity: .3; rotate: 20deg; }
.tile b, .tile span { position: relative; z-index: 1; }

/* ---- generic panel ----------------------------------------------------- */
.panel {
  background: var(--paper); border: 1px solid var(--marble-deep);
  border-radius: 4px; padding: clamp(1.25rem, 3vw, 2rem);
}

/* ---- tabs (inspiration panel) ------------------------------------------ */
.tabs { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab {
  padding: .5rem 1rem; border: 1px solid var(--marble-deep); border-radius: 100px;
  background: transparent; color: var(--ink-soft);
  font: 600 .875rem/1 var(--body); cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.tab:hover { border-color: var(--patina); color: var(--patina); }
.tab[aria-selected="true"] { background: var(--patina); border-color: var(--patina); color: var(--paper); }
.tabpanel[hidden] { display: none; }

.res { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.res a {
  display: block; padding: 1rem 1.125rem; text-decoration: none;
  border: 1px solid var(--marble-deep); border-left: 3px solid var(--patina);
  border-radius: 0 3px 3px 0; background: var(--paper);
  transition: transform .15s, border-left-color .15s;
}
.res a:hover { transform: translateX(3px); border-left-color: var(--ink); }
.res b { display: block; font: 600 .9375rem/1.35 var(--body); color: var(--ink); margin-bottom: .25rem; }
.res span { display: block; font-size: .8125rem; color: var(--stone); }
.res .kind {
  display: inline-block; margin-top: .5rem; padding: .125rem .5rem;
  border-radius: 100px; background: color-mix(in srgb, var(--patina) 12%, transparent);
  color: var(--patina); font: 600 .6875rem/1.5 var(--body); letter-spacing: .06em; text-transform: uppercase;
}

/* ---- API section ------------------------------------------------------- */
.endpoint {
  display: grid; grid-template-columns: auto 1fr; gap: .75rem 1rem;
  align-items: baseline; padding-block: .75rem;
  border-bottom: 1px solid var(--marble-deep); font-size: .9375rem;
}
.endpoint:last-child { border-bottom: 0; }
.endpoint code { font-family: var(--mono); font-size: .8125rem; color: var(--ink); }
.verb {
  font: 600 .6875rem/1.6 var(--mono); letter-spacing: .08em;
  padding: .0625rem .5rem; border-radius: 3px; text-align: center;
  background: color-mix(in srgb, var(--patina) 14%, transparent); color: var(--patina);
}
pre.code {
  background: var(--ink); color: var(--marble); border-radius: 4px;
  padding: 1rem 1.125rem; overflow-x: auto; font-size: .8125rem; line-height: 1.6;
  font-family: var(--mono);
}
pre.code .c { color: var(--stone-light); }

/* ---- app placeholders --------------------------------------------------- */
.apps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.app {
  display: grid; gap: .5rem; place-items: center; text-align: center;
  padding: 1.75rem 1.25rem; border: 1px dashed var(--stone-light);
  border-radius: 4px; color: var(--stone);
}
.app b { color: var(--ink-soft); font: 600 1rem/1.3 var(--display); }
.app span { font-size: .8125rem; }
.app .soon {
  font: 600 .625rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--patina); border: 1px solid color-mix(in srgb, var(--patina) 30%, transparent);
  padding: .25rem .5rem; border-radius: 100px;
}

/* ---- scroll reveal ------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 14px; transition: opacity .6s ease, translate .6s ease; }
  .reveal.in { opacity: 1; translate: 0 0; }
}

/* ---- the guide: a procedure, not a document -----------------------------
   get-started.html was rendered in `.legal`, the container built for terms,
   privacy and the risk disclosure. Those are documents: read once, top to
   bottom, no state. A tutorial is a PROCEDURE — you arrive at it three times
   over two days, in the middle, having already done four things — and the
   thing it has to answer on arrival is "where am I". A wall of h2s cannot
   answer that.

   So this styles the sequence itself. The numbering is not decoration: these
   steps have a real order (the API-key screen does not exist until KYC
   approves), and that dependency is the single most useful fact on the page. */
.guide { padding-block: clamp(2rem, 5vw, 3.5rem); }
/* The reading rhythm `.legal` supplied, kept: the page still has ordinary
   prose headings outside the numbered spine ("What you'll need to hand",
   "If something goes wrong") and they should sit the same way they did. */
.guide h2 { margin-top: 2.5rem; }
.guide h3 { margin-top: 1.75rem; }
.guide li { max-width: var(--measure); margin-bottom: .5rem; }
/* …except inside the sequence, where the medallion carries the spacing and a
   2.5rem top margin would push every step title away from its own number. */
.guide .stage-head h2, .guide .dont h3, .guide .risk-block h3 { margin-top: 0; }
.guide .guide-toc li, .guide .dont li { margin-bottom: 0; }
.guide-lede { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); }

/* Time and prerequisites, together, above the fold. The first question anyone
   asks a tutorial is how long it will take, and the honest answer here is two
   numbers — ours and the broker's — which are very different. */
.guide-meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.75rem;
  margin-block: 1.5rem; padding: .875rem 1.125rem;
  border-left: 3px solid var(--patina);
  background: color-mix(in srgb, var(--patina) 6%, transparent);
}
.guide-meta div { display: grid; gap: .1rem; }
.guide-meta dt {
  font: 600 .6875rem/1 var(--body); letter-spacing: .12em;
  text-transform: uppercase; color: var(--stone);
}
.guide-meta dd { margin: 0; font-size: .9375rem; color: var(--ink); }

/* Contents. A plain list, because the page is short enough that a sticky rail
   would be furniture rather than navigation. */
.guide-toc { margin-block: 1.75rem; padding: 0; list-style: none; counter-reset: toc; }
.guide-toc li { margin: 0; border-top: 1px solid var(--marble-deep); }
.guide-toc li:last-child { border-bottom: 1px solid var(--marble-deep); }
.guide-toc a {
  display: flex; gap: .875rem; align-items: baseline;
  padding: .5rem .25rem; text-decoration: none; color: var(--ink);
}
.guide-toc a:hover { background: color-mix(in srgb, var(--patina) 7%, transparent); }
.guide-toc .rn {
  font: 600 .75rem/1 var(--mono); color: var(--patina);
  min-width: 2.5rem; letter-spacing: .06em;
}

/* A phase groups the steps by WHERE the work happens — at the broker, in the
   handover, on your own dashboard. That grouping is the answer to "why is this
   taking two days": one phase is waiting on somebody else's KYC team. */
.phase { margin-top: 2.75rem; }
.phase-label {
  display: flex; align-items: center; gap: .75rem;
  font: 600 .6875rem/1 var(--body); letter-spacing: .14em;
  text-transform: uppercase; color: var(--stone);
  margin-bottom: .25rem;
}
.phase-label::after {
  content: ""; flex: 1; height: 1px; background: var(--marble-deep);
}
.phase-note { color: var(--stone); font-size: .875rem; margin: 0 0 .5rem; }

/* One step. The medallion and the rule under it are the spine; the rule is the
   full width of the text so a long step still reads as one block. */
.stage { padding-top: 1.75rem; }
.stage-head { display: flex; gap: .875rem; align-items: baseline; }
.stage-num {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 .8125rem/1 var(--mono); letter-spacing: .02em;
  color: var(--patina);
  border: 1.5px solid color-mix(in srgb, var(--patina) 45%, transparent);
  background: color-mix(in srgb, var(--patina) 7%, transparent);
  align-self: flex-start;
}
.stage-head h2 { margin: 0; font-size: clamp(1.25rem, 1.05rem + .8vw, 1.5rem); }
.stage-time {
  display: block; margin-top: .2rem;
  font: 400 .8125rem/1.4 var(--body); color: var(--stone);
}
.stage-body { padding-left: 3.125rem; }
@media (max-width: 34rem) {
  .stage-body { padding-left: 0; }
}

/* Where to click, written as a path. This replaces three empty screenshot
   frames captioned "to be added": the frames stay (fabricating a broker's UI
   would be misleading and would go stale at their next redesign) but a path
   somebody can follow beats a blank rectangle, and it keeps working when the
   image never arrives. */
.where {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin: .875rem 0; padding: .625rem .875rem;
  border: 1px solid var(--marble-deep); border-radius: 4px;
  background: var(--paper);
  font-family: var(--mono); font-size: .8125rem;
}
.where b { font-weight: 600; color: var(--ink); }
.where .sep { color: var(--patina); }
.where .lbl {
  font: 600 .625rem/1 var(--body); letter-spacing: .12em;
  text-transform: uppercase; color: var(--stone); margin-right: .35rem;
}

/* The refusal block. Louder than .risk-block on purpose — it is the one thing
   on this page whose whole job is to still be remembered a week later, when
   somebody who is not us asks for a password. */
.dont {
  margin-block: 1.5rem; padding: 1.125rem 1.25rem;
  border: 1.5px solid color-mix(in srgb, var(--risk) 40%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--risk) 6%, transparent);
}
.dont h3 { margin: 0 0 .75rem; color: var(--risk); }
.dont ul { margin: 0; padding-left: 1.1rem; }
.dont li { margin-bottom: .5rem; font-size: .9375rem; color: var(--ink-soft); }
.dont li:last-child { margin-bottom: 0; }
.dont li strong { color: var(--ink); }
