/* ==========================================================================
   AJR LIKPIN — company profile website
   Shared stylesheet (design system + components + page styles)
   Plain CSS, no build step. Organized top-to-bottom:
     1. Design tokens (CSS variables)
     2. Base / reset
     3. Layout helpers
     4. Header / nav
     5. Buttons & shared UI
     6. Hero
     7. Sections & components (cards, stats, timeline, tables, galleries)
     8. Footer
     9. Scroll-reveal animation
    10. Responsive (mobile)
   ========================================================================== */

/* 1. DESIGN TOKENS ---------------------------------------------------------- */
:root {
  /* Brand palette — derived from the AJR LIKPIN logo (navy wordmark + cyan wave) */
  --navy-900: #0f1740;
  --navy-800: #141e4e;
  --navy-700: #1b2a6b;   /* primary brand navy */
  --navy-600: #243a8f;
  --cyan-500: #1ca8e0;   /* brand cyan / wave */
  --cyan-400: #38b6e6;
  --cyan-300: #7ed0f0;

  --ink: #1a2233;        /* body text */
  --muted: #5a6577;      /* secondary text */
  --line: #e2e8f2;       /* borders */
  --surface: #f5f8fc;    /* light section bg */
  --surface-2: #eef3fa;
  --white: #ffffff;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(20, 30, 78, 0.10);
  --shadow-lg: 0 20px 50px rgba(20, 30, 78, 0.18);

  --header-h: 76px;

  --font-head: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* 2. BASE / RESET ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  background: var(--white);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan-500); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-700); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1rem; }

/* 3. LAYOUT HELPERS --------------------------------------------------------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--light { background: var(--surface); }
.section--alt   { background: var(--surface-2); }
.section--navy  { background: var(--navy-700); color: #e7ecf7; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .section-head p { color: #c3cdec; }

/* Brand tagline pill, blended onto the hero image (home) */
/* Centered via left:0/right:0 + text-align (robust in all browsers — avoids the
   max-content + translateX combo that WebKit can mis-handle). */
.hero-tagline { position: absolute; top: clamp(1.1rem, 3.5vw, 2rem); left: 0; right: 0;
  text-align: center; z-index: 3; padding: 0 1rem; }
.tagline-pill { display: inline-flex; align-items: center; gap: .55rem; color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .55rem 1.35rem; border-radius: 50px;
  /* Softer + more translucent and tonally matched to the hero's navy overlay so it
     melts into the photo (no hard border). text-shadow keeps it legible.
     No backdrop-filter — it can make the element vanish in Safari under overflow:hidden. */
  background: linear-gradient(100deg, rgba(15, 23, 64, .36), rgba(28, 168, 224, .22));
  box-shadow: 0 8px 24px rgba(8, 12, 30, .20);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.tagline-pill svg { display: block; flex: none; }
@media (max-width: 480px) { .tagline-pill { font-size: .6rem; letter-spacing: .1em; padding: .45rem 1rem; } }

.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.section-head .eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; font-size: .78rem;
  color: var(--cyan-500); margin-bottom: .6rem;
}
/* small gradient accent under centered section eyebrows */
.section-head .eyebrow::after {
  content: ""; display: block; width: 40px; height: 3px; border-radius: 2px;
  margin: .5rem auto 0; background: linear-gradient(90deg, var(--cyan-500), var(--cyan-300));
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }

