/* tanso.markets — frutiger aero + dopamine neon, editorial flow, water bubbles, glitch accents */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --aero: #d0dce8;
  --aero-light: #e0e8f0;
  --neon-teal: #00e8b8;
  --neon-pink: #e800a8;
  --steel: #2a3440;
  --card: #f4f8fc;
  --sepia: #8a7a6a;
  --bg: #f4f8fc;
}

html, body {
  background:
    linear-gradient(180deg, var(--aero) 0%, var(--aero-light) 60%, var(--bg) 100%) fixed;
  color: var(--steel);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.8;
  overflow-x: hidden;
}

body {
  opacity: 0;
  animation: pageIn 0.8s ease forwards;
}

@keyframes pageIn { to { opacity: 1; } }

/* ---------- Bubbles (CO2 carbonation) ---------- */
.bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -60px;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0,232,184,0.55), rgba(0,232,184,0.04) 70%);
  opacity: 0.18;
  animation: bubbleRise var(--dur) linear var(--delay) infinite;
  filter: blur(0.5px);
}

@keyframes bubbleRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.18; }
  50%  { transform: translateY(-50vh) translateX(8px); opacity: 0.16; }
  90%  { opacity: 0.10; }
  100% { transform: translateY(-110vh) translateX(-6px); opacity: 0; }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244,248,252,0.85);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(42,52,64,0.08);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.logo {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--steel);
}

.logo-tanso { color: var(--steel); }
.logo-dot   { color: var(--neon-pink); }
.logo-markets { color: var(--neon-teal); filter: drop-shadow(0 0 6px rgba(0,232,184,0.4)); }

.topnav {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
  margin-right: 1rem;
}

.topnav a {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  color: var(--steel);
  text-decoration: none;
  opacity: 0.78;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.topnav a:hover {
  color: var(--neon-pink);
  opacity: 1;
}

.ticker {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: rgba(0,232,184,0.1);
  border: 1px solid rgba(0,232,184,0.3);
  color: var(--steel);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-teal);
  box-shadow: 0 0 8px var(--neon-teal);
  animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 5;
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 4rem 1.6rem;
}

.hero-card {
  width: min(960px, 100%);
  padding: 3.4rem 3rem;
  border-radius: 14px;
  position: relative;
  transform: scale(0.96);
  opacity: 0;
  animation: cardRise 1.1s cubic-bezier(.2,.7,.2,1) 0.2s forwards;
}

@keyframes cardRise {
  to { transform: scale(1); opacity: 1; }
}

.glossy {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(244,248,252,0.85) 50%, rgba(224,232,240,0.85) 100%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.06),
    0 24px 56px rgba(42,52,64,0.10),
    inset 0 1px 0 rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glossy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 14px 14px 100% 100% / 14px 14px 30% 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
  pointer-events: none;
}

.hero-meta {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.04;
  color: var(--steel);
  position: relative;
  display: inline-block;
  margin-bottom: 1.6rem;
}

.hero-title .dot-pink {
  color: var(--neon-pink);
  filter: drop-shadow(0 0 12px rgba(232,0,168,0.45));
}

.neon-line {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-teal) 12%, var(--neon-teal) 88%, transparent);
  box-shadow: 0 0 14px rgba(0,232,184,0.7);
  margin-top: 0.4rem;
  width: 0;
  animation: neonDraw 1.4s ease 1.0s forwards;
}

@keyframes neonDraw {
  to { width: 100%; }
}

.hero-sub {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--steel);
  opacity: 0.86;
  max-width: 60ch;
  margin-bottom: 2.4rem;
}

.hero-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.hero-stat {
  padding: 0.95rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(208,220,232,0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 6px rgba(42,52,64,0.04);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--sepia);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.4rem;
}

.stat-val {
  font-size: 1.05rem;
  color: var(--steel);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.up { color: var(--neon-teal); font-size: 0.78rem; }
.down { color: var(--neon-pink); font-size: 0.78rem; }
.stat-val .up { color: var(--neon-teal); }
.stat-val .down { color: var(--neon-pink); }

/* ---------- Mono helper ---------- */
.mono {
  font-family: 'Fira Code', 'Space Mono', monospace;
  letter-spacing: 0.01em;
}

/* ---------- Glitch effect ---------- */
[data-glitch] {
  display: inline-block;
}

[data-glitch].is-glitch {
  animation: glitch 100ms steps(2) 2;
}

@keyframes glitch {
  0%   { transform: translateX(0); filter: hue-rotate(0deg); }
  50%  { transform: translateX(2px); filter: hue-rotate(90deg); }
  100% { transform: translateX(0); filter: hue-rotate(0deg); }
}

/* ---------- Editorial sections ---------- */
main {
  position: relative;
  z-index: 5;
}

.lede-section {
  padding: 5rem 1.6rem 3rem;
  background: linear-gradient(180deg, transparent, rgba(244,248,252,0.6) 30%, rgba(244,248,252,0.6));
}

.lede-inner {
  max-width: 720px;
  margin: 0 auto;
}

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon-pink);
  margin-bottom: 0.9rem;
}

