/* ============================================================
   BACKHOUSE TRADING — Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: calc(68px + env(safe-area-inset-top)); background: var(--navy); }
@media (max-width: 768px) { html { scroll-padding-top: calc(90px + env(safe-area-inset-top)); } }
img { max-width: 100%; display: block; }

/* --- Design Tokens --- */
:root {
  --navy:        #08152A;
  --blue:        #3268C9;
  --blue-dark:   #2356B0;
  --blue-subtle: #8BA3DC;
  --blue-muted:  #EEF3FF;
  --dark:        #333333;
  --white:       #FFFFFF;
  --off-white:   #F8F9FB;
  --gray-100:    #E5E7EB;
  --gray-300:    #D1D5DB;
  --gray-400:    #9CA3AF;
  --gray-500:    #6B7280;
  --gray-600:    #4B5563;
  --gray-700:    #374151;
  --gray-900:    #111827;
  --positive:    #16A34A;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --section-pad: clamp(56px, 7vw, 96px);
  --page-margin: clamp(24px, 7vw, 108px);
  --max-width:   1200px;
  --radius:      8px;
  --transition:  180ms ease;
}

/* --- Base --- */
body {
  font-family: var(--font);
  color: var(--gray-900);
  background: transparent;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: calc(68px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  transition: background 280ms ease, box-shadow 280ms ease;
}
.nav--scrolled {
  background: rgba(8, 21, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.07);
}
.nav__inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav__logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__logo-img {
  height: 30px;
  width: auto;
  display: block;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 44px;
  list-style: none;
  margin-left: auto;
}
.nav__links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
  text-decoration: none;
}
.nav__links a:hover,
.nav__links a.active { color: var(--white); }

.nav__cta {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white) !important;
  background: var(--blue);
  padding: 9px 20px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background var(--transition) !important;
}
.nav__cta:hover { background: var(--blue-dark) !important; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 201;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 260ms ease, opacity 260ms ease;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: 199;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}
.nav__drawer.open { opacity: 1; pointer-events: all; }
.nav__drawer a {
  font-size: 24px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--transition);
  padding: 12px 0;
}
.nav__drawer a:hover { color: var(--white); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 65% 40%, rgba(50, 104, 201, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 10% 85%, rgba(50, 104, 201, 0.07) 0%, transparent 55%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 10%, transparent 80%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(120px + env(safe-area-inset-top)) var(--page-margin) 64px;
  width: 100%;
}
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 28px;
}
.hero__tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--blue);
  flex-shrink: 0;
}
.hero__title {
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 28px;
  max-width: 680px;
}
.hero__title em {
  font-style: normal;
  color: rgba(255,255,255,0.38);
}
.hero__subtitle {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 500px;
  margin-bottom: 44px;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
  animation: bounce 2s ease-in-out infinite;
}
.hero__scroll-cue:hover { color: rgba(255,255,255,0.7); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(50, 104, 201, 0.38);
}
.btn--ghost {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border-color: rgba(255,255,255,0.36);
}

/* ============================================================
   SECTION TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 18px;
}
.section-lead {
  font-size: 17px;
  line-height: 1.72;
  color: var(--gray-500);
  max-width: 560px;
}

/* ============================================================
   OVERVIEW
   ============================================================ */
.overview {
  padding: var(--section-pad) 0;
  background: var(--white);
}
.overview__inner {
  max-width: 900px;
}
.overview__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.feature-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--blue-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue);
}
.feature-item__title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.feature-item__text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-500);
}

/* ============================================================
   TEAM
   ============================================================ */
.team { padding: var(--section-pad) 0; }
.team__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 56px;
  max-width: 720px;
}
.team-card {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  background: var(--off-white);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 40px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.team-card:hover {
  box-shadow: 0 8px 36px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.team-card__avatar {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: var(--blue-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.team-card__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 3px;
}
.team-card__role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.team-card__bio {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--gray-500);
}
.team-card__contact {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.team-card__contact a {
  font-size: 13px;
  color: var(--gray-600);
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
}
.team-card__contact a:hover { color: var(--blue); }
.team-card__edu {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-100);
}
.team-card__seal {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  opacity: 0.8;
}
.team-card__nfa {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--blue);
  background: var(--blue-muted);
  border: 1px solid rgba(50,104,201,0.15);
  border-radius: 5px;
  padding: 4px 10px;
  white-space: nowrap;
  margin-left: auto;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: var(--section-pad) 0;
  background: var(--off-white);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 36px;
}
.contact-item__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 5px;
}
.contact-item__icon {
  color: var(--blue);
  flex-shrink: 0;
}
.contact-item__value {
  font-size: 15.5px;
  color: var(--gray-900);
}
.contact-item__value a {
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-300);
  transition: all var(--transition);
}
.contact-item__value a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

.form {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 40px;
}
.form__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.form__subtitle {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.6;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form__group { margin-bottom: 14px; }
.form__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 5px;
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 104, 201, 0.1);
}
.form__textarea { resize: vertical; min-height: 72px; }
.form__note {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 14px;
  line-height: 1.65;
}
.form__success {
  text-align: center;
  padding: 48px 24px;
  color: var(--positive);
  font-size: 15px;
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  padding: 48px 0 32px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer__brand-img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}
.footer__brand-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  line-height: 1.6;
}
.footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up[data-delay="1"] { transition-delay: 0.08s; }
.fade-up[data-delay="2"] { transition-delay: 0.16s; }
.fade-up[data-delay="3"] { transition-delay: 0.24s; }
.fade-up[data-delay="4"] { transition-delay: 0.32s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero { align-items: flex-start; }
  .hero__content { padding-top: calc(186px + env(safe-area-inset-top)); padding-bottom: calc(96px + env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
  .hero__subtitle { margin-bottom: 48px; }
  .hero__actions { margin-top: auto; }
  .hero__actions .btn--ghost {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
    width: 100%;
    justify-content: center;
  }
  .hero__actions .btn--ghost:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
  }
  .nav { height: auto; }
  .nav__inner { flex-wrap: wrap; padding-top: 16px; padding-bottom: 0; justify-content: center; align-content: flex-start; gap: 0; row-gap: 16px; }
  .nav__logo { order: 1; }
  .nav__cta { display: none; }
  .nav__hamburger { display: none; }
  .nav__links {
    order: 2;
    width: 100%;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0 6px;
    margin-top: 2px;
    border-top: 1px solid rgba(255,255,255,0.07);
    justify-content: space-evenly;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { font-size: 11px; letter-spacing: 0.07em; }
  .nav__drawer { display: none !important; }
  .overview__features { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 48px; }
  .team-card { flex-direction: column; gap: 24px; }
  .team-card__avatar { width: 80px; height: 80px; }
}

@media (max-width: 540px) {
  .hero__actions { flex-direction: column; }
  .form { padding: 24px; }
  .form__row { grid-template-columns: 1fr; }
}
