/* ============================================================
   FX Allied — design tokens
   Concept: an exchange counter's ledger — black board, signal
   yellow accent, white paper, mono numerals for rates.
   ============================================================ */

:root {
  --ink: #0b0b0c;
  --ink-soft: #141416;
  --ink-line: rgba(245, 197, 24, 0.2);
  --cream: #ffffff;
  --cream-soft: #f4f4f3;
  --paper-line: rgba(11, 11, 12, 0.12);
  --gold: #f5c518;
  --gold-strong: #d9a900;
  /* yellow is unreadable as small text on white, so light sections use this */
  --gold-ink: #7d5f00;
  --text-on-ink: #f7f7f5;
  --text-on-ink-dim: #a3a3a0;
  --text-on-cream: #111112;
  --text-on-cream-dim: #56565a;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 14px;
  --wrap: 1180px;
  --header-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text-on-cream);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

/* light sections need the dark yellow, bright yellow on white is unreadable */
.about .eyebrow, .reviews .eyebrow { color: var(--gold-ink); }

/* ---------- buttons (bespoke, each with its own identity) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn-call {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(245, 197, 24, 0.28);
}
.btn-call:hover { background: var(--gold-strong); box-shadow: 0 8px 24px rgba(245, 197, 24, 0.38); }

.btn-directions {
  background: transparent;
  color: var(--text-on-cream);
  border-color: rgba(17, 17, 18, 0.24);
}
.btn-directions:hover { border-color: var(--gold-ink); color: var(--gold-ink); }

.hero .btn-directions {
  color: var(--text-on-ink);
  border-color: rgba(247, 247, 245, 0.3);
}
.hero .btn-directions:hover { border-color: var(--gold); color: var(--gold); }

.btn-small { padding: 10px 16px; font-size: 0.85rem; }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(11, 11, 12, 0.0);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}
.site-header.scrolled {
  background: rgba(11, 11, 12, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--ink-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-on-ink);
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.footer-mark { width: 36px; height: 36px; border-radius: 10px; }
.brand-word {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 1.02rem;
}

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  color: var(--text-on-ink-dim);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--text-on-ink); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 1.6px;
  background: var(--text-on-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  background: radial-gradient(120% 90% at 18% 0%, #1c1c1d 0%, var(--ink) 55%, #000000 100%);
  color: var(--text-on-ink);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--header-h);
}

.hero-scene { position: absolute; inset: 0; }
.parallax-layer { position: absolute; inset: -10% -5%; will-change: transform; }
.layer-grid, .layer-routes { width: 100%; height: 100%; }

.route { stroke-dashoffset: 0; }

.glyph {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--gold);
  opacity: 0.5;
  font-size: 2.6rem;
}
.glyph.small { font-size: 1.6rem; opacity: 0.38; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-block: 90px 70px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-on-ink-dim);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-ticker {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46px;
  border-top: 1px solid var(--ink-line);
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 2;
}
.ticker-track {
  display: flex;
  gap: 48px;
  padding-inline: 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--text-on-ink-dim);
  white-space: nowrap;
  animation: ticker 26s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections shared ---------- */

.section { padding-block: 96px; }
.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  margin-bottom: 28px;
  max-width: 20ch;
}

/* ---------- about ---------- */

.about { background: var(--cream-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.about-copy p { color: var(--text-on-cream-dim); font-size: 1.02rem; line-height: 1.65; max-width: 58ch; margin-bottom: 16px; }

.about-facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--paper-line);
  display: grid;
  gap: 12px;
}
.about-facts li { display: flex; justify-content: space-between; gap: 16px; font-size: 0.92rem; }
.fact-label { color: var(--text-on-cream-dim); }
.fact-value { font-family: var(--font-mono); font-weight: 500; text-align: right; }