h2 {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.1;
  color: var(--steel);
  margin-bottom: 1.4rem;
}

h3 {
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--steel);
  margin: 1.8rem 0 0.6rem;
}

p { margin-bottom: 1rem; }

.lede-text {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.7;
}

.inline-data {
  background: rgba(0,232,184,0.18);
  padding: 0 0.3rem;
  border-radius: 3px;
  color: var(--steel);
}

/* ---------- Tickers grid ---------- */
.tickers {
  padding: 4rem 1.6rem;
}

.tickers-head {
  max-width: 1180px;
  margin: 0 auto 2.4rem;
}

.ticker-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.ticker-card {
  padding: 1.4rem 1.5rem;
  border-radius: 12px;
  position: relative;
}

.ticker-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.t-mono {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--steel);
}

.t-pill {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(232,0,168,0.1);
  color: var(--neon-pink);
  border: 1px solid rgba(232,0,168,0.25);
  text-transform: lowercase;
}

.t-price {
  font-family: 'Fira Code', monospace;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  color: var(--steel);
  margin-bottom: 0.2rem;
}

.t-delta {
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
}

.t-spark svg {
  width: 100%;
  height: 56px;
  display: block;
}

.t-foot {
  font-size: 0.72rem;
  color: var(--sepia);
  margin-top: 0.6rem;
}

/* ---------- Editorial vintage ---------- */
.editorial {
  padding: 5rem 1.6rem;
}

.editorial-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3rem;
  align-items: start;
}

.editorial-vintage {
  position: sticky;
  top: 100px;
  padding: 1.6rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(244,238,228,0.6), rgba(232,224,212,0.5));
  border: 1px solid rgba(138,122,106,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.vintage-quote {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sepia);
  line-height: 1.5;
  margin: 1rem 0;
}

.vintage-attr {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--sepia);
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 1.2rem;
}

.vintage-photo {
  margin-top: 1.2rem;
  aspect-ratio: 4 / 3;
  background-image: url('https://images.unsplash.com/photo-1518186285589-2f7649de83e0?auto=format&fit=crop&w=800&q=60');
  background-size: cover;
  background-position: center;
  filter: sepia(0.85) saturate(0.6) opacity(0.45);
  border-radius: 6px;
  border: 1px solid rgba(138,122,106,0.3);
}

.editorial-body {
  font-size: clamp(16px, 1.55vw, 19px);
  line-height: 1.85;
}

.byline {
  font-size: 0.82rem;
  color: var(--sepia);
  margin-top: 2rem;
  letter-spacing: 0.06em;
}

/* ---------- Archive ---------- */
.archive {
  padding: 4rem 1.6rem 6rem;
}

.archive .kicker, .archive h2 {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.archive h2 { margin-bottom: 2rem; }

.archive-list {
  max-width: 1180px;
  margin: 0 auto;
  list-style: none;
  border-top: 1px solid rgba(42,52,64,0.1);
}

.archive-list li {
  border-bottom: 1px solid rgba(42,52,64,0.1);
}

.archive-list a {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--steel);
  position: relative;
  transition: color 0.3s ease;
}

.archive-list a:hover { color: var(--neon-pink); }

.archive-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px; width: 0;
  background: var(--neon-teal);
  box-shadow: 0 0 8px rgba(0,232,184,0.5);
  transition: width 0.45s ease;
}

.archive-list a:hover::after { width: 100%; }

.archive-list em {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-weight: 400;
}

.a-date {
  font-size: 0.78rem;
  color: var(--sepia);
}

/* ---------- Footer ---------- */
.site-foot {
  padding: 3rem 1.6rem 4rem;
  position: relative;
  z-index: 5;
}

.foot-card {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.8rem 2rem;
  border-radius: 12px;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.foot-note {
  color: var(--sepia);
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topnav { display: none; }
  .hero-row { grid-template-columns: repeat(2, 1fr); }
  .ticker-grid { grid-template-columns: repeat(2, 1fr); }
  .editorial-grid { grid-template-columns: 1fr; }
  .editorial-vintage { position: static; }
}

@media (max-width: 560px) {
  .hero-card { padding: 2.2rem 1.4rem; }
  .hero-row, .ticker-grid { grid-template-columns: 1fr; }
  .ticker { font-size: 0.7rem; }
  .archive-list a { grid-template-columns: 50px 1fr; row-gap: 0.2rem; }
  .a-date { grid-column: 2; }
}
