/* Pirate's Creation — the public log.
   Ground: sea ink. Surfaces: hull. Text: aged chart paper.
   The one bold thing is the brass builder's plate. Everything else stays quiet. */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&family=Spectral:ital,wght@0,300;0,400;0,600;1,400&family=Barlow+Condensed:wght@500;600;700&display=swap');

:root {
  --ink:        #0E1A21;
  --hull:       #16262F;
  --hull-lit:   #1D3038;
  --chart:      #EDE2C8;
  --chart-dim:  #9DA79F;
  --brass:      #C1892F;
  --brass-lit:  #EBC275;
  --verdigris:  #4E9182;
  --rust:       #A8542F;

  --display: 'IM Fell English SC', Georgia, serif;
  --prose:   'Spectral', Georgia, serif;
  --ui:      'Barlow Condensed', 'Helvetica Neue', sans-serif;

  --measure: 44rem;
  --rule: 1px solid rgba(237, 226, 200, 0.14);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--chart);
  font: 400 1.0625rem/1.75 var(--prose);
}

/* Aged paper grain over the whole page. Cheap, no image request. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--verdigris); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brass-lit); }

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

:focus-visible {
  outline: 2px solid var(--brass-lit);
  outline-offset: 3px;
}

.wrap { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--brass); color: #24190A; padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }

/* ---- masthead: the cover of a log book ------------------------------- */

.masthead { padding: 3.25rem 0 1.75rem; text-align: center; }

.anchor { width: 34px; height: 34px; margin: 0 auto .9rem; display: block; color: var(--brass); opacity: .9; }