/* 4. HEADER / NAV ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 22px rgba(20, 30, 78, 0.10); }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav .brand { display: flex; align-items: center; gap: .6rem; }
.nav .brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .55rem .85rem; border-radius: 8px;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  color: var(--navy-800); transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--surface); color: var(--navy-700); }
.nav-links a.active { color: var(--cyan-500); }
.nav-links a.btn-nav { background: var(--cyan-500); color: #fff; padding: .55rem 1.1rem; }
.nav-links a.btn-nav:hover { background: var(--navy-700); color: #fff; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 8px;
}
.nav-toggle span { display: block; height: 2.5px; background: var(--navy-700); border-radius: 2px; margin: 5px 0; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* 5. BUTTONS ---------------------------------------------------------------- */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.7rem; border-radius: 50px;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--cyan-500); color: #fff; box-shadow: 0 8px 20px rgba(28, 168, 224, .35); }
.btn-primary:hover { background: var(--navy-700); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.btn-ghost:hover { background: #fff; color: var(--navy-700); }
.btn-outline { background: transparent; color: var(--navy-700); border: 2px solid var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }

/* 6. HERO ------------------------------------------------------------------- */
.hero { position: relative; min-height: clamp(560px, 86vh, 860px); display: grid; align-items: center; color: #fff; overflow: hidden; }
/* slightly oversized so the parallax transform (set in site.js) never reveals an edge */
.hero-slides { position: absolute; left: 0; right: 0; top: -12%; height: 124%; z-index: 0; will-change: transform; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease, transform 7s ease;
}
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero::after { /* legibility overlay */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(110deg, rgba(15,23,64,.88) 0%, rgba(15,23,64,.62) 45%, rgba(27,42,107,.30) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--cyan-300); font-family: var(--font-head); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .82rem; }
.hero h1 { color: #fff; max-width: 16ch; margin-top: .4rem; }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 56ch; color: #d8e0f4; }
.hero .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero .scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; opacity: .8; animation: bob 1.8s infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0); } 50%{ transform: translate(-50%,8px); } }

/* Page banner (interior pages) */
.page-banner { position: relative; color: #fff; padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 4.5rem); background-size: cover; background-position: center; }
.page-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,23,64,.9), rgba(27,42,107,.6)); }
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; margin-bottom: .3rem; }
.page-banner .crumb { color: var(--cyan-300); font-family: var(--font-head); font-size: .9rem; letter-spacing: .05em; }

/* Wave divider (echoes logo motif) */
.wave { display: block; width: 100%; height: 60px; }
.wave path { fill: var(--surface); }

/* 7. COMPONENTS ------------------------------------------------------------- */

/* Generic card */
.card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
/* gradient accent line that fades in on hover (skips pillar cards, which already have a top border) */
.card:not(.pillar)::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan-500), var(--navy-600));
  opacity: 0; transition: opacity .25s ease;
}
.card:not(.pillar):hover::before { opacity: 1; }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan-500), var(--navy-600)); color: #fff;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .96rem; }

/* Split (text + media) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 4vw, 3.5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-body h2 { margin-bottom: .8rem; }
.split-body p { color: var(--muted); }
.lead-text { font-size: 1.1rem; color: var(--ink); }

/* Value pillars (goals/mission/people) */
.pillar { border-top: 4px solid var(--cyan-500); }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--cyan-400); line-height: 1; }
.stat .label { color: #c3cdec; font-size: .9rem; margin-top: .4rem; }

/* Chips / regions */
.chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 50px; padding: .5rem 1.1rem; font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: var(--navy-700); box-shadow: var(--shadow); }
.section--navy .chip { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }

/* Timeline */
.timeline { position: relative; max-width: 820px; margin-inline: auto; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 120px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 1.6rem; padding: .9rem 0; }
.tl-item .yr { font-family: var(--font-head); font-weight: 700; color: var(--cyan-500); text-align: right; padding-right: 1.6rem; }
.tl-item .body { position: relative; padding-left: 1.6rem; }
.tl-item .body::before { content: ""; position: absolute; left: -6px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan-500); box-shadow: 0 0 0 4px var(--surface); }
.tl-item .body h4 { margin: 0; color: var(--navy-700); }
.tl-item .body p { margin: .2rem 0 0; color: var(--muted); font-size: .94rem; }

/* Service detail list */
.svc-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.svc-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); display: flex; gap: 1rem; align-items: flex-start; transition: transform .2s; }
.svc-item:hover { transform: translateY(-4px); }
.svc-item .n { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--cyan-300); line-height: 1; }
.svc-item h4 { margin: 0 0 .2rem; font-size: 1.02rem; }
.svc-item p { margin: 0; font-size: .88rem; color: var(--muted); }

