/* ==============================================================
   AFM Global Tradings — Stylesheet
   ==============================================================

   BRANDING: change colors, fonts, and background photos here.
   Everything else on the site uses these variables.
   ============================================================== */

:root {
  /* --- Brand colors --- */
  --navy:        #0b1a2b;   /* primary dark: header, dark sections */
  --navy-deep:   #07111d;   /* footer, overlays */
  --navy-soft:   #16304d;   /* secondary blue */
  --gold:        #c5a15a;   /* subtle gold accent */
  --gold-light:  #dcc08a;
  --gold-dark:   #9c7a3a;   /* gold for text on light backgrounds */

  /* --- Neutrals --- */
  --ink:         #16202c;
  --muted:       #5a6675;
  --line:        #dfe3e8;
  --white:       #ffffff;
  --soft:        #f4f5f7;   /* light section background */

  /* --- Fonts --- */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif; /* large headings */
  --font-heading: "Archivo", "Helvetica Neue", Arial, sans-serif;          /* labels, buttons, small headings */
  --font-body:    "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;

  /* --- BACKGROUND PHOTOS ---
     Upload photos to /images with these names. If a file is missing,
     the section simply shows its dark navy background instead. */
  --hero-image:    url("images/hero.jpg");          /* globe, port, skyline, infrastructure */
  --reach-image:   url("images/global-reach.jpg");  /* world map, globe, city lights */
  --markets-image: url("images/markets.jpg");       /* industrial / energy / logistics */

  /* --- Layout --- */
  --container: 1240px;
  --header-h:  80px;
  --radius:    2px;
}

/* ==============================================================
   Base
   ============================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }

h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 0.6em;
}
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; line-height: 1.65; color: #3b4756; }

a { color: var(--navy-soft); }

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--gold);
  color: var(--navy);
  padding: 10px 16px;
}
.skip-link:focus { top: 12px; }

/* Eyebrow label above headings */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}
.eyebrow-dark { color: var(--gold-dark); }

/* ==============================================================
   Buttons
   ============================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 1em 1.8em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-sm { padding: 0.8em 1.4em; font-size: 0.78rem; }
.btn-lg { padding: 1.15em 2.1em; }

.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy-deep); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-soft); color: var(--white); }

.btn-outline-light { color: var(--white); border-color: rgba(255, 255, 255, 0.55); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ==============================================================
   Header
   ============================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(197, 161, 90, 0.18);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

/* Text logo placeholder */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.logo-img { height: 46px; width: auto; } /* used if you swap in a real logo image */

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a:not(.btn) {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-nav a:not(.btn):hover,
.site-nav a.is-active { color: var(--gold); }
.nav-cta { margin-left: 16px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  margin: 6px 0;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ==============================================================
   Globe graphic (shared)
   ============================================================== */

.hero-globe,
.reach-globe {
  position: absolute;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.12);
}

/* ==============================================================
   Hero
   ============================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(calc(100vh - var(--header-h)), 900px);
  min-height: min(calc(100svh - var(--header-h)), 900px);
  padding: 120px 0 140px;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 17, 29, 0.94) 0%, rgba(7, 17, 29, 0.78) 50%, rgba(7, 17, 29, 0.5) 100%),
    var(--hero-image) center / cover no-repeat,
    radial-gradient(ellipse at 75% 45%, #1c3a5c 0%, var(--navy) 55%, var(--navy-deep) 100%);
}
.hero-globe {
  width: min(720px, 62vw);
  height: min(720px, 62vw);
  right: -10%;
  top: 50%;
  transform: translateY(-50%);
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  color: var(--white);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.3em;
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--gold-light);
  margin-bottom: 1.1em;
}
.hero-text {
  max-width: 560px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 2.6em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-foot .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ==============================================================
   Sections (shared)
   ============================================================== */

.section { position: relative; padding: 128px 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--navy); color: rgba(255, 255, 255, 0.78); }
.section-dark h2 { color: var(--white); }
.section-dark .lead { color: rgba(255, 255, 255, 0.78); }

