/* Atlantis Marine Solutions — shared system.
   Direction: the name as a monument (taste-skill, seed 1504426530), brand palette kept.
   Every page loads this file. Page files add only their own sections. */

@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/RedHatDisplay-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("../fonts/RedHatText-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand roles: navy is the field, cyan is water and light, yellow is the sun and the one action. */
  --bg: #061628;
  --surface: #0a2a47;
  --surface-2: #014061;
  --ink: #eef6f8;
  --muted: #b3cad8;
  --water: #04b6ec;
  --water-ink: #04223a;
  --accent: #fcc100;
  --accent-ink: #061628;

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

  /* Five sizes do all the work. */
  --step-small: clamp(0.875rem, 0.84rem + 0.1vw, 0.9375rem);
  --step-ui: 1.0625rem; /* menu, buttons, links that act */
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  --step-big: clamp(2.5rem, 6vw, 6rem);
  --step-display: clamp(4.5rem, 1rem + 15vw, 16rem);

  --margin: clamp(1rem, 1.8vw, 1.75rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 12vw, 12rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 6rem; }
::selection { background: var(--water); color: var(--water-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: var(--margin); top: -9rem; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 0.75rem 1rem; font-weight: 500; }
.skip:focus { top: 0.75rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; text-wrap: balance; hyphens: none; }
.display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: var(--step-display);
  line-height: 0.82;
  letter-spacing: -0.045em;
}
.head {
  font-size: var(--step-head);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.lead { font-size: var(--step-lead); line-height: 1.35; }
.small { font-size: var(--step-small); }
.muted { color: var(--muted); }
p { max-width: 62ch; text-wrap: pretty; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- frame ---------- */
.wrap { padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding-block: var(--section); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 48px; padding: 0.8rem 1.35rem;
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--step-ui); font-weight: 500; text-decoration: none; line-height: 1.1;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) var(--ease-out);
}
.btn:hover { background: #ffd23f; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--quiet { background: var(--surface-2); color: var(--ink); }
.btn--lg { min-height: 56px; padding: 1rem 1.6rem; font-size: 1.125rem; }
.btn--quiet:hover { background: #0b5582; }
.btn .arrow { transition: transform var(--t-hover) var(--ease-out); }
.btn:hover .arrow, .link:hover .arrow { transform: translateX(4px); }
.arrow { display: inline-block; }

.link {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out);
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- navigation ---------- */
.bar {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem);
  padding: 1.25rem var(--margin);
}
.bar--over { position: fixed; inset: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; background: none; }
.brand span { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; font-size: 1.125rem; }
.brand small { display: block; font-family: var(--font-text); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: var(--step-small); color: var(--muted); }
/* One size for every piece of interface text: menu, buttons, toggles. */
.nav { display: flex; gap: clamp(1.25rem, 2.2vw, 2.25rem); }
.nav a { text-decoration: none; font-weight: 500; font-size: var(--step-ui); padding-block: 0.6rem; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.3rem; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--t-hover) var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; min-height: 44px; padding: 0 0.25rem; font-weight: 500; }
/* Language: a two-way switch. The thumb moves on press, before the next page loads. */
.lang {
  position: relative; isolation: isolate;
  display: inline-grid; grid-template-columns: 1fr 1fr;
  border: 1.5px solid color-mix(in srgb, var(--ink) 40%, transparent);
  transition: border-color var(--t-hover) var(--ease-out);
}
.lang:hover { border-color: var(--ink); }
.lang::before {
  content: ""; position: absolute; inset: 0 50% 0 0; z-index: -1;
  background: var(--ink);
  transition: transform 260ms var(--ease-expo);
}
.lang[data-on="es"]::before { transform: translateX(100%); }
.lang a {
  display: grid; place-items: center; min-width: 48px; min-height: 48px;
  font-weight: 700; font-size: var(--step-small); letter-spacing: 0.06em; text-decoration: none;
  color: var(--muted);
  transition: color 260ms var(--ease-out);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.lang a:hover { color: var(--ink); }
.lang[data-on="en"] a[hreflang="en"], .lang[data-on="es"] a[hreflang="es"] { color: var(--bg); }
.lang a:focus-visible { outline-offset: -3px; }
@media (max-width: 860px) {
  .bar > .btn { display: none; }
  .js .bar .nav { display: none; }
  .js .menu-btn { display: inline-flex; align-items: center; }
  /* Without script the menu cannot open: the links sit on their own row instead. */
  html:not(.js) .bar { flex-wrap: wrap; row-gap: 0.25rem; }
  html:not(.js) .bar .nav { order: 3; width: 100%; flex-wrap: wrap; column-gap: 1.5rem; }
  html:not(.js) .bar .nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .bar.open { flex-wrap: wrap; background: var(--bg); }
  .bar.open .nav { display: flex; flex-direction: column; gap: 0; width: 100%; order: 3; padding-top: 0.5rem; }
  .bar.open .nav a { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 2rem; letter-spacing: -0.02em; padding-block: 0.35rem; }
  .bar.open > .btn { display: inline-flex; order: 4; width: 100%; margin-top: 0.75rem; }
}

/* ---------- footer: the closing invitation, boxed in yellow so it reads apart from the page's last block ---------- */
.foot {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  padding: clamp(3rem, 6vw, 5.5rem) var(--margin) 0;
}
.foot__top {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start;
  position: relative; z-index: 1;
  background: var(--surface);
  border: 2px solid var(--accent);
  padding: clamp(1.75rem, 4vw, 3.75rem);
}
/* Yellow corner ticks, like survey marks on a drawing. */
.foot__top::before, .foot__top::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
}
.foot__top::before { top: 10px; left: 10px; border-top: 4px solid var(--accent); border-left: 4px solid var(--accent); }
.foot__top::after { bottom: 10px; right: 10px; border-bottom: 4px solid var(--accent); border-right: 4px solid var(--accent); }
.foot__invite { grid-column: 1 / span 7; }
.foot__invite h2 { font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 1.75rem; }
.foot__links { grid-column: 9 / span 4; display: grid; gap: 1.75rem; font-weight: 500; }
.foot__contact, .foot__nav { display: grid; gap: 0.6rem; justify-items: start; }
.foot__contact { padding-left: 1rem; border-left: 3px solid var(--accent); }
.foot__links a { text-decoration: none; }
.foot__links a:hover, .foot__nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.foot__links p { color: var(--muted); text-wrap: balance; }
.foot__legal {
  padding-top: 2rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  font-size: var(--step-small); color: var(--muted); padding-bottom: 0.75rem; position: relative; z-index: 1;
}
.foot__legal p { max-width: none; }
.foot__brand { display: flex; align-items: center; gap: 0.6rem; }
.foot__brand img { width: 32px; height: 32px; background: none; }
/* The owner's registration facts: entity, trade name, license and reach, set quiet beside the mark. */
.foot__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.5rem; }
.foot__facts li { max-width: none; }
.foot__facts li + li { padding-left: 1.5rem; margin-left: -0.75rem; border-left: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.foot__facts a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.foot__facts a:hover { text-decoration-thickness: 2px; }
.foot__legal > p:not(.foot__brand) { flex-basis: 100%; }
/* Builder credit: the quietest line in the footer. */
.foot__legal > .foot__credit { font-size: 0.8em; opacity: 0.6; }
.foot__credit a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: color-mix(in srgb, currentColor 50%, transparent); }
.foot__credit a:hover, .foot__credit a:focus-visible { text-decoration-color: currentColor; }
/* The cropped name, drawn as a cyan outline: the water stays, as a detail rather than the field. */
.foot__name {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: 27.5vw; line-height: 0.8; letter-spacing: -0.055em; white-space: nowrap; max-width: none;
  margin: -0.12em 0 0 -0.04em; transform: translateY(24%);
  color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--water) 55%, transparent);
  pointer-events: none; user-select: none;
}
@media (max-width: 860px) {
  .foot__top { grid-template-columns: 1fr; row-gap: 2.25rem; }
  .foot__invite, .foot__links { grid-column: 1 / -1; min-width: 0; }
  .foot__contact a { overflow-wrap: anywhere; }
  .foot__invite h2 { font-size: 10vw; }
  .foot__invite .btn { width: 100%; }
  .foot__contact a, .foot__nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .foot__contact { gap: 0; }
  /* Page links sit in their own row, set apart from the contact lines. */
  .foot__nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
  .foot__legal { padding-top: 1.5rem; font-size: 1rem; }
  .foot__facts { display: grid; gap: 0.35rem; }
  .foot__facts li + li { padding-left: 0; margin-left: 0; border-left: 0; }
  .foot__name { font-size: 34vw; -webkit-text-stroke-width: 1.5px; }
}