.wordmark {
  font-family: var(--display);
  font-size: clamp(2.1rem, 8vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.045em;
  margin: 0;
  color: var(--chart);
}
.wordmark a { color: inherit; text-decoration: none; }

.mast-rule {
  height: 1px;
  margin: 1.4rem auto 1.1rem;
  width: min(100%, 30rem);
  background: linear-gradient(90deg, transparent, var(--brass) 22%, var(--brass) 78%, transparent);
  transform-origin: center;
  animation: draw 900ms cubic-bezier(.2,.7,.2,1) both;
}
@keyframes draw { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

.logline {
  font-family: var(--display);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  color: var(--chart-dim);
  margin: 0;
}
.logline span { white-space: nowrap; }

.nav {
  display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap;
  margin-top: 1.6rem;
  font-family: var(--ui);
  font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.nav a { color: var(--chart-dim); text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--chart); border-bottom-color: var(--brass); }

/* ---- flash notes ------------------------------------------------------ */

.note {
  font-family: var(--ui); font-size: 1.05rem; letter-spacing: .04em;
  padding: .8rem 1.1rem; margin: 0 0 1.25rem;
  border-left: 3px solid var(--verdigris);
  background: var(--hull);
}
.note.error { border-left-color: var(--rust); }

/* ---- the log ---------------------------------------------------------- */

.log { padding-bottom: 5rem; }

.entry {
  background: var(--hull);
  border: var(--rule);
  margin-bottom: 2.75rem;
  animation: rise 700ms cubic-bezier(.2,.7,.2,1) both;
}
.entry:nth-child(2) { animation-delay: 70ms; }
.entry:nth-child(3) { animation-delay: 140ms; }
.entry:nth-child(4) { animation-delay: 210ms; }
.entry:nth-child(n+5) { animation-delay: 280ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.entry-photo { display: block; overflow: hidden; background: var(--hull-lit); }
.entry-photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.entry:hover .entry-photo img { transform: scale(1.025); }

.entry-body { padding: 1.5rem 1.6rem 1.7rem; }

.entry-meta {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  font-family: var(--display);
  font-size: 0.75rem; letter-spacing: 0.18em;
  color: var(--brass); margin-bottom: .55rem;
}
.entry-meta .dot { color: var(--chart-dim); opacity: .5; }
.entry-meta .when { color: var(--chart-dim); }

.entry-title {
  font-family: var(--prose); font-weight: 600;
  font-size: clamp(1.45rem, 4.4vw, 2.05rem);
  line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -0.01em;
}
.entry-title a { color: var(--chart); text-decoration: none; }
.entry-title a:hover { color: var(--brass-lit); }

.entry-excerpt { margin: 0; color: #C9C7B6; }

.entry-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-top: 1.35rem;
}
.entry-talk {
  font-family: var(--ui); font-size: .95rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--chart-dim); text-decoration: none;
}
.entry-talk:hover { color: var(--chart); }

/* ---- the signature: an engraved brass builder's plate ----------------- */

.plate {
  position: relative;
  display: inline-block;
  padding: .5rem 1.5rem .45rem;
  border-radius: 2px;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2C1F07;
  background:
    linear-gradient(163deg, #EFCB84 0%, #C88F31 34%, #8A5D18 58%, #E0B767 84%, #B07E2A 100%);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    0 3px 9px rgba(0, 0, 0, 0.5);
  transition: filter 300ms ease;
}
/* the plate is sometimes an <a>; keep engraved text dark against the generic
   link hover colour, which would otherwise win on specificity */
.plate:hover, .plate:focus-visible { color: #2C1F07; }
.entry:hover .plate { filter: brightness(1.07); }

/* rivets */
.plate::before, .plate::after {
  content: '';
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF0C8, #8A5D18 70%);
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.4);
}
.plate::before { left: .5rem; }
.plate::after  { right: .5rem; }

.plate .price { display: block; font-size: 1.35rem; letter-spacing: .06em; line-height: 1.1; }
.plate .kicker { display: block; font-size: .72rem; letter-spacing: .22em; opacity: .78; }

/* struck from the manifest */
.plate.sold {
  background: linear-gradient(163deg, #7E8C80 0%, #4E5C52 40%, #38443C 62%, #6B786D 100%);
  color: #DDE4DA;
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.5), 0 3px 9px rgba(0,0,0,.45);
}
.plate.sold .price { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .65; }
.plate.sold::before, .plate.sold::after { background: radial-gradient(circle at 35% 30%, #B9C4BA, #38443C 70%); }

/* ---- feed filter ------------------------------------------------------ */

.filter {
  display: flex; gap: .5rem; justify-content: center;
  margin: 0 0 2.25rem;
  font-family: var(--ui); text-transform: uppercase; letter-spacing: .14em;
}
.filter a {
  padding: .4rem 1.1rem; text-decoration: none;
  color: var(--chart-dim); border: 1px solid rgba(237,226,200,.18);
  font-size: .95rem; font-weight: 600;
}
.filter a:hover { color: var(--chart); border-color: rgba(237,226,200,.35); }
.filter a[aria-current="true"] {
  color: #24190A; background: var(--brass); border-color: var(--brass);
}

.empty {
  text-align: center; color: var(--chart-dim);
  border: 1px dashed rgba(237,226,200,.2); padding: 3rem 1.5rem;
}

/* ---- one entry -------------------------------------------------------- */

.piece { padding-bottom: 5rem; }

.piece-head { padding: 1rem 0 1.75rem; }
.piece-title {
  font-family: var(--prose); font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 2.9rem); line-height: 1.12;
  margin: .4rem 0 0; letter-spacing: -0.015em;
}

.gallery { display: grid; gap: .5rem; margin-bottom: 2rem; }
.gallery img { width: 100%; border: var(--rule); }

.piece-prose p { margin: 0 0 1.3rem; }
.piece-prose p:first-of-type::first-letter {
  font-family: var(--display); font-size: 3.1rem; line-height: .8;
  float: left; padding: .28rem .5rem 0 0; color: var(--brass);
}

.for-sale {
  margin: 2.75rem 0;
  padding: 1.75rem 1.6rem;
  background: var(--hull);
  border: var(--rule);
  border-top: 2px solid var(--brass);
  text-align: center;
}
.for-sale p { color: var(--chart-dim); margin: 1rem 0 1.4rem; }

.section-head {
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em;
  color: var(--brass); margin: 3rem 0 1.2rem;
  padding-bottom: .6rem; border-bottom: var(--rule);
}

.comment { padding: 1.1rem 0; border-bottom: var(--rule); }
.comment-who {
  font-family: var(--ui); font-size: 1rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brass-lit);
}
.comment-when { color: var(--chart-dim); font-size: .85rem; margin-left: .6rem; letter-spacing: .06em; }
.comment p { margin: .35rem 0 0; }

/* ---- forms ------------------------------------------------------------ */

.field { margin-bottom: 1.1rem; text-align: left; }
.field label {
  display: block; margin-bottom: .35rem;
  font-family: var(--ui); font-size: 1rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--chart-dim);
}
.field input, .field textarea {
  width: 100%; padding: .75rem .85rem;
  background: var(--ink); color: var(--chart);
  border: 1px solid rgba(237,226,200,.22); border-radius: 2px;
  font: 400 1.0625rem/1.6 var(--prose);
}
.field input:focus, .field textarea:focus { border-color: var(--brass); outline: none; }
.field textarea { min-height: 8rem; resize: vertical; }

.hp { position: absolute; left: -9999px; }

.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--ui); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .8rem 1.9rem; border-radius: 2px;
  border: 1px solid var(--verdigris);
  background: var(--verdigris); color: #08201B;
  text-decoration: none;
  transition: filter 200ms ease;
}
.btn:hover { filter: brightness(1.1); color: #08201B; }
.btn.ghost { background: transparent; color: var(--chart); border-color: rgba(237,226,200,.3); }
.btn.ghost:hover { border-color: var(--brass); color: var(--brass-lit); }

.hint { font-size: .9rem; color: var(--chart-dim); }

/* ---- about ------------------------------------------------------------ */

.about { padding-bottom: 5rem; }
.portrait { border: var(--rule); margin-bottom: 2rem; }

/* ---- foot ------------------------------------------------------------- */

.foot {
  border-top: var(--rule); padding: 2rem 0 3rem;
  font-family: var(--ui); letter-spacing: .12em; text-transform: uppercase;
  font-size: .9rem; color: var(--chart-dim); text-align: center;
}
.foot a { color: var(--chart-dim); }

@media (min-width: 40rem) {
  .gallery.multi { grid-template-columns: 1fr 1fr; }
  .gallery.multi img:first-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