.section-head { max-width: 760px; margin-bottom: 72px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}

/* Images with a graceful fallback: if the photo is missing, script.js
   hides it and the navy gradient behind it shows instead. */
.media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(197, 161, 90, 0.16), transparent 60%),
    linear-gradient(135deg, var(--navy-soft), var(--navy-deep));
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media img.is-missing { display: none; }

/* ==============================================================
   About
   ============================================================== */

.about-copy p:not(.lead) { color: var(--muted); }

.image-band {
  margin-top: 96px;
  aspect-ratio: 21 / 8;
}
/* Crop focus: keeps the ship and cranes in frame when narrower screens crop the sides */
.image-band img { object-position: 62% 55%; }
.image-band figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 22px 32px;
  background: var(--navy);
  border-top: 2px solid var(--gold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--white);
}

/* ==============================================================
   What We Do — capabilities
   ============================================================== */

.capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 56px;
}
.capability {
  padding: 36px 0 44px;
  border-top: 1px solid #cfd5dc;
  position: relative;
}
.capability::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--gold);
  transition: width 0.4s ease;
}
.capability:hover::before { width: 100%; }
.cap-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.capability h3 { font-size: 1.2rem; }
.capability p { color: var(--muted); margin: 0; }

/* ==============================================================
   Global Reach
   ============================================================== */

.reach {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 26, 43, 0.9), rgba(11, 26, 43, 0.94)),
    var(--reach-image) center / cover no-repeat,
    var(--navy);
}
.reach-globe {
  width: 760px;
  height: 760px;
  right: -300px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.07);
}
.reach-inner { position: relative; z-index: 1; }
.reach-copy { max-width: 720px; margin-bottom: 88px; }

.scale {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
/* connecting line across the four levels */
.scale::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(197, 161, 90, 0.2));
}
.scale li { position: relative; padding: 40px 24px 0 0; }
.scale li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--navy);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 4px var(--navy), inset 0 0 0 8px var(--gold);
}
.scale-label {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 8px;
}
.scale p { margin: 0; font-size: 0.98rem; color: rgba(255, 255, 255, 0.62); }

/* ==============================================================
   Relationships & Partnerships
   ============================================================== */

.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 88px;
  align-items: center;
}
.partner-media {
  aspect-ratio: 5 / 6;
}
/* Crop focus: keeps the faces and the handshake in frame (desktop 5:6, mobile 16:10) */
.partner-media img { object-position: 50% 36%; }
.partner-media::after {
  content: "";
  position: absolute;
  inset: 24px -1px -1px 24px;
  border: 1px solid var(--gold);
  pointer-events: none;
  opacity: 0.6;
}

.principles { margin: 40px 0 0; }
.principles > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.principles dt {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.principles dd { margin: 0; color: var(--muted); }

/* ==============================================================
   Market Presence
   ============================================================== */

.markets {
  color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(0deg, rgba(7, 17, 29, 0.96) 0%, rgba(7, 17, 29, 0.82) 100%),
    var(--markets-image) center / cover no-repeat,
    linear-gradient(160deg, var(--navy-soft), var(--navy-deep));
}
.markets h2 { color: var(--white); }
.markets .lead { color: rgba(255, 255, 255, 0.78); }
.markets-head { max-width: 760px; margin-bottom: 80px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.pillar {
  padding: 36px 32px 8px 0;
}
.pillar + .pillar { padding-left: 32px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.pillar p { margin: 0; font-size: 0.98rem; color: rgba(255, 255, 255, 0.62); }

/* ==============================================================
   Work With AFM
   ============================================================== */

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  align-items: center;
}
.work-copy .lead { margin-bottom: 2.2em; }

.inquiry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
}
.inquiry-list li {
  break-inside: avoid;
  padding: 16px 0 16px 28px;
  border-bottom: 1px solid #d3d9df;
  position: relative;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--navy);
}
.inquiry-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--gold-dark);
}

