/* ==========================================================================
   Gifgof Financial Technologies — landing page styles
   Palette: near-black terminal base, amber "signal" accent, teal "bid" accent
   Type: Archivo (display) / Inter (body) / IBM Plex Mono (data & labels)
   ========================================================================== */

:root {
  --bg: #0a0b0d;
  --bg-elevated: #101115;
  --surface: #15161b;
  --surface-hover: #191a20;
  --border: #24262c;
  --border-strong: #34363e;

  --text: #edeef1;
  --text-dim: #9a9da6;
  --text-faint: #64676f;

  --accent: #e8a33d;       /* signal amber — asks / brand */
  --accent-strong: #f3b65c;
  --bid: #49c9b8;          /* signal teal — bids */

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --max-width: 1180px;
  --edge: 24px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* subtle film-grain / noise overlay for texture on the dark field */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: #14140f;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 1000;
  background: var(--accent);
  color: #17130a;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 3px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 16px;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn-solid {
  background: var(--accent);
  color: #17130a;
  font-weight: 600;
}
.btn-solid:hover { background: var(--accent-strong); transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-text {
  color: var(--text-dim);
  padding: 12px 4px;
}
.btn-text:hover { color: var(--text); }

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand-mark { display: block; }

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.site-nav a { transition: color 0.15s ease; }
.site-nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px var(--edge) 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
}
.mobile-nav a {
  padding: 12px 4px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}
.mobile-nav .btn { margin-top: 12px; justify-content: center; }
.mobile-nav .btn.btn-solid { color: #17130a; }

.mobile-nav.open { display: flex; }

@media (max-width: 860px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background: radial-gradient(60% 60% at 30% 20%, rgba(232, 163, 61, 0.10), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(73, 201, 184, 0.08), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 22px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.eyebrow-plain { margin-bottom: 14px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- hero visual: live order-book depth panel --- */

.visual-frame {
  position: relative;
  background: linear-gradient(180deg, var(--bg-elevated), var(--surface));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 14px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}

#bookCanvas {
  display: block;
  width: 100%;
  height: 290px;
  border-radius: 4px;
}

.visual-legend {
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px;
  gap: 18px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

.visual-legend span { display: inline-flex; align-items: center; gap: 6px; }

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.swatch-bid { background: var(--bid); }
.swatch-ask { background: var(--accent); }
.swatch-bot { background: var(--text); border-radius: 50%; }

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}

/* ---------------------------------------------------------------------- */
/* Ticker                                                                  */
/* ---------------------------------------------------------------------- */

.ticker-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
  padding: 14px 0;
}

.ticker + .ticker {
  border-top: 1px solid var(--border);
}

.ticker-track {
  display: inline-flex;
  gap: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  animation: scroll-left 38s linear infinite;
  padding-right: 40px;
}

.ticker-track-alt {
  animation-duration: 32s;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

.ticker-track .sym { color: var(--text); font-weight: 600; margin-right: 8px; }
.ticker-track .up { color: var(--bid); }
.ticker-track .down { color: #e07a6b; }

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------------- */
/* Sections                                                                */
/* ---------------------------------------------------------------------- */

.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  max-width: 22ch;
}

.section-lede {
  color: var(--text-dim);
  font-size: 16.5px;
  max-width: 58ch;
  margin: 0 0 48px;
}

/* --- strategies --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.strategy-card {
  background: var(--surface);
  padding: 30px 26px;
  transition: background 0.2s ease;
}
.strategy-card:hover { background: var(--surface-hover); }

.strategy-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 14px 0 10px;
}

.strategy-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0;
}

.strategy-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  background: rgba(232, 163, 61, 0.1);
  border: 1px solid rgba(232, 163, 61, 0.3);
  border-radius: 3px;
  padding: 3px 8px;
}

.strategy-card-muted { background: var(--bg-elevated); }
.strategy-card-muted:hover { background: var(--surface); }
.strategy-card-muted .strategy-tag {
  color: var(--text-dim);
  background: transparent;
  border-color: var(--border-strong);
}

@media (max-width: 940px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* --- markets --- */

.markets-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
}

.markets-copy .section-lede { margin-bottom: 0; }

.markets-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.markets-list li {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.markets-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-strong);
  width: 64px;
  flex: none;
}

.markets-list h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 4px;
}

.markets-list p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0;
  max-width: 48ch;
}

@media (max-width: 800px) {
  .markets-grid { grid-template-columns: 1fr; }
}

/* --- institutions --- */

.serve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.serve-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px 26px;
  background: var(--surface);
}

.serve-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0 0 10px;
}

.serve-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin: 0;
}

.serve-note {
  margin: 28px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  max-width: 58ch;
}

@media (max-width: 800px) {
  .serve-grid { grid-template-columns: 1fr; }
}

/* --- engineering --- */

.section-eng { text-align: center; }

.eng-inner { max-width: 800px; }

.eng-quote {
  margin: 0 auto 30px;
  padding: 0;
}

.eng-quote p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0;
}

.eng-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
}

.eng-tags span {
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 7px 14px;
}

/* --- contact --- */

.contact-section { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-inner .section-title { max-width: 20ch; }
.contact-inner .section-lede { margin-bottom: 32px; }

.email-link {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--accent-strong);
  border-bottom: 1px solid rgba(232, 163, 61, 0.4);
  padding-bottom: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.email-link:hover { color: var(--text); border-color: var(--text-dim); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
}

.footer-inner a:hover { color: var(--text); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------- */
/* Scroll reveal                                                           */
/* ---------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}