/* Kemudi Offshore — demo by Rekarih Studio
   Colours, type and spacing live in the token block below. */

:root {
  --ink: #08131c;
  --navy: #0d1d29;
  --deep: #0a1822;
  --navy-2: #13293a;
  --paper: #f1f2ee;
  --paper-2: #e3e7e2;
  --text: #0d1a24;
  --muted: #4b5b66;
  --on-dark: #e8eef2;
  --muted-dark: #9db1bf;
  --line-dark: rgba(170, 200, 220, 0.16);
  --line-paper: rgba(13, 26, 36, 0.14);
  --orange: #f2692e;
  --orange-hi: #ff8550;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 11vw, 152px);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2 {
  font-stretch: 72%;
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 6.4vw, 5.8rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 36em; }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }

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

.on-dark { background: var(--navy); color: var(--on-dark); }
.on-deep { background: var(--deep); color: var(--on-dark); }
.on-paper { background: var(--paper); color: var(--text); }
.on-accent { background: var(--orange); color: #160a03; }

/* Focus: always visible, never the browser's faint default */
:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 3px; border-radius: 4px; }
.on-paper :focus-visible, .on-accent :focus-visible { outline-color: var(--text); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--orange); color: #160a03; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Studio strip */
.strip {
  display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; align-items: center;
  padding: 9px var(--gutter);
  background: var(--orange); color: #160a03;
  font-size: 0.875rem; line-height: 1.4; text-align: center;
}
.strip a { font-weight: 600; }

/* Floating header */
.header {
  position: sticky; top: 0; z-index: 50;
  padding: 12px var(--gutter) 0;
  margin-bottom: -76px;
  pointer-events: none;
}
.header__bar {
  position: relative;
  pointer-events: auto;
  max-width: calc(var(--wrap) - 2 * var(--gutter) + 24px);
  margin-inline: auto;
  display: flex; align-items: center; gap: 20px;
  height: 64px; padding: 0 10px 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.header.is-floating .header__bar {
  background: rgba(8, 19, 28, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line-dark);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-dark); flex-shrink: 0; }
.logo svg { width: 30px; height: 30px; }
.logo__word { font-weight: 700; font-stretch: 85%; font-size: 1.15rem; letter-spacing: 0.01em; }
.logo__word span { font-weight: 400; color: var(--muted-dark); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  text-decoration: none; padding: 8px 12px; border-radius: 8px;
  font-size: 0.95rem; color: var(--on-dark);
  transition: background-color 0.2s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.07); }
.nav a.nav__cta { background: var(--on-dark); color: var(--ink); font-weight: 600; margin-left: 6px; }
.nav a.nav__cta:hover { background: #fff; }

.header__tools { display: flex; align-items: center; gap: 6px; }
.lang {
  display: inline-flex; padding: 3px; border-radius: 9px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-dark);
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
}
.lang span { padding: 5px 8px; border-radius: 6px; color: var(--muted-dark); transition: background-color 0.2s, color 0.2s; }
.lang .lang__en, [data-lang="ms"] .lang .lang__ms { background: var(--on-dark); color: var(--ink); }
[data-lang="ms"] .lang .lang__en { background: transparent; color: var(--muted-dark); }

