/*
 * 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; }
}