/* ==============================================================
   Contact
   ============================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0;
  box-shadow: 0 30px 60px rgba(11, 26, 43, 0.12);
}

.contact-info {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding: 64px 56px;
}
.contact-info h2 { color: var(--white); }
.contact-intro { margin-bottom: 40px; }

.contact-list { margin: 0; }
.contact-list > div {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.contact-list dt {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.contact-list dd { margin: 0; color: var(--white); }
.contact-list a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid rgba(197, 161, 90, 0.5);
  word-break: break-word;
}
.contact-list a:hover { color: var(--gold-light); }

.contact-form {
  background: var(--white);
  padding: 64px 56px;
}
.contact-form h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.req { color: var(--gold-dark); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid transparent;
  border-bottom-color: #c3cad3;
  border-radius: 0;
  padding: 13px 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--navy-soft);
}
.field .is-invalid { border-color: #b3261e; }

.form-status { margin: 18px 0 0; }
.form-status:empty { display: none; }
.form-status.is-error { color: #b3261e; }
.form-status.is-notice {
  padding: 14px 16px;
  background: #faf5ea;
  border-left: 3px solid var(--gold);
}

/* ==============================================================
   Footer
   ============================================================== */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.98rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 64px;
}
.footer-statement { max-width: 380px; margin-top: 24px; }
.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 3px 0; }
.site-footer a:not(.logo) { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.site-footer a:not(.logo):hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ==============================================================
   Subtle fade-in on scroll (only when JavaScript runs)
   ============================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==============================================================
   Responsive
   ============================================================== */

/* Laptop */
@media (max-width: 1100px) {
  .site-nav a:not(.btn) { padding: 8px 10px; }
  .split, .partner-grid, .work-grid { gap: 56px; }
  .capabilities { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillar:nth-child(3) { padding-left: 0; border-left: 0; }
  .contact-info, .contact-form { padding: 56px 40px; }
}

/* Tablet */
@media (max-width: 960px) {
  :root { --header-h: 70px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 32px 28px;
  }
  .site-nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav-cta { margin: 20px 0 0; }

  .section { padding: 96px 0; }
  .split, .partner-grid, .work-grid, .contact-grid { grid-template-columns: 1fr; }
  .split { gap: 24px; }
  .partner-media { aspect-ratio: 16 / 10; max-width: 640px; }
  .image-band { aspect-ratio: 16 / 9; margin-top: 64px; }

  .hero-globe { width: 90vw; height: 90vw; right: -30%; opacity: 0.7; }
  .reach-globe { width: 560px; height: 560px; right: -280px; }

  .scale { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .scale::before { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .container { padding: 0 20px; }
  .lead { font-size: 1.1rem; }

  .logo { gap: 10px; }
  .logo-mark { height: 38px; font-size: 1.15rem; padding: 0 8px; }
  .logo-text { font-size: 0.72rem; letter-spacing: 0.2em; }

  .hero { padding: 88px 0 120px; }
  .hero-actions .btn { width: 100%; }
  .hero-foot .container { flex-direction: column; gap: 4px; font-size: 0.66rem; }

  .section { padding: 72px 0; }
  .section-head, .reach-copy, .markets-head { margin-bottom: 48px; }

  .image-band { aspect-ratio: 4 / 3; }
  .image-band figcaption { padding: 10px 16px; font-size: 0.95rem; line-height: 1.4; right: 0; }

  .capabilities, .pillars, .scale { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 28px 0 24px; border-left: 0; }
  .pillar + .pillar { border-top: 1px solid rgba(255, 255, 255, 0.16); }

  .partner-media::after { inset: 14px -1px -1px 14px; }
  .principles > div { grid-template-columns: 1fr; gap: 4px; }

  .inquiry-list { columns: 1; }

  .contact-info, .contact-form { padding: 44px 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; }
}