.about-visual { display: flex; justify-content: center; }
.logo-card {
  width: min(340px, 100%);
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 20px;
  padding: 32px;
  transform: rotate(-3deg);
  box-shadow: 0 24px 60px rgba(11, 11, 12, 0.16), 0 2px 0 rgba(11, 11, 12, 0.05);
}
.logo-card img { width: 100%; height: auto; }

/* ---------- services ---------- */

.services { background: var(--ink); color: var(--text-on-ink); }
.services h2 { color: var(--text-on-ink); }

.section-lead {
  color: var(--text-on-ink-dim);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
  margin: -14px 0 36px;
}

/* interactive service ledger */

.svc-list {
  border-top: 1px solid var(--ink-line);
}
.svc { border-bottom: 1px solid var(--ink-line); }
.svc-head { margin: 0; font-size: inherit; font-weight: inherit; }

.svc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 8px 22px 4px;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: padding-left 0.25s ease, background-color 0.25s ease;
}
.svc-toggle:hover { padding-left: 14px; background: rgba(245, 197, 24, 0.05); }
.svc-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.svc-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-strong);
  opacity: 0.75;
  flex-shrink: 0;
  padding-top: 3px;
}

.svc-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.svc-name {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 600;
  color: var(--text-on-ink);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.svc-line { font-size: 0.88rem; color: var(--text-on-ink-dim); }
.svc-toggle:hover .svc-name { color: var(--gold); }

.svc-plus {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--ink-line);
  flex-shrink: 0;
  transition: border-color 0.25s ease, transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.svc-plus::before, .svc-plus::after {
  content: "";
  position: absolute;
  inset: 50% 8px auto 8px;
  height: 1.5px;
  background: var(--gold);
  transform: translateY(-50%);
  transition: opacity 0.25s ease;
}
.svc-plus::after { transform: translateY(-50%) rotate(90deg); }
.svc-toggle:hover .svc-plus { border-color: var(--gold); }
.svc-toggle[aria-expanded="true"] .svc-plus { transform: rotate(135deg); border-color: var(--gold); }
.svc-toggle[aria-expanded="true"] .svc-name { color: var(--gold); }

.svc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.svc-panel-in { overflow: hidden; min-height: 0; }
.svc.open .svc-panel { grid-template-rows: 1fr; }

.svc-panel-in { padding-inline-start: 52px; }
.svc-panel-in p {
  color: var(--text-on-ink-dim);
  font-size: 0.97rem;
  line-height: 1.65;
  max-width: 62ch;
  margin-bottom: 16px;
}
.svc-panel-in > :first-child { margin-top: 2px; }
.svc-panel-in > :last-child { margin-bottom: 30px; }

.svc-key {
  border-left: 2px solid var(--gold);
  padding-left: 16px;
}
.svc-key span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-on-ink-dim);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 6px 13px;
}

.svc-note {
  margin-top: 30px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-on-ink-dim);
  opacity: 0.75;
  max-width: 62ch;
}

/* ---------- reviews ---------- */

.reviews { background: var(--cream); }
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.review-card {
  margin: 0;
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
}
.review-card::before {
  content: "\201C";
  position: absolute;
  top: 12px;
  left: 22px;
  font-family: Georgia, serif;
  font-size: 3.2rem;
  color: var(--gold);
  opacity: 0.35;
  line-height: 1;
}
.review-card p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-on-cream);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.review-card footer { display: flex; align-items: center; gap: 10px; }
.review-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.review-name { font-weight: 600; font-size: 0.92rem; }

/* ---------- visit (hours + location) ---------- */

.visit { background: var(--ink); color: var(--text-on-ink); }
.visit h2 { color: var(--text-on-ink); }

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.visit-list { display: grid; gap: 20px; margin: 0 0 30px; }
.visit-list > div { padding-bottom: 18px; border-bottom: 1px solid var(--ink-line); }
.visit-list dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-ink-dim);
  margin-bottom: 6px;
}
.visit-list dd { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.visit-list a { color: var(--text-on-ink); text-decoration: none; border-bottom: 1px solid var(--ink-line); }
.visit-list a:hover { color: var(--gold); border-color: var(--gold); }
.hint { color: var(--text-on-ink-dim); font-size: 0.85rem; }

.visit-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ink-line);
  aspect-ratio: 4 / 3;
  filter: grayscale(0.15) contrast(1.05);
}
.visit-map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */

.site-footer { background: #000000; color: var(--text-on-ink-dim); padding-block: 44px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--gold); }
.footer-name { font-family: var(--font-mono); color: var(--text-on-ink); font-weight: 600; margin: 0; }
.footer-tag { margin: 2px 0 0; font-size: 0.82rem; }

.footer-contact { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.88rem; }
.footer-contact a { color: var(--text-on-ink-dim); text-decoration: none; }
.footer-contact a:hover { color: var(--gold); }

.footer-copy { font-size: 0.8rem; margin: 0; }

/* ---------- scroll reveals + entrance transitions ----------
   Hidden state is keyed on html.js, set by an inline script in <head>,
   so a visitor without JS (or before it runs) always sees the content.
   JS adds .in; the doubled class wins on specificity.                */

html.js .section .eyebrow,
html.js .section > .wrap > h2,
html.js .section-lead,
html.js .about-copy > p,
html.js .about-facts,
html.js .about-visual,
html.js .svc,
html.js .svc-note,
html.js .review-card,
html.js .visit-panel > *,
html.js .visit-map,
html.js .footer-inner > *,
html.js .hero-content > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.js .about-visual { transform: translateY(24px); }
html.js .review-card { transform: translateY(24px) scale(0.985); }

/* the revealed state must beat every selector in the broad hidden rule above */
html.js .in.in {
  opacity: 1 !important;
  transform: none !important;
}

/* nav underline */
.main-nav a { position: relative; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.main-nav a:hover::after, .main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* card + chip hovers */
.review-card {
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(11, 11, 12, 0.12);
  border-color: rgba(245, 197, 24, 0.65);
}

.logo-card { transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s ease; }
.logo-card:hover { transform: rotate(-1deg) translateY(-6px); box-shadow: 0 30px 70px rgba(11, 11, 12, 0.2); }

.chips li { transition: border-color 0.25s ease, color 0.25s ease; }
.chips li:hover { border-color: var(--gold); color: var(--text-on-ink); }

.visit-map { transition: filter 0.5s ease, border-color 0.5s ease; }
.visit-map:hover { filter: grayscale(0) contrast(1); border-color: rgba(245, 197, 24, 0.55); }

.brand-mark { transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.4s ease; }
.brand:hover .brand-mark { transform: translateY(-2px) rotate(-4deg); }

.footer-contact a, .visit-list a { transition: color 0.25s ease, border-color 0.25s ease; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .parallax-layer { transform: none !important; }
  .ticker-track { animation: none; }
  .btn, .svc-toggle, .svc-plus, .svc-panel,
  .review-card, .logo-card, .visit-map, .brand-mark, .main-nav a::after { transition: none; }

  html.js .section .eyebrow,
  html.js .section > .wrap > h2,
  html.js .section-lead,
  html.js .about-copy > p,
  html.js .about-facts,
  html.js .about-visual,
  html.js .svc,
  html.js .svc-note,
  html.js .review-card,
  html.js .visit-panel > *,
  html.js .visit-map,
  html.js .footer-inner > *,
  html.js .hero-content > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .about-grid, .visit-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta .btn-small span { display: none; }
  .header-cta .btn-small { padding: 10px; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(11, 11, 12, 0.97);
    backdrop-filter: blur(10px);
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--ink-line);
  }

  .hero-content { padding-block: 60px 90px; }
  .svc-toggle { gap: 14px; padding-block: 18px; align-items: flex-start; }
  .svc-panel-in { padding-inline-start: 34px; }
  .glyph { font-size: 1.8rem; }
  .glyph.small { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .btn { padding: 13px 18px; font-size: 0.9rem; }
  .wrap { padding-inline: 18px; }
}