.menu { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 22px; border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--accent { background: var(--orange); color: #160a03; }
.btn--accent:hover { background: var(--orange-hi); }
.btn--ghost { border-color: rgba(232, 238, 242, 0.35); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, 0.05); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 940px);
  display: flex; align-items: flex-end;
  padding: 140px 0 clamp(48px, 7vw, 96px);
  background:
    radial-gradient(70% 60% at 78% 18%, rgba(46, 103, 138, 0.42), transparent 70%),
    radial-gradient(60% 50% at 10% 100%, rgba(242, 105, 46, 0.12), transparent 70%),
    linear-gradient(180deg, #0b1b27 0%, var(--ink) 100%);
}
.hero__sea, .hero__route { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__route { opacity: 0.85; }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: clamp(32px, 5vw, 80px); align-items: end;
}
.hero__copy h1 { max-width: 11.5em; }
.hero__copy .lead { margin-top: 26px; color: #c7d5df; }
.hero__copy .actions { margin-top: 36px; }

.console {
  background: rgba(9, 22, 32, 0.66);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.console__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-dark); }
.console__head h2 { font-size: 1.05rem; font-stretch: 100%; font-weight: 600; letter-spacing: 0; }
.console__head p { color: var(--muted-dark); }
.console__list li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.console__name { font-family: var(--mono); font-weight: 500; font-size: 0.9rem; }
.console__meta { color: var(--muted-dark); font-size: 0.9rem; line-height: 1.45; margin-top: 2px; }
.status { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; position: relative; }
.status--work { background: var(--orange); }
.status--port { background: #7fc4a4; }
.status--transit { background: #79b6e0; }
.status--work::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--orange); animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.console__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 14px; font-size: 0.9rem; color: #c7d5df; }
.console__wave { width: 90px; color: #79b6e0; flex-shrink: 0; }

/* Services */
.services { padding: var(--section) 0; }
.services__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.services__intro { position: sticky; top: 110px; }
.services__intro p { margin-top: 24px; color: var(--muted); max-width: 30em; }
.service {
  display: grid; grid-template-columns: 56px 1fr; gap: 22px;
  padding: 32px 0; border-top: 1px solid var(--line-paper);
}
.service:last-child { border-bottom: 1px solid var(--line-paper); }
.service__icon { width: 48px; height: 48px; color: var(--text); }
.service h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-stretch: 85%; }
.service p { margin-top: 10px; color: var(--muted); }
.service p.service__more { font-family: var(--mono); font-size: 0.8rem; color: var(--text); margin-top: 14px; letter-spacing: 0.01em; }

/* Figures */
.figures { padding: clamp(56px, 8vw, 104px) 0; border-bottom: 1px solid var(--line-dark); }
.figures__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.figure { border-top: 2px solid var(--orange); padding-top: 20px; }
.figure__num { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 600; font-stretch: 70%; line-height: 1; font-variant-numeric: tabular-nums; }
.figure__label { margin-top: 10px; color: var(--muted-dark); max-width: 14em; }

/* Fleet */
.fleet { padding: var(--section) 0 calc(var(--section) - 20px); overflow: hidden; }
.fleet__head { display: grid; grid-template-columns: auto 1fr auto; gap: 24px 48px; align-items: end; }
.fleet__head p { color: var(--muted-dark); max-width: 30em; }
.fleet__controls { display: flex; gap: 8px; }
.round {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--line-dark); color: var(--on-dark);
  transition: background-color 0.2s, border-color 0.2s;
}
.round:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--muted-dark); }
.round svg { width: 18px; height: 18px; }
.fleet__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 400px); gap: 20px;
  margin-top: 48px;
  padding: 4px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: thin; scrollbar-color: var(--navy-2) transparent;
}
.fleet__track:focus-visible { outline-offset: -2px; }
.vessel {
  scroll-snap-align: start;
  background:
    linear-gradient(var(--line-dark) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px) 0 0 / 24px 100%,
    var(--navy);
  background-blend-mode: normal;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 24px;
}
.vessel__art { width: 100%; height: auto; margin: 8px 0 24px; overflow: visible; }
.vessel__art .hull { fill: rgba(121, 182, 224, 0.08); stroke: var(--on-dark); stroke-width: 1.4; stroke-linejoin: round; }
.vessel__art .line { fill: none; stroke: var(--on-dark); stroke-width: 1.4; stroke-linejoin: round; }
.vessel__art .accent { fill: none; stroke: var(--orange); stroke-width: 1.6; }
.vessel__art rect.accent { fill: var(--orange); stroke: none; }
.vessel__art .water { fill: none; stroke: #79b6e0; stroke-width: 1.2; opacity: 0.7; }
.vessel h3 { font-stretch: 85%; font-size: 1.35rem; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
.specs dt { font-size: 0.8rem; color: var(--muted-dark); }
.specs dd { font-family: var(--mono); font-size: 1rem; font-weight: 500; }

/* Safety */
.safety { padding: var(--section) 0; }
.safety__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.safety__statement h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.safety__statement p { margin-top: 26px; color: var(--muted); max-width: 32em; }
.principles { counter-reset: p; }
.principles li { padding: 26px 0 26px 60px; border-top: 1px solid var(--line-paper); position: relative; }
.principles li:last-child { border-bottom: 1px solid var(--line-paper); }
.principles li::before {
  content: ""; position: absolute; left: 0; top: 30px; width: 36px; height: 36px; border-radius: 50%;
  border: 1.6px solid var(--text);
  background: radial-gradient(circle, var(--orange) 0 5px, transparent 6px);
}
.principles h3 { font-stretch: 85%; font-size: 1.35rem; }
.principles p { margin-top: 8px; color: var(--muted); }

/* Careers */
.careers { padding: clamp(64px, 9vw, 120px) 0; }
.careers__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.careers h2 { max-width: 12em; }
.careers p { margin-top: 22px; max-width: 32em; color: #2a1408; }
.roles { background: #160a03; color: #fbe9de; border-radius: 18px; padding: 8px 24px; }
.roles li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid rgba(251, 233, 222, 0.14); }
.roles li:last-child { border-bottom: 0; }
.roles__title { font-weight: 600; }
.roles__meta { font-family: var(--mono); font-size: 0.78rem; color: #d7b7a3; }

/* Contact */
.contact { padding: var(--section) 0; background:
  radial-gradient(60% 70% at 100% 0%, rgba(46, 103, 138, 0.3), transparent 70%), var(--navy); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 112px); }
.contact__info p { margin-top: 22px; color: #c7d5df; max-width: 30em; }
.contact__list { margin-top: 40px; display: grid; gap: 22px; }
.contact__list dt { font-size: 0.85rem; color: var(--muted-dark); }
.contact__list dd { font-size: 1.2rem; font-weight: 500; margin-top: 2px; }
.contact__list a { text-decoration-color: rgba(232, 238, 242, 0.35); text-underline-offset: 4px; }
.contact__list a:hover { text-decoration-color: var(--orange); }

.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: rgba(8, 19, 28, 0.55); border: 1px solid var(--line-dark); border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
}
.field { display: grid; gap: 8px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; color: #c7d5df; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(170, 200, 220, 0.28);
  transition: border-color 0.2s, background-color 0.2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted-dark) 50%), linear-gradient(135deg, var(--muted-dark) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { color: var(--text); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted-dark); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--orange-hi); outline-offset: 1px; background: rgba(255, 255, 255, 0.07); }
.field [aria-invalid="true"] { border-color: var(--orange-hi); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.form__note { font-size: 0.9rem; color: #c7d5df; }

/* Footer */
.footer { background: var(--ink); padding: 56px 0 0; border-top: 1px solid var(--line-dark); }
.footer__grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer__small { font-size: 0.85rem; color: var(--muted-dark); margin-top: 16px; max-width: 46em; }
.credit {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 36px; padding-bottom: 48px; border-top: 1px solid var(--line-dark);
}
.credit h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.credit p { margin-top: 8px; color: var(--muted-dark); }

/* Scroll reveals (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Medium screens */
@media (max-width: 1080px) {
  .nav a:not(.nav__cta) { padding: 8px 8px; }
}
@media (max-width: 960px) {
  .menu {
    display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 9px; cursor: pointer;
    background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-dark); font-size: 0.95rem;
  }
  .menu__lines { width: 16px; height: 10px; border-top: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; }
  .header__tools { margin-left: auto; }
  .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: #0b1823; border: 1px solid var(--line-dark); border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 14px; font-size: 1.05rem; }
  .nav a.nav__cta { margin: 6px 0 0; text-align: center; }
  .header__bar { background: rgba(8, 19, 28, 0.7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--line-dark); }

  .hero__route { display: none; }
  .hero__inner, .services__grid, .safety__grid, .careers__grid, .contact__grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 150px; }
  .console { max-width: 520px; }
  .services__intro { position: static; }
  .figures__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .fleet__head { grid-template-columns: 1fr; }
}

/* Phones */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header { padding-top: 8px; }
  .header__bar { height: 58px; padding: 0 8px 0 14px; gap: 10px; }
  .logo__word span { display: none; }
  .hero { padding-top: 120px; }
  .btn { width: 100%; justify-content: center; }
  .form .btn { width: 100%; }
  .service { grid-template-columns: 1fr; gap: 14px; }
  .figure__num { font-size: 2.6rem; }
  .figures__grid { gap: 20px; }
  .form { grid-template-columns: 1fr; }
  .fleet__track { grid-auto-columns: minmax(270px, 84vw); }
  .principles li { padding-left: 52px; }
  .roles { padding: 4px 18px; }
}
@media (max-width: 380px) {
  .menu span:last-child { display: none; }
  .menu { padding: 0 12px; }
  .figures__grid { grid-template-columns: 1fr; }
}

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