/* Projects table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
table.projects { width: 100%; border-collapse: collapse; min-width: 760px; background: #fff; }
table.projects th, table.projects td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
table.projects thead th { background: var(--navy-700); color: #fff; font-family: var(--font-head); font-weight: 600; position: sticky; top: 0; }
table.projects tbody tr:nth-child(even) { background: var(--surface); }
table.projects .val { font-weight: 700; color: var(--cyan-500); white-space: nowrap; }
.badge { display: inline-block; background: var(--cyan-500); color: #fff; font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 50px; letter-spacing: .04em; vertical-align: middle; }

/* Project case-study cards */
.proj-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.proj-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.proj-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.proj-card:hover .thumb img { transform: scale(1.07); }
.proj-card .pc-body { padding: 1.3rem 1.4rem 1.5rem; }
.proj-card .loc { font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan-500); }
.proj-card h3 { margin: .25rem 0 .5rem; font-size: 1.15rem; }
.proj-card .meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.proj-card .meta b { color: var(--navy-700); }
.proj-card p { font-size: .9rem; color: var(--muted); margin: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .4s; filter: brightness(.92); }
.gallery a:hover img { transform: scale(1.08); filter: brightness(1); }

/* Spec table (fleet) */
.spec { width: 100%; border-collapse: collapse; }
.spec th { text-align: left; width: 45%; padding: .55rem .6rem; color: var(--navy-700); font-family: var(--font-head); font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* Fleet vessel row */
.vessel { margin-bottom: 2.5rem; }
.vessel .tag { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--cyan-500); padding: .2rem .7rem; border-radius: 50px; margin-bottom: .6rem; }

/* Cert badges */
.certs { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.cert { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.8rem; text-align: center; box-shadow: var(--shadow); min-width: 180px; }
.cert .iso { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--navy-700); }
.cert .desc { font-size: .82rem; color: var(--muted); }

/* Policy / bullet list */
.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.bullets li { position: relative; padding-left: 1.9rem; color: var(--muted); }
.bullets li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #fff; background: var(--cyan-500); width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.contact-info .row { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.3rem; }
.contact-info .row .ic { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--surface); color: var(--cyan-500); display: grid; place-items: center; font-size: 1.1rem; }
.contact-info .row b { display: block; color: var(--navy-700); font-family: var(--font-head); }
.contact-info .row span { color: var(--muted); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.form-card label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .85rem; color: var(--navy-700); margin: .8rem 0 .3rem; }
.form-card input, .form-card textarea { width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .95rem; }
.form-card input:focus, .form-card textarea:focus { outline: 2px solid var(--cyan-300); border-color: var(--cyan-500); }
.map-placeholder, .placeholder {
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 12px, var(--surface-2) 12px, var(--surface-2) 24px);
  border: 1px dashed #b9c6dd; border-radius: var(--radius); color: var(--muted);
  display: grid; place-items: center; text-align: center; padding: 2rem; min-height: 220px; font-size: .9rem;
}
.placeholder-note { font-size: .8rem; color: var(--muted); font-style: italic; margin-top: .5rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy-700), var(--navy-900)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c3cdec; max-width: 52ch; margin-inline: auto; }

/* 8. FOOTER ----------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: #aeb9d8; padding: 3.5rem 0 1.5rem; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #aeb9d8; }
.site-footer a:hover { color: var(--cyan-400); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-logo { background: #fff; padding: .6rem .8rem; border-radius: 10px; display: inline-block; margin-bottom: 1rem; }
.footer-logo img { height: 38px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .85rem; }

/* 8b. PROJECT MODAL --------------------------------------------------------- */
/* Clickable project cards open a modal with a brief public-level summary.
   The overlay fades and the dialog scales/slides in for a smooth transition. */
