/* Blakeney Pit Sailing — development journal
   Harbour light. Logbook paper. A burgundy sail. */

:root {
  --ink: #15262b;
  --ink-soft: #4d646a;
  --paper: #f3efe6;
  --paper-deep: #e7e1d4;
  --deep: #0b2430;
  --deep-soft: #163642;
  --sail: #8a2f38;
  --water: #2f6d7c;
  --gold: #c4a36a;
  --line: rgba(21, 38, 43, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Satoshi", "Avenir Next", "Segoe UI", sans-serif;
  --measure: 38rem;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--paper);
  padding: 10px 14px;
  border-radius: 10px;
}

/* ——— Top bar ——— */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  color: #f4efe6;
  background: linear-gradient(180deg, rgba(6, 22, 28, 0.55) 0%, transparent 100%);
  border-bottom: 1px solid transparent;
  transition:
    background 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.top.is-solid {
  color: var(--ink);
  background: rgba(243, 239, 230, 0.9);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--line);
}

.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.top-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.top-nav {
  display: flex;
  gap: 22px;
}

.top-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 2px;
  opacity: 0.82;
}

.top-nav a[aria-current="page"],
.top-nav a:hover {
  opacity: 1;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: #f4efe6;
  overflow: hidden;
  background: var(--deep);
}

.hero-media {
  position: relative;
  flex: 1;
  min-height: 58svh;
  overflow: hidden;
}

.hero-media video,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.34);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(transparent, var(--deep));
  pointer-events: none;
  z-index: 1;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 22, 28, 0.28) 0%, transparent 32%);
  pointer-events: none;
  z-index: 1;
}

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

  .hero-media {
    flex: none;
    min-height: 0;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .hero-media video,
  .hero-media img {
    object-position: center 32%;
    transform: scale(1.28);
  }

  .hero-copy {
    padding: 24px 0 32px;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  padding: 28px 0 40px;
}

.hero-kicker {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.7);
  opacity: 0;
  animation: rise 1s var(--ease) 0.1s forwards;
}

.hero h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(3rem, 8vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.92;
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.22s forwards;
}

.hero h1 span {
  display: block;
  margin-top: 0.08em;
  font-size: 0.38em;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
}

.hero-lede {
  margin: 22px 0 0;
  max-width: 22em;
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  line-height: 1.45;
  color: rgba(244, 239, 230, 0.86);
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.4s forwards;
}

.hero-go {
  display: inline-flex;
  margin-top: 28px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f4efe6;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.1);
  border: 1px solid rgba(244, 239, 230, 0.28);
  opacity: 0;
  animation: rise 1.1s var(--ease) 0.52s forwards;
}

.hero-go:hover {
  background: rgba(244, 239, 230, 0.16);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ——— Shared type ——— */
.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--water);
}

.display {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.lede,
.prose p {
  margin: 18px 0 0;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.prose p + p {
  margin-top: 1.15em;
}

.prose h2 {
  margin: 2.4em 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--ink);
}

.prose h2 + p {
  margin-top: 0.85em;
}

.prose strong {
  font-weight: 700;
  color: var(--ink);
}

.prose a {
  color: var(--water);
  font-weight: 600;
  border-bottom: 1px solid rgba(47, 109, 124, 0.35);
}

/* ——— Reveal ——— */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-kicker,
  .hero h1,
  .hero-lede,
  .hero-go {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ——— Journal list ——— */
.log {
  padding: 0 0 120px;
}

.hero + .log {
  padding-top: 72px;
}

.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.log-all {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--water);
  border-bottom: 1px solid rgba(47, 109, 124, 0.3);
}

.log-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(21, 38, 43, 0.08);
  color: inherit;
}

@media (min-width: 860px) {
  .log-card {
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 380px;
  }
}

.log-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  object-position: center 42%;
  transition: transform 1.2s var(--ease);
}

.log-card:hover img {
  transform: scale(1.03);
}

.log-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
}

.log-card time {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--water);
}

.log-card h2,
.log-card h3 {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.log-card p {
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.log-card .more {
  margin-top: 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sail);
}

.log-empty {
  padding: 48px 8px;
  color: var(--ink-soft);
}

.log-stack {
  display: grid;
  gap: 22px;
}

.log-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: inherit;
}

.log-row img {
  width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.log-row time {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--water);
}

.log-row h2,
.log-row h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.log-row p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .log-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .log-row img {
    width: 100%;
    height: 200px;
  }
}

/* ——— Entry ——— */
.entry {
  padding: 128px 0 40px;
}

.entry-head {
  max-width: var(--measure);
  margin: 0 auto 48px;
}

.entry-head time {
  display: block;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--water);
}

.entry-head h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.entry-media {
  margin: 0 auto 56px;
  width: min(1080px, calc(100% - 32px));
  border-radius: 18px;
  overflow: hidden;
  background: var(--deep);
  box-shadow: 0 28px 70px rgba(11, 36, 48, 0.18);
}

.entry-media video,
.entry-media img {
  width: 100%;
  height: auto;
}

.entry-body {
  max-width: var(--measure);
  margin: 0 auto;
  padding-bottom: 48px;
}

.shot {
  margin: 36px 0;
}

.shot img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(11, 36, 48, 0.12);
}

.shot figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.entry-nav {
  max-width: var(--measure);
  margin: 0 auto 100px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.entry-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--water);
}

/* ——— Page header for journal index ——— */
.page-head {
  padding: 140px 0 36px;
}

.page-head .display {
  max-width: 14em;
}

.page-head .lede {
  max-width: 36em;
}

/* ——— Footer ——— */
.footer {
  padding: 72px 0 48px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer-brand {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-line {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.footer-copy {
  margin: 28px 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: rgba(77, 100, 106, 0.8);
}

.footer a {
  font-weight: 600;
  color: var(--water);
  border-bottom: 1px solid rgba(47, 109, 124, 0.3);
}

/* ——— 404 ——— */
.lost {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px 24px;
  text-align: center;
}