/* ---------- entrances: content shows without script; with it, parts rise in order ---------- */
/* A block is armed (hidden) only when it is about to scroll into view, so nothing far away is ever blank. */
.js [data-reveal].armed > * { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in > * {
  opacity: 1; transform: none;
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-expo);
}
.js [data-reveal].in > *:nth-child(2) { transition-delay: 80ms; }
.js [data-reveal].in > *:nth-child(3) { transition-delay: 160ms; }
.js [data-reveal].in > *:nth-child(4) { transition-delay: 240ms; }
.js [data-reveal].in > *:nth-child(5) { transition-delay: 320ms; }
.js [data-reveal].in > *:nth-child(n + 6) { transition-delay: 400ms; }

/* A photograph that drifts slowly while it is on screen. */
.drift { overflow: hidden; }
.drift img, .drift video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 2.4s cubic-bezier(0.33, 1, 0.68, 1); }
.drift.in img, .drift.in video { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal].armed > *, .js [data-reveal].in > * { opacity: 1; transform: none; transition: opacity 200ms linear; }
  .drift img, .drift video { transform: none; transition: none; }
  .btn, .btn .arrow, .nav a::after, .lang::before, .lang a { transition: none; }
}

/* ==========================================================================
   Text pages: one rail, one rhythm. See planning/website-redesign/text-pages-ui.md.
   Two vertical lines carry every text page: the page margin, and the rail at
   column 5 where all reading text starts. Headings scale in three clear
   steps; everything else is body, lead or meta.
   ========================================================================== */