.proj-card { cursor: pointer; }
.proj-card .pc-detail { display: none; }            /* hidden source content, read by JS */
.proj-card .view-more {
  display: inline-block; margin-top: .7rem; font-family: var(--font-head); font-weight: 600;
  font-size: .82rem; color: var(--cyan-500);
}
.proj-card .view-more::after { content: " →"; transition: margin .2s; }
.proj-card:hover .view-more::after { margin-left: .25rem; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 1.25rem;
  background: rgba(15, 23, 64, 0.62); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  width: min(640px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(.96); opacity: 0;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
}
.modal-overlay.open .modal { transform: none; opacity: 1; }

.modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; cursor: zoom-in; }
.modal-body { padding: 1.6rem 1.8rem 2rem; position: relative; }
.modal-body .loc {
  font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cyan-500);
}
.modal-body h3 { margin: .3rem 0 .8rem; font-size: 1.5rem; }
.modal-body p { color: var(--muted); margin: 0 0 1rem; }
.modal-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.modal-tags span {
  background: var(--surface); border: 1px solid var(--line); border-radius: 50px;
  padding: .3rem .8rem; font-size: .78rem; font-family: var(--font-head); font-weight: 500; color: var(--navy-700);
}
.modal-close {
  position: absolute; top: -.4rem; right: .2rem;
  width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
  font-size: 1.8rem; line-height: 1; color: var(--muted); border-radius: 50%;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--surface); color: var(--navy-700); }
body.modal-open { overflow: hidden; }   /* lock scroll while modal is open */

/* Structured detail blocks inside the project modal (client / role / scope) */
.modal-meta { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .5rem; }
.modal-meta li { display: grid; grid-template-columns: 130px 1fr; gap: .6rem; font-size: .9rem; align-items: start; }
.modal-meta b { font-family: var(--font-head); font-weight: 600; color: var(--navy-700); }
.modal-meta span { color: var(--muted); }
.modal-subhead { font-family: var(--font-head); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-500); margin: 0 0 .5rem; }
.modal-scope { margin: 0 0 1.2rem; padding-left: 1.1rem; }
.modal-scope li { font-size: .9rem; color: var(--muted); margin-bottom: .35rem; }
@media (max-width: 520px) { .modal-meta li { grid-template-columns: 1fr; gap: .1rem; } }

/* Marine asset (AJR WB 1) — uses the site .split pattern; wide crop + key facts */
.vessel-media img { aspect-ratio: 16 / 9; }
.vessel-facts { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1.6rem; }
.vessel-facts li { font-size: .9rem; color: var(--muted); padding-top: .55rem; border-top: 1px solid var(--line); }
.vessel-facts b { font-family: var(--font-head); font-weight: 600; color: var(--navy-700); margin-right: .4rem; }
@media (max-width: 520px) { .vessel-facts { grid-template-columns: 1fr; } }


@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal { transition: opacity .2s ease; }
  .modal { transform: none; }
}

