/* ==========================================================================
   Byfinex — site stylesheet
   Theme: deep navy + gold. Headings: Playfair Display, body: Inter.
   ========================================================================== */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: #0f1726;
  --surface-2: #131d30;
  --line: rgba(255, 255, 255, 0.08);
  --text: #edf0f6;
  --muted: #98a4b8;
  --gold: #e5b94e;
  --gold-2: #f6d98a;
  --gold-3: #c9952a;
  --gold-grad: linear-gradient(135deg, #f6d98a 0%, #e5b94e 50%, #c9952a 100%);
  --radius: 18px;
  --container: 1140px;
  --header-h: 72px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

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

.muted { color: var(--muted); }

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand .mark { width: 30px; height: 30px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:hover, .nav a.active { color: var(--text); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  color: var(--text);
}

.menu-btn span {
  display: block;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 78% 18%, rgba(229, 185, 78, 0.18), transparent 60%),
    radial-gradient(700px 500px at 15% 85%, rgba(58, 92, 168, 0.22), transparent 60%),
    linear-gradient(180deg, #0a1020 0%, var(--bg) 100%);
}

/* Background video (assets/video/hero.mp4) with a dark overlay for legibility */
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: scale(1.02);
}

.hero-video.ready { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 48%, rgba(7, 11, 20, 0.55), transparent 100%),
    radial-gradient(900px 600px at 78% 18%, rgba(229, 185, 78, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(7, 11, 20, 0.66) 0%, rgba(7, 11, 20, 0.50) 45%, rgba(7, 11, 20, 0.97) 100%);
}

/* Once the video is playing, drop the decorative grid and chart line */
.hero.has-video::before,
.hero.has-video .hero-chart { display: none; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-chart {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  width: 100%;
  height: 62%;
  pointer-events: none;
  opacity: 0.75;
}

.hero-chart .line {
  fill: none;
  stroke: url(#heroLine);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: draw 3.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.hero-chart .area { fill: url(#heroArea); opacity: 0; animation: fade 1.6s ease 2.2s forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.hero-inner {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 48px) 24px 120px;
}

.hero h1 {
  font-size: clamp(44px, 7.2vw, 96px);
  font-weight: 600;
  line-height: 1.05;
}

.hero h1 .rotator {
  display: inline-block;
  min-height: 1.05em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero h1 .rotator.out { opacity: 0; transform: translateY(10px); }

.hero h1 { text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55); }

.hero .lead {
  margin: 28px auto 0;
  max-width: 620px;
  font-size: 18px;
  color: rgba(237, 240, 246, 0.86);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 2;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--gold);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: var(--gold-grad);
  color: #1a1305;
  box-shadow: 0 10px 30px rgba(229, 185, 78, 0.25);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

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

.section { padding: 110px 0; }

.section-alt { background: var(--bg-2); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 64px; }

.section-head h2 {
  font-size: clamp(36px, 5vw, 60px);
}

.section-head .sub {
  margin-top: 14px;
  font-size: 19px;
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

/* Cards */

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  padding: 40px 34px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--gold-grad);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 185, 78, 0.35);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.card:hover::before { opacity: 1; }

.card .icon {
  width: 56px; height: 56px;
  margin-bottom: 26px;
}

.card .icon svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 28px;
  margin-bottom: 6px;
}

.card .tag {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.card p:last-child { margin-bottom: 0; color: var(--muted); font-size: 16px; }

/* Feature list (why us) */

.feature {
  text-align: center;
  padding: 36px 26px;
}

.feature .icon {
  width: 54px; height: 54px;
  margin: 0 auto 22px;
}

.feature .icon svg { width: 100%; height: 100%; }

.feature h3 { font-size: 26px; margin-bottom: 12px; }

.feature p { color: var(--muted); font-size: 16px; margin: 0; }

/* Statement band */

.band {
  position: relative;
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 50% 120%, rgba(229, 185, 78, 0.16), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, #0d1425 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band h2 {
  font-size: clamp(32px, 4.6vw, 54px);
  max-width: 820px;
  margin: 0 auto 20px;
}

.band p {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 18px;
}

/* Page hero (inner pages) */

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 110px) 0 70px;
  text-align: center;
  background:
    radial-gradient(700px 380px at 50% 0%, rgba(229, 185, 78, 0.14), transparent 65%),
    linear-gradient(180deg, #0a1020 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 { font-size: clamp(40px, 6vw, 76px); }

.page-hero .sub { margin-top: 16px; color: var(--muted); font-size: 19px; }

/* Prose (about) */

.prose {
  max-width: 820px;
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.85;
}

.prose p + p { margin-top: 1.4em; }

.prose .lead-line {
  font-family: var(--font-head);
  font-size: 26px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 1.2em;
}

/* Team */

.member {
  padding: 42px 38px;
}

.member .avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  font-family: var(--font-head);
  font-size: 26px;
  color: #1a1305;
  background: var(--gold-grad);
}

.member h3 { font-size: 28px; margin-bottom: 4px; }

.member .role {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.member p:last-child { margin: 0; color: var(--muted); font-size: 16px; }

.member.compact { padding: 32px 34px; }
.member.compact .avatar { width: 56px; height: 56px; font-size: 20px; margin-bottom: 18px; }
.member.compact h3 { font-size: 24px; }
.member.compact .role { margin-bottom: 0; }

/* Contacts */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.contact-card { padding: 44px 40px; }

.contact-card .icon { width: 44px; height: 44px; margin-bottom: 22px; }
.contact-card .icon svg { width: 100%; height: 100%; }

.contact-card h3 { font-size: 26px; margin-bottom: 14px; }

.contact-card address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.9;
}

.contact-card .email {
  display: inline-block;
  margin-top: 6px;
  font-size: 20px;
  color: var(--text);
  border-bottom: 1px solid rgba(229, 185, 78, 0.5);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-card .email:hover { color: var(--gold-2); border-color: var(--gold-2); }

.hours {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.hours li:last-child { border-bottom: 0; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 70px 0 40px;
  text-align: center;
  background: var(--bg-2);
}

.site-footer .brand { display: flex; justify-content: center; margin-bottom: 18px; }

.site-footer .email {
  display: inline-block;
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 22px;
}

.site-footer .email:hover { color: var(--gold-2); }

.site-footer .legal {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.site-footer .legal p { margin: 0; }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.footer-nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-chart .line { animation: none; stroke-dashoffset: 0; }
  .hero-chart .area { animation: none; opacity: 1; }
  .scroll-cue { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .menu-btn { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    background: rgba(7, 11, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  body.menu-open .nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { background: rgba(7, 11, 20, 0.97); border-bottom-color: var(--line); }

  .nav a { font-size: 18px; }

  .section { padding: 80px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .card, .member { padding: 32px 26px; }
  .hero-inner { padding-bottom: 110px; }
  .band { padding: 90px 0; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .section-head { margin-bottom: 44px; }
  .hero .lead { font-size: 16px; }
  .btn { padding: 13px 22px; width: 100%; }
}
