/* merrimar.com. Hand-written, no build step. Colours from docs/branding/merrimar/tokens.json in nw-b/crewz. */

@font-face {
  font-family: "Jost";
  src: url("/fonts/Jost.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --deep: #123b5d;
  --surface: #10324b;
  --surface-raised: #194662;
  --aegean: #1d6fa5;
  --lemon: #f7d154;
  --coral: #f28c7a;
  --text: #fff9ef;
  --text-muted: #c0d8e3;
  --line: #7295a6;
  --font: Jost, "Avenir Next", Futura, "Helvetica Neue", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

a {
  color: var(--lemon);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

a:focus-visible {
  outline: 3px solid var(--lemon);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--lemon);
  color: var(--deep);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Hero: the key art fills the band; the deep blue washes in from the left under the words. */

.hero {
  position: relative;
  display: grid;
  min-height: min(88vh, 760px);
  align-items: center;
  overflow: hidden;
  background: var(--deep);
}

.hero-art,
.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art img {
  object-fit: cover;
  object-position: 70% 50%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 59, 93, 0.96) 0%, rgba(18, 59, 93, 0.82) 34%, rgba(18, 59, 93, 0) 62%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4rem 16px;
}

.hero-copy > * {
  max-width: 30rem;
}

h1 {
  margin: 0;
}

h1 img {
  width: min(100%, 26rem);
}

.tagline {
  margin: 1.1rem 0 0;
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 500;
}

.lede {
  margin: 1rem 0 0;
  color: var(--text-muted);
}

.status {
  margin: 1.4rem 0 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--lemon);
  font-weight: 600;
  line-height: 1.4;
}

/* Life aboard */

main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 16px 4rem;
}

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.cards article {
  padding: 1.4rem 1.4rem 1.5rem;
  border-top: 4px solid var(--coral);
  border-radius: 6px;
  background: var(--surface-raised);
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.cards p {
  margin: 0;
  color: var(--text-muted);
}

/* Footer: the line's stripe edge, eight units of blue, a gap, two of lemon. */

footer {
  padding: 0 0 2.5rem;
  background: var(--deep);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stripe {
  height: 12px;
  margin-bottom: 2rem;
  background: linear-gradient(var(--aegean) 0 8px, transparent 8px 10px, var(--lemon) 10px 12px);
}

footer nav,
footer p {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

footer .notice {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

@media (max-width: 800px) {
  .hero {
    display: block;
    min-height: 0;
  }

  .hero-art,
  .hero-art img {
    position: static;
    height: auto;
  }

  .hero-art img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .hero::after {
    display: none;
  }

  .hero-copy {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 404 */

.lost {
  min-height: 70vh;
  padding-top: 5rem;
}

.lost h1 img {
  width: min(100%, 18rem);
  margin-bottom: 2.5rem;
}
