/* IVEX Ship Management — refined static redesign */

:root {
  --navy: #09255B;
  --navy-deep: #061A40;
  --navy-2: #0F3170;
  --gold: #D4AF37;
  --gold-press: #C19C27;
  --ink: #0B1B3A;
  --ink-2: #47536B;
  --ground: #FFFFFF;
  --tone: #F1F4F9;
  --on-dark: #FFFFFF;
  --on-dark-2: #C9D3E6;
  --scrim: rgba(6, 26, 64, 0.64);

  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;

  --step-hero: clamp(2.75rem, 6.4vw, 6rem);
  --step-page: clamp(2.75rem, 5.6vw, 5rem);
  --step-h2: clamp(2rem, 3.6vw, 3.25rem);
  --step-h3: clamp(1.375rem, 2vw, 1.75rem);
  --step-lead: clamp(1.125rem, 1.5vw, 1.375rem);
  --step-body: 1.0625rem;
  --step-small: 0.875rem;

  --gutter: clamp(20px, 4vw, 48px);
  --max: 1280px;
  --section: clamp(88px, 11vw, 168px);

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--step-body)/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--gold); color: var(--navy-deep); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.tone { background: var(--tone); }
.dark { background: var(--navy); color: var(--on-dark); }
.dark-deep { background: var(--navy-deep); color: var(--on-dark); }

.h2 { font-size: var(--step-h2); line-height: 1.05; }
.h3 { font-size: var(--step-h3); line-height: 1.2; letter-spacing: -0.01em; }
.lead { font-size: var(--step-lead); line-height: 1.5; }
.muted { color: var(--ink-2); }
.dark .muted, .dark-deep .muted { color: var(--on-dark-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 16px 28px; border: 0; border-radius: 2px;
  font: 600 1rem/1 var(--font-display); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), color 0.25s var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-press); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font: 600 1rem/1.2 var(--font-display); text-decoration: none; color: var(--navy);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); transition: background-color 0.3s var(--ease); }