:root {
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: clamp(2rem, 3vw, 2.5rem);
  --space-xl: clamp(3rem, 5vw, 4.5rem);
  --space-2xl: clamp(4.5rem, 8vw, 7.5rem);
  /* Hairlines separate sections; colour blocks do not. */
  --line: color-mix(in srgb, var(--water) 22%, transparent);
  --line-strong: color-mix(in srgb, var(--water) 45%, transparent);
  /* The third heading step: sentence case, so it reads as a name, not a shout. */
  --step-h3: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --measure: 62ch;
  --field-h: 3.25rem;
}

/* Page title: one per page, large but never a full empty band. */
.page-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: var(--step-big); line-height: 0.88; letter-spacing: -0.04em;
}
/* Section title (h2): the uppercase display step. */
.title-2 {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: var(--step-head); line-height: 0.95; letter-spacing: -0.03em;
}
/* Item title (h3): sentence case, tight. */
.title-3 {
  font-family: var(--font-display); font-weight: 900; text-transform: none;
  font-size: var(--step-h3); line-height: 1.1; letter-spacing: -0.015em;
}
.meta { font-size: var(--step-small); line-height: 1.45; color: var(--muted); }

/* Page header (S6): <section class="page-head rail"> with .page-title, then
   .page-head__body on the rail holding the lead and .page-head__actions. */
.page-head { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: var(--space-xl); row-gap: var(--space-l); align-items: end; }
.page-head > .page-title { grid-column: 1 / -1; margin-left: -0.03em; }
.page-head__body { grid-column: 5 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-m) var(--space-l); }
.page-head__body .lead { max-width: 40ch; }
/* The top bar already carries the yellow site-visit button: the header's own action stays quiet (one yellow per view). */
.page-head__actions .btn { background: var(--surface-2); color: var(--ink); }
.page-head__actions .btn:hover { background: #0b5582; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-s) var(--space-m); }

/* The rail: side column (1–4) for titles and meta, main column (5–12) for reading. */
.rail { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); }
.rail__side { grid-column: 1 / span 4; }
.rail__main { grid-column: 5 / -1; }
:where(.rail__main > p) { max-width: var(--measure); }
.flow > * + * { margin-top: var(--space-s); }
.flow-l > * + * { margin-top: var(--space-m); }

/* Sections: even padding, a hairline between neighbours. */
.block { padding-block: var(--space-2xl); }
.block--tight { padding-block: var(--space-xl); }
.block + .block, .block--ruled { border-top: 1px solid var(--line); }

/* Media: a figure on the grid, its caption directly under it. */
.figure img, .figure video { width: 100%; height: 100%; object-fit: cover; }
.caption { margin-top: var(--space-xs); font-size: var(--step-small); line-height: 1.45; color: var(--muted); max-width: 52ch; }

/* A raised panel, the one surface step above the field. */
.panel { background: var(--surface); padding: var(--space-l); }

@media (max-width: 860px) {
  .rail__side, .rail__main { grid-column: 1 / -1; }
  .rail__side + .rail__main { margin-top: var(--space-m); }
  .page-head__body { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
  .page-head__actions { justify-content: flex-start; }
  .page-head__actions .btn { width: 100%; }
}

/* Pause for moving pictures (WCAG 2.2.2): one small round control in the frame's top-left corner, over sky and trees rather than the work. */
.pause-btn {
  position: absolute; z-index: 2; top: 0.75rem; left: 0.75rem;
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgb(6 22 40 / 0.62); color: var(--ink);
  transition: background-color var(--t-hover) var(--ease-out);
}
.pause-btn:hover { background: var(--surface-2); }
.pause-btn[hidden] { display: none; }
.pause-btn .icon { grid-area: 1 / 1; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pause-btn .icon--play, .pause-btn.is-paused .icon--pause { display: none; }
.pause-btn.is-paused .icon--play { display: block; }
