/* =========================================================
   THE MOTHERSHIP — mship.nl
   v2 — fresh start, header-first
   Palette: deep navy + ochre on warm paper (matched to old mship.nl)
   ========================================================= */

:root {
  --paper: #F2F2EE;          /* lighter, slightly cool greyish */
  --paper-soft: #E8E8E3;
  --paper-deep: #DCDCD6;
  --ink: #1B2A3A;            /* deep navy ink */
  --ink-soft: #324558;
  --blue: #2C4A6E;           /* primary blue */
  --blue-deep: #1B3251;
  --ochre: #D6A92C;          /* yellower ochre */
  --ochre-soft: #E3C260;
  --ochre-glow: #F0D88E;
  --rule: rgba(27, 50, 81, 0.16);

  --serif: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

/* Subtle ochre hairline accent above the bottom border */
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, var(--ochre) 35%, var(--ochre) 65%, transparent 100%);
  opacity: 0.5;
  pointer-events: none;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav {
  margin-left: auto;
}

/* Brand */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--blue-deep);
  flex-shrink: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: block;
  margin-bottom: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-words {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  line-height: 1;
  margin-left: 0;
}

.brand-the {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  color: var(--ochre);
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--blue-deep);
}

.site-nav {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  justify-content: flex-end;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex: 1 1 auto;
}

.site-nav a {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  letter-spacing: 0.005em;
  transition: color 0.25s ease;
}

.site-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--ochre);
  transition: width 0.35s ease;
}

.site-nav a:not(.nav-cta):hover { color: var(--ochre); }
.site-nav a:not(.nav-cta):hover::after { width: 100%; }

/* Pill contact button — ochre */
.nav-cta {
  border: 1px solid var(--ochre);
  border-radius: 999px;
  padding: 8px 20px;
  background: var(--ochre);
  color: var(--paper) !important;
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.01em;
  margin-left: 6px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.nav-cta:hover {
  background: var(--blue-deep);
  color: var(--paper) !important;
  border-color: var(--blue-deep);
}

.nav-cta::after { display: none; }

/* =========================================================
   PLACEHOLDER (rest of page TBD)
   ========================================================= */

.placeholder-canvas {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
}

.placeholder-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 540px;
  text-align: center;
  line-height: 1.5;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 48px 32px 28px;
}

.hero-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.hero-eyebrow em {
  font-style: italic;
  font-weight: 700;
  color: var(--ochre);
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: var(--blue-deep);
  margin-bottom: 32px;
  text-wrap: balance;
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--ochre);
}

.hero-lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
  text-wrap: pretty;
}

.hero-lede em {
  font-style: italic;
  color: var(--blue);
}

/* =========================================================
   WORKS — main block of the site
   ========================================================= */

.works {
  padding: 16px 32px 100px;
}

.works-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.works-row {
  display: grid;
  gap: 4px;
}

.works-row-top {
  grid-template-columns: repeat(3, 1fr);
}

.works-row-bottom {
  grid-template-columns: repeat(3, 1fr);
  max-width: 56%;
  margin: 0 auto;
  margin-top: 0;
  /* Center the 2 children inside a 3-col grid */
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 1100px) {
  .works-row-top { grid-template-columns: repeat(3, 1fr); }
  .works-row-bottom { max-width: 80%; }
}
@media (max-width: 700px) {
  /* Mobile re-order to a 2-2-1 layout:
       row 1: Field Investing · The Elleders
       row 2: Book of Elleders · Is this It
       row 3: Mothership (centered, full-width)
     The DOM has Mothership FIRST in works-row-top — `display: contents`
     on the row containers flattens both rows into a single grid so we
     can drive the visual order via `order:` per-card instead of moving
     elements in the HTML. Mothership gets `grid-column: 1/-1` so it
     spans both columns, plus a max-width clamp so it doesn't stretch
     full-width — keeps the centered look matching the desktop variant. */
  .works-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .works-row-top, .works-row-bottom {
    display: contents;
  }
  /* Mothership (works-row-top child #1) → bottom row, full-width centered. */
  .works-row-top > .work:nth-child(1) {
    order: 5;
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 50%;
  }
  /* Field Investing (top child #2) → first card. */
  .works-row-top > .work:nth-child(2) { order: 1; }
  /* The Elleders (top child #3) → second card. */
  .works-row-top > .work:nth-child(3) { order: 2; }
  /* Book of Elleders (bottom child #1) → third card. */
  .works-row-bottom > .work:nth-child(1) { order: 3; }
  /* Is this It (bottom child #2) → fourth card. */
  .works-row-bottom > .work:nth-child(2) { order: 4; }

  .work-art { height: 130px; }
  .work-art img { max-width: 110px; max-height: 120px; }
  .work-title { font-size: 18px; }
}

.work {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--blue-deep);
  padding: 20px 12px 22px;
  border-radius: 6px;
  transition: background 0.4s ease, transform 0.4s ease;
}

.work:hover {
  background: var(--paper-soft);
  transform: translateY(-3px);
}

.work-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 160px;
  margin-bottom: 14px;
}

.work-art img {
  max-width: 130px;
  max-height: 150px;
  object-fit: contain;
}

.work-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.work-kind {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ochre);
}

.work-kind em {
  font-style: italic;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
}

.work-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.03em;
  color: var(--blue-deep);
  text-transform: uppercase;
}

.work-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 4px;
  max-width: 200px;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  /* keep 3 across on top */
}

/* =========================================================
   FOOTER (slimmed)
   =========================================================  */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 28px 32px;
  position: relative;
}

.site-footer::before { display: none; }

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

/* Bottom */
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-credit {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.footer-credit em {
  font-style: italic;
  font-weight: 700;
  color: var(--ochre);
}

.footer-cta {
  display: inline-block;
  border: 1px solid var(--ochre);
  background: var(--ochre);
  border-radius: 999px;
  padding: 7px 20px;
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.footer-cta:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: var(--paper);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  /* Mobile navbar — brand + Contact-CTA stay on the SAME row.
     Without forcing nowrap + center-alignment the site-nav at width:100%
     wraps below the brand on iOS Safari, leaving the Contact button on
     a second row. */
  .header-inner {
    padding: 12px 18px;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
  }
  .brand { flex-direction: row; gap: 10px; align-items: center; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-the { font-size: 14px; margin-bottom: 0; }
  .brand-name { font-size: 18px; letter-spacing: 0.04em; }

  .site-nav {
    gap: 12px;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    padding-top: 0;
    padding-bottom: 0;
    margin-left: auto;
  }
  .site-nav a { font-size: 14px; }
  .nav-cta { padding: 6px 14px; font-size: 14px; }
}