.site-header.is-scrolled { background: rgba(255, 255, 255, 0.97); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.brand img { height: 54px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav a {
  position: relative; padding: 8px 0;
  font: 500 1rem/1 var(--font-text); text-decoration: none; color: var(--ink);
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--navy); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.menu-toggle { display: none; }

@media (max-width: 880px) {
  .header-row { height: 72px; }
  .brand img { height: 38px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; background: var(--tone); border-radius: 2px; cursor: pointer; color: var(--navy);
  }
  .menu-toggle svg { width: 22px; height: 22px; }
  .header-call { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); padding: 8px var(--gutter) 24px;
    box-shadow: 0 18px 30px rgba(6, 26, 64, 0.12); /* taste-skill-ignore: open menu is a real overlay */
  }
  html:not(.js) .nav { position: static; box-shadow: none; }
  html.js .nav { display: none; }
  html.js .nav.is-open { display: flex; }
  .nav a { padding: 16px 0; font-size: var(--step-lead); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 12px; justify-content: center; padding-block: 18px; }
}
@media (min-width: 881px) { .nav .btn { display: none; } }

/* Hero (home) */
.hero { position: relative; min-height: min(90vh, 880px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--navy-deep); }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media img { transform-origin: 60% 50%; animation: drift 24s var(--ease) both; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--scrim); z-index: 1; }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(120px, 16vh, 180px) clamp(64px, 10vh, 112px); }
.hero-name { display: block; margin-top: 24px; font-size: var(--step-lead); font-weight: 500; letter-spacing: 0; }
.hero-title { display: block; max-width: 10em; font-size: var(--step-hero); line-height: 0.98; letter-spacing: -0.035em; }
.hero p { max-width: 36rem; margin-top: 32px; font-size: var(--step-lead); line-height: 1.5; color: #E7ECF5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }
.hero-actions .link-arrow { color: #fff; }

/* Load-in for first-screen text */
.hero h1 > span, .hero p, .hero-actions, .page-hero h1, .page-hero p { animation: rise 0.9s var(--ease) both; }
.hero-name, .page-hero p { animation-delay: 0.12s; }
.hero p { animation-delay: 0.2s; }
.hero-actions { animation-delay: 0.28s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@keyframes drift { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Page hero (inner pages) */
.page-hero { position: relative; color: #fff; background: var(--navy-deep); overflow: hidden; }
.page-hero-media, .page-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-media img { animation: drift 24s var(--ease) both; }
.page-hero.has-media::before { content: ""; position: absolute; inset: 0; background: var(--scrim); z-index: 1; }
.page-hero .wrap { position: relative; z-index: 2; padding-block: clamp(112px, 14vw, 200px) clamp(56px, 7vw, 96px); }
.page-hero h1 { font-size: var(--step-page); line-height: 1; letter-spacing: -0.035em; }
.page-hero p { margin-top: 24px; max-width: 40rem; font-size: var(--step-lead); line-height: 1.5; color: #E7ECF5; }
.page-hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.page-hero-split p { margin-top: 0; }

/* Home — about */
.about-top { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-body { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 80px); margin-top: clamp(56px, 7vw, 96px); align-items: stretch; }
.about-body figure { margin: 0; min-height: 420px; }
.about-body figure img { width: 100%; height: 100%; object-fit: cover; }
.vm { display: grid; gap: 40px; align-content: center; }
.vm .h3 { margin-bottom: 12px; color: var(--navy); }

/* Home — why choose */
.why { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.why-head p { margin-top: 28px; }
.pillars { display: grid; gap: 12px; }
.pillar { background: var(--navy-2); padding: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: baseline; transition: background-color 0.3s var(--ease); }
.pillar:hover { background: #143A80; }
.pillar .h3 { color: var(--gold); }

/* Home — services tabs */
.services-head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.svc-tabs { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.svc-list { display: grid; gap: 4px; }
.svc-list button {
  width: 100%; text-align: left; border: 0; cursor: pointer;
  padding: 20px 24px; background: transparent; color: var(--ink-2);
  font: 600 var(--step-lead)/1.25 var(--font-display); letter-spacing: -0.01em;
  border-left: 3px solid transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.svc-list button:hover { color: var(--navy); background: rgba(9, 37, 91, 0.05); }
.svc-list button[aria-selected="true"] { color: var(--navy); background: var(--ground); border-left-color: var(--gold); }
.svc-panel { background: var(--ground); }
.svc-panel img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.svc-panel-body { padding: clamp(28px, 3.5vw, 48px); }
.svc-panel-body h3 { font-size: var(--step-h3); line-height: 1.15; color: var(--navy); margin-bottom: 16px; }
html.js .svc-panel[hidden] { display: none; }
html:not(.js) .svc-list { display: none; }
html:not(.js) .svc-panels { grid-column: 1 / -1; display: grid; gap: 24px; }
.services-foot { margin-top: clamp(40px, 5vw, 64px); }
.svc-panel.is-entering img, .svc-panel.is-entering .svc-panel-body { animation: panelIn 0.55s var(--ease) both; }
.svc-panel.is-entering .svc-panel-body { animation-delay: 0.06s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* CTA band */
.cta { position: relative; color: #fff; text-align: center; overflow: hidden; background: var(--navy-deep); }
.cta-media, .cta-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta::before { content: ""; position: absolute; inset: 0; background: rgba(6, 26, 64, 0.84); z-index: 1; }
.cta .wrap { position: relative; z-index: 2; padding-block: clamp(104px, 12vw, 176px); }
.cta h2 { font-size: var(--step-h2); line-height: 1.05; }
.cta p { margin: 24px auto 0; max-width: 46rem; font-size: var(--step-lead); line-height: 1.5; color: #E7ECF5; }
.cta .btn { margin-top: 40px; }

/* Services page */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(56px, 6vw, 88px) clamp(32px, 4vw, 64px); }
.svc-item figure { margin: 0 0 28px; overflow: hidden; background: var(--tone); }
.svc-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.8s var(--ease); }
.svc-item:hover img { transform: scale(1.04); }
.svc-item h2 { font-size: var(--step-h3); line-height: 1.15; color: var(--navy); margin-bottom: 14px; }
.svc-item p { max-width: 34rem; }

/* About page */
.statement { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.statement h2 { font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.03em; color: var(--gold); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 40px; }
.facts div { background: var(--navy-2); padding: 20px 24px; }
.facts dt { font-size: var(--step-small); color: var(--on-dark-2); }
.facts dd { margin-top: 4px; font: 600 var(--step-lead)/1.3 var(--font-display); font-variant-numeric: tabular-nums; }
.values { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.values figure { margin: 0; position: sticky; top: 120px; }
.values figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.values-list { display: grid; gap: clamp(40px, 5vw, 64px); }
.values-list h2 { font-size: var(--step-h3); line-height: 1.15; color: var(--navy); margin-bottom: 16px; }

/* Blog page */
.posts { display: grid; gap: clamp(56px, 7vw, 96px); }
.post { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.post figure { margin: 0; overflow: hidden; background: var(--tone); }
.post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.8s var(--ease); }
.post:hover img { transform: scale(1.04); }
.post time { display: block; font-size: var(--step-small); color: var(--ink-2); margin-bottom: 16px; }
.post h2 { font-size: var(--step-h3); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 10px; }
.post h2 a { text-decoration: none; color: var(--navy); }
.post h2 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.post p { margin-bottom: 24px; max-width: 40rem; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.contact-card { background: var(--tone); padding: clamp(28px, 3.5vw, 48px); }
.contact-card h2 { font-size: var(--step-h3); line-height: 1.2; color: var(--navy); margin-bottom: 20px; }
.contact-card address { font-style: normal; }
.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.contact-card dt { color: var(--ink-2); }
.contact-card a { text-decoration: none; color: var(--navy); font-weight: 600; }
.contact-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: clamp(40px, 5vw, 56px); }
.map { margin-top: clamp(56px, 7vw, 96px); background: var(--tone); }
.map iframe { display: block; width: 100%; height: clamp(320px, 40vw, 480px); border: 0; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark); }
.footer-top { display: grid; grid-template-columns: 5fr 3fr 4fr; gap: 48px; padding-block: clamp(72px, 8vw, 112px) clamp(56px, 6vw, 80px); }
.footer-brand img { height: 52px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p { margin-top: 24px; max-width: 22rem; color: var(--on-dark-2); }
.site-footer h2 { font: 600 1rem/1.2 var(--font-display); letter-spacing: 0; margin-bottom: 20px; color: var(--gold); }
.site-footer ul { display: grid; gap: 12px; }
.site-footer a { text-decoration: none; color: var(--on-dark); transition: color 0.2s var(--ease); }
.site-footer a:hover { color: var(--gold); }
.footer-contact li { display: grid; grid-template-columns: 72px 1fr; gap: 12px; }
.footer-contact span { color: var(--on-dark-2); }
.footer-bottom { background: #04122E; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; font-size: var(--step-small); color: var(--on-dark-2); }

/* Reveal on scroll — content stays visible without script */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .pillar { grid-template-columns: 1fr; gap: 10px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .about-top, .about-body, .why, .services-head, .svc-tabs, .statement, .values, .post, .page-hero-split { grid-template-columns: 1fr; }
  .about-body figure { min-height: 0; }
  .about-body figure img { aspect-ratio: 4 / 3; }
  .svc-list button { padding: 16px 20px; }
  .values figure { position: static; }
  .values figure img { aspect-ratio: 16 / 10; }
  .contact-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions { gap: 20px; }
}

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