/* 8c. GALLERY LIGHTBOX ------------------------------------------------------ */
/* Gallery images open in an immersive full-screen lightbox with prev/next. */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 12, 30, 0.94); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
/* single-image mode (opened from the project modal): hide nav + counter */
.lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-counter { display: none; }
.lb-stage {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transform: scale(.96); transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.lightbox.open .lb-stage { transform: none; }
.lb-img {
  max-width: 92vw; max-height: 78vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.lb-cap { color: #cdd6ee; font-family: var(--font-head); font-weight: 500; font-size: .92rem; text-align: center; }
.lb-btn {
  position: absolute; border: 0; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; transition: background .2s, transform .2s;
  backdrop-filter: blur(4px);
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); transform: scale(1.06); }
.lb-prev { left: clamp(.6rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.lb-next { right: clamp(.6rem, 3vw, 2rem); top: 50%; transform: translateY(-50%); }
.lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lb-close { top: clamp(1rem, 3vw, 1.6rem); right: clamp(1rem, 3vw, 1.8rem); width: 46px; height: 46px; font-size: 1.7rem; }
.lb-counter {
  position: absolute; top: clamp(1.2rem, 3vw, 1.9rem); left: clamp(1.2rem, 3vw, 2rem);
  color: #cdd6ee; font-family: var(--font-head); font-weight: 600; font-size: .9rem; letter-spacing: .05em;
}
@media (max-width: 640px) { .lb-btn { width: 44px; height: 44px; font-size: 1.3rem; } }
@media (prefers-reduced-motion: reduce) { .lightbox, .lb-stage { transition: opacity .2s ease; } .lb-stage { transform: none; } }

/* 9. SCROLL-REVEAL ---------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: opacity .4s ease; transform: none; }
  html { scroll-behavior: auto; }
}

/* 10. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 900px) {
  .grid-3, .grid-4, .svc-list { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 1.8rem; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem; box-shadow: var(--shadow-lg);
    transform: translateY(-120%); transition: transform .3s ease; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .9rem .4rem; border-bottom: 1px solid var(--surface); }
  .nav-links a.btn-nav { margin-top: .6rem; text-align: center; }
  .split, .split.reverse .split-media { grid-template-columns: 1fr; order: initial; }
  .split.reverse .split-body { order: 2; }
  .grid-2, .grid-3, .grid-4, .svc-list, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 60px; }
  .tl-item { grid-template-columns: 60px 1fr; gap: .8rem; }
  .tl-item .yr { padding-right: .8rem; font-size: .85rem; }
  .site-footer .cols { grid-template-columns: 1fr; }
}

/* 11. POLISH — entrance animations, micro-interactions, refinements --------- */

/* Refined heading tracking for a more premium feel */
h1, h2 { letter-spacing: -0.015em; }

/* Consistent focus-visible ring for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan-400); outline-offset: 2px; border-radius: 4px;
}

/* Buttons settle on press */
.btn:active { transform: translateY(0); }

/* Animated underline indicator for top-nav links (not the CTA button) */
.nav-links a:not(.btn-nav) { position: relative; }
.nav-links a:not(.btn-nav)::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .35rem; height: 2px;
  background: linear-gradient(90deg, var(--cyan-500), var(--cyan-300));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease; border-radius: 2px;
}
.nav-links a:not(.btn-nav):hover::after,
.nav-links a:not(.btn-nav).active::after { transform: scaleX(1); }

/* Entrance animations — only for users who haven't requested reduced motion.
   Defaults (no animation) keep everything fully visible, so nothing can get stuck hidden. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

  /* Home hero: staggered reveal of the headline block */
  .hero .eyebrow { animation: rise .7s both .15s; }
  .hero h1       { animation: rise .7s both .28s; }
  .hero p.lead   { animation: rise .7s both .42s; }
  .hero .cta-row { animation: rise .7s both .56s; }

  /* Interior page banners: content fades up on load */
  .page-banner .crumb { animation: rise .6s both .1s; }
  .page-banner h1     { animation: rise .6s both .22s; }
  .page-banner p      { animation: rise .6s both .34s; }
}

/* Banner image uses a transform layer for parallax (set in site.js); keep edges hidden */
.page-banner { overflow: hidden; }

/* 12. CONTACT PAGE — map embed, form validation & status ------------------- */
.map-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.form-card .req { color: #e0506a; }
.field-error { display: block; color: #d23f57; font-size: .8rem; margin-top: .25rem; }
.form-card input.input-error, .form-card textarea.input-error {
  border-color: #e0506a; background: #fff7f8;
}
.form-card input.input-error:focus, .form-card textarea.input-error:focus { outline-color: #e0506a; }

.form-status { margin: 1rem 0 0; padding: .85rem 1rem; border-radius: var(--radius-sm); font-size: .92rem; }
.form-status.success { background: #e7f7ef; color: #11704a; border: 1px solid #b7e6cf; }
.form-status.error { background: #fdecef; color: #9b1c33; border: 1px solid #f5c2cd; }

/* Honeypot: hidden from people, present for bots */
.form-card .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 760px) { .map-embed { aspect-ratio: 4 / 3; } }
