/* fxlan.com — mobile-first stylesheet.
   Palette, type and spacing are the ones of the Grok mockup (V1).
   Breakpoints: base = phone, 600px = large phone / small tablet,
   768px = inline navigation, 1024px = three-column activities. */

:root {
  --bg: #12141c;
  --bg-elev: #171925;
  --ink: #f4f4f2;
  --muted: #9aa0b0;
  --line: rgba(244, 244, 242, 0.1);
  --gold: #c4b08a;
  --gold-dim: rgba(196, 176, 138, 0.35);
  --max: 1120px;
  --header: 64px;
  --gutter: 32px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  min-height: 100%;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244, 244, 242, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 244, 242, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 72%);
  z-index: 0;
}

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

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

.wrap {
  width: min(var(--max), calc(100% - var(--gutter)));
  margin-inline: auto;
}

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

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header);
  z-index: 20;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

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

.mark {
  flex: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mark span {
  display: none;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-left: 0.55em;
  font-weight: 400;
  font-size: 11px;
}

nav {
  display: flex;
  gap: 12px;
}

nav a {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease, scale 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
}

/* Very narrow phones without JS: keep the inline menu on one line. */
@media (max-width: 359.98px) {
  nav {
    gap: 8px;
  }

  nav a {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
}

/* Hamburger: only exists once site.js runs (html.js). Without JS the
   compact inline menu above stays in place, so the site is never cut off. */
.nav-toggle {
  display: none;
}

@media (max-width: 767.98px) {
  .js .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0 10px;
    border: 0;
    background: none;
    color: var(--ink);
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    height: 1.5px;
    width: 100%;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .js nav {
    position: fixed;
    top: var(--header);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header));
    flex-direction: column;
    gap: 0;
    padding: 24px calc(var(--gutter) / 2) 40px;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    translate: 0 -8px;
    transition: opacity 0.2s ease, translate 0.2s ease, visibility 0s linear 0.2s;
  }

  .js.nav-open nav {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
    transition: opacity 0.2s ease, translate 0.2s ease, visibility 0s;
  }

  .js nav a {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    letter-spacing: 0.18em;
    color: var(--ink);
  }

  .js.nav-open,
  .js.nav-open body {
    overflow: hidden;
  }
}

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

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header) + 32px) 24px 64px;
}

/* Dubai skyline, full bleed, behind the logo. */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  will-change: transform;
}

.hero-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 40%;
}

/* Navy overlay 0.5 + radial glow behind the logo + short fade into the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 42% at 50% 47%, rgba(18, 20, 28, 0.78) 0%, rgba(18, 20, 28, 0.35) 55%, transparent 80%),
    linear-gradient(to bottom, transparent 84%, var(--bg) 100%),
    rgba(18, 20, 28, 0.5);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
}

.logo {
  width: min(520px, 82vw);
  height: auto;
}

.lede {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.rule {
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

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

section.block {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

/* The hero already fades into the page: no border, shorter lead-in. */
#activities {
  padding-top: 56px;
  border-top: 0;
}

.kicker {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

h2 {
  margin: 0 0 48px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------- activity cards */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

article {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, scale 0.25s ease;
}

.card-media {
  position: relative;
  flex: none;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}

/* The frame size comes from the layout, never from the photo's own ratio. */
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.85) brightness(0.88);
  transition: filter 0.3s ease;
}

/* Per-photo framing when the card crops the picture (tablet, desktop). */
/* Rack: the equipment sits right of a dark pillar. */
.card-media img[src*="information-systems"] {
  object-position: 95% 50%;
}

/* Trading: the file is cropped to the rising part; keep the peak in frame. */
.card-media img[src*="trading"] {
  object-position: 50% 15%;
}

/* Light vignette + blend into the card background. */
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(18, 20, 28, 0.55) 100%),
    linear-gradient(to bottom, transparent 75%, var(--bg-elev) 100%);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 22px 26px;
}

article h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

article p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

article .note {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}

article .note span {
  color: var(--gold);
}

@media (hover: hover) {
  article:hover {
    scale: 1.02;
    border-color: var(--gold-dim);
  }

  article:hover .card-media img {
    filter: saturate(0.95) brightness(1);
  }

  nav a:hover,
  nav a:focus-visible {
    scale: 1.02;
  }
}

/* --------------------------------------------------------------- company */

.company p {
  max-width: 42em;
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 17px;
}

.company p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------- contact */

.mail {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 4px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.mail:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

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

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ------------------------------------------------ fade-in on scroll (JS) */

/* Only elements that site.js marks as pending are hidden: without JS, or if
   site.js fails, every card stays visible. */
.reveal-pending {
  opacity: 0;
  translate: 0 18px;
}

.reveal-in {
  transition:
    opacity 0.6s ease-out var(--reveal-delay, 0s),
    translate 0.6s ease-out var(--reveal-delay, 0s),
    border-color 0.25s ease,
    scale 0.25s ease;
}

/* =========================================================== ≥ 600px */

@media (min-width: 600px) {
  :root {
    --gutter: 48px;
  }

  .mark span {
    display: inline;
  }

  .hero {
    padding-bottom: 80px;
  }

  section.block {
    padding: 96px 0;
  }

  #activities {
    padding-top: 72px;
  }

  /* Tablet: horizontal cards, photo on the left. */
  article {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .card-media {
    aspect-ratio: auto;
    min-height: 240px;
    height: 100%;
  }

  .card-media::after {
    background:
      radial-gradient(ellipse at center, transparent 55%, rgba(18, 20, 28, 0.55) 100%),
      linear-gradient(to right, transparent 75%, var(--bg-elev) 100%);
  }

  .card-body {
    justify-content: center;
    padding: 28px 28px 30px;
  }

  footer .wrap {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
  }
}

/* =========================================================== ≥ 768px */

@media (min-width: 768px) {
  :root {
    --header: 72px;
  }

  nav {
    gap: 22px;
  }

  nav a {
    font-size: 12px;
    letter-spacing: 0.14em;
  }
}

/* ========================================================== ≥ 1024px */

@media (min-width: 1024px) {
  nav {
    gap: 28px;
  }

  nav a {
    font-size: 13px;
  }

  /* Three equal cards; photo on top at a fixed height (55-57% of the card). */
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
  }

  article {
    display: flex;
    flex-direction: column;
  }

  .card-media {
    height: 340px;
    min-height: 0;
  }

  .card-media::after {
    background:
      radial-gradient(ellipse at center, transparent 55%, rgba(18, 20, 28, 0.55) 100%),
      linear-gradient(to bottom, transparent 75%, var(--bg-elev) 100%);
  }

  .card-body {
    justify-content: flex-start;
    padding: 26px 26px 30px;
  }

  .grid article:nth-child(2) { --reveal-delay: 0.1s; }
  .grid article:nth-child(3) { --reveal-delay: 0.2s; }
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-pending {
    opacity: 1;
    translate: none;
  }

  .reveal-in,
  .js nav,
  .nav-toggle span {
    transition: none;
  }

  article:hover,
  nav a:hover,
  nav a:focus-visible {
    scale: none;
  }

  .hero-media {
    transform: none !important;
  }
}
