/* ==========================================================================
   LKO Trading — styles
   Palette sourced from the business card: warm off-white, near-black, orange.
   ========================================================================== */

:root {
  --bg: #F4F1EB;
  --bg-alt: #EDE9E1;
  --ink: #161412;
  --ink-soft: #45413B;
  --orange: #E56A19;
  --orange-dark: #C4560F;
  --orange-text: #A94A0B; /* AA-contrast orange for small text on off-white */
  --line: rgba(22, 20, 18, 0.14);
  --line-soft: rgba(22, 20, 18, 0.08);

  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --container: 1200px;
  --radius: 2px;

  --dur: 0.6s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* Document-top target for Home links. Must not live on the sticky header,
   or the browser thinks the target is already on screen. */
#top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  scroll-margin-top: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  text-decoration: none;
  font-size: 0.875rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-text);
  margin: 0 0 14px;
}

.section-heading {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

.section-sub {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 18px 0 0;
}

.accent-dot { color: var(--orange); }

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

.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
              color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-lg { padding: 17px 40px; }

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */

.logo {
  width: 128px;
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 241, 235, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-header.is-scrolled { border-bottom-color: var(--line-soft); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 6px;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--ink);
  padding: 10px 22px;
  border-radius: var(--radius);
  transition: background-color 0.25s var(--ease);
}
.nav-cta:hover { background: var(--orange); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
}

.nav-toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle-bars span {
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(90px, 14vh, 170px) clamp(100px, 15vh, 180px);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-globe {
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(380px, 45vw, 640px);
  color: var(--ink);
  opacity: 0.055;
}

.hero-route {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 45%;
  opacity: 0.5;
}

.hero-route-line {
  stroke-dasharray: 5 8;
  animation: route-drift 24s linear infinite;
}

@keyframes route-drift {
  to { stroke-dashoffset: -260; }
}

.hero-inner { position: relative; }

.hero-heading {
  font-size: clamp(2.6rem, 6.5vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 26px;
  max-width: 14ch;
}

.hero-sub {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 40px;
}

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

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

.section { padding-block: clamp(80px, 11vh, 140px); }

.section-head { margin-bottom: clamp(40px, 6vh, 64px); }

/* What we do */
#what-we-do { border-top: 1px solid var(--line-soft); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 20, 18, 0.3);
  box-shadow: 0 14px 34px -22px rgba(22, 20, 18, 0.35);
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--orange);
  margin-bottom: 22px;
}
.card-icon svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
}

.card p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Markets */
.section-markets {
  background: var(--bg-alt);
  border-block: 1px solid var(--line-soft);
}

.route-figure { margin: 0; }

.route-map {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.route-path { animation: route-drift 20s linear infinite; }

.route-label text {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--ink);
  text-anchor: middle;
}

.route-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 26px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.route-arrow { color: var(--orange); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}

.about-left { position: relative; }

.about-left::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  background: var(--orange);
  margin-top: 26px;
}

.about-lead {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.55;
  margin: 0 0 22px;
}

.about-right p:last-child {
  color: var(--ink-soft);
  margin: 0;
}

/* Contact */
.section-contact {
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-heading {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 20px;
}

.contact-sub {
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 36px;
}

.contact-email {
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 4px;
  margin-bottom: 44px;
  transition: color 0.25s var(--ease);
}
.contact-email:hover { color: var(--orange); }

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

.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(56px, 8vh, 80px) 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 48px;
}

.logo-footer { width: 140px; }

.footer-email {
  display: inline-block;
  margin-top: 20px;
  color: var(--bg);
  text-decoration: none;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
}
.footer-email:hover { color: var(--orange); }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-nav a {
  color: rgba(244, 241, 235, 0.75);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s var(--ease);
}
.footer-nav a:hover { color: var(--orange); }

.footer-bottom {
  border-top: 1px solid rgba(244, 241, 235, 0.14);
  padding-block: 22px;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(244, 241, 235, 0.55);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   Content is only hidden when JS confirms it can reveal it again (the
   .has-reveal class). Without JS everything stays visible.
   Reveal uses an animation, not a transition, so the stagger delay cannot
   interfere with hover transitions on the cards.
   -------------------------------------------------------------------------- */

.has-reveal .reveal { opacity: 0; }

.has-reveal .reveal.is-visible {
  animation: reveal-rise var(--dur) var(--ease) both;
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Stagger cards slightly */
.has-reveal .card-grid .card.is-visible:nth-child(2) { animation-delay: 0.08s; }
.has-reveal .card-grid .card.is-visible:nth-child(3) { animation-delay: 0.16s; }
.has-reveal .card-grid .card.is-visible:nth-child(4) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-route-line, .route-path { animation: none; }
  .btn, .card { transition: none; }
}

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

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

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .site-nav { position: static; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 10px 0 18px;
  }

  .nav-menu.is-open { display: flex; }

  .nav-menu li { text-align: center; }

  .nav-link {
    display: block;
    padding: 14px 24px;
  }
  .nav-link::after { content: none; }

  .nav-cta-item { margin-top: 12px; }
  .nav-cta {
    display: inline-block;
    margin-inline: 24px;
  }

  .about-grid { grid-template-columns: 1fr; }

  .hero-globe {
    right: -180px;
    opacity: 0.04;
  }
}

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

  .route-label { display: none; }

  .hero { padding-block: 72px 90px; }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .logo { width: 110px; }

  .footer-inner { flex-direction: column; }

  .route-caption { font-size: 0.72rem; }
}
