/* ==========================================================================
   castaways-lv.com — Showboat Hotel & Casino memorial
   Design language sampled from the property's own materials:
   - 1961 pool postcard (turquoise water, coral/marigold paddlewheel, cyan sky)
   - 1968 Kodachromes (cream clapboard, red shutters, salmon stucco,
     breeze-block fence, bulb-lit marquee)
   - 1954-55 facade (chrome bulb letters, coral sunburst arch)
   No frameworks, no CDNs, no trackers. Everything self-hosted.
   ========================================================================== */

/* ---------- fonts (self-hosted, latin subsets) ---------- */
@font-face {
  font-family: "Rye";
  src: url("../fonts/rye-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pacifico";
  src: url("../fonts/pacifico-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --cream: #f6efe3;
  --ivory: #fdf9f0;
  --salmon: #e9ab97;
  --salmon-soft: #f3d3c4;
  --coral: #c4502e;
  --marquee: #9e2b1f;
  --marigold: #e3a83c;
  --gold-deep: #b97f1d;
  --turquoise: #2f9db8;
  --pool: #7fc9dc;
  --sky: #a8d7ea;
  --charcoal: #2b211b;
  --charcoal-soft: #4a3c32;
  --chrome: #d8d2c6;

  --display: "Rye", "Georgia", serif;
  --script: "Pacifico", cursive;
  --body: "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  /* bulb string: little marigold dots on a repeating gradient */
  --bulbs: radial-gradient(circle, var(--marigold) 2.1px, rgba(0,0,0,0) 2.7px);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* NOTE: no global scroll-behavior:smooth — Chrome crawls on long pages */
body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1rem, 0.35vw + 0.95rem, 1.125rem);
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--cream);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral); text-underline-offset: 3px; }
a:hover { color: var(--marquee); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; }

/* ---------- memorial ribbon (mandatory, every page) ---------- */
.ribbon {
  background: var(--charcoal);
  color: var(--cream);
  text-align: center;
  font-size: .8rem;
  letter-spacing: .06em;
  padding: .45em var(--gutter);
}
.ribbon b { color: var(--marigold); font-weight: 600; }
.ribbon a { color: var(--salmon); }

/* ---------- masthead ---------- */
.masthead {
  background:
    linear-gradient(var(--cream), var(--cream)) padding-box,
    var(--cream);
  border-bottom: 4px solid var(--marquee);
  position: relative;
  text-align: center;
  padding: 1.1rem var(--gutter) 0;
}
.masthead::after {           /* scalloped gingerbread edge */
  content: "";
  display: block;
  height: 12px;
  margin-top: .9rem;
  background:
    radial-gradient(circle at 8px -4px, var(--marigold) 8px, rgba(0,0,0,0) 9px)
    0 0 / 16px 12px repeat-x;
}
.wordmark {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: .06em;
  color: var(--marquee);
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  text-shadow: 2px 2px 0 var(--marigold);
}
a.wordmark:hover { color: var(--coral); }
.masthead .subline {
  font-size: .72rem;
  letter-spacing: .28em;
  color: var(--charcoal-soft);
  margin: .5rem 0 .8rem;
  text-transform: uppercase;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .2rem .35rem;
  padding: 0;
  margin: 0 auto;
  list-style: none;
  max-width: 70rem;
}
.nav a {
  display: inline-block;
  padding: .42em .75em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal);
  border-radius: 999px;
}
.nav a:hover { background: var(--salmon-soft); color: var(--marquee); }
.nav a[aria-current="page"] {
  background: var(--marquee);
  color: var(--cream);
  outline: 2px dotted var(--marigold);
  outline-offset: -5px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  /* almost full screen: fill the first viewport minus the masthead, so the
     title never sinks below the fold */
  min-height: min(calc(100vh - 15rem), 82rem);
  display: grid;
  align-items: center; /* title centered on the postcard, movie-poster style */
  isolation: isolate;
  background: var(--charcoal);
  overflow: hidden;
}
.hero::after { /* soft scrim over the whole image so centered text stays crisp */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg,
    rgba(43,33,27,.08) 0%, rgba(43,33,27,.38) 45%, rgba(43,33,27,.66) 100%);
}
.hero .ph-full, .hero picture, .hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 62%; z-index: -1; margin: 0;
}
/* must outrank `.ph picture img { height: auto }` — for a replaced element
   height:auto means natural height, which lets the hero photo escape its box */
.hero .ph img { width: 100%; height: 100%; }
.hero figure.ph-full { position: absolute; inset: 0; }
.hero figcaption {
  position: absolute;
  right: .8rem; bottom: .5rem;
  font-size: .68rem;
  color: rgba(246, 239, 227, .85);
  background: rgba(43, 33, 27, .45);
  padding: .15em .6em;
  border-radius: 3px;
  max-width: 60ch;
  text-align: right;
}
.hero figcaption .credit a { color: var(--salmon); }
.hero-panel {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter);
  width: 100%;
  text-align: center;
}
.hero-panel > * { max-width: 72rem; margin-left: auto; margin-right: auto; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--marquee), 6px 6px 14px rgba(0,0,0,.55);
  margin: .35em auto .12em;
}
.hero-dek {
  color: var(--cream);
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  max-width: 46rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

/* marquee-chip eyebrow with bulb outline */
.eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--marquee);
  padding: .5em 1.1em;
  border-radius: 3px;
  outline: 3px dotted var(--marigold);
  outline-offset: 3px;
}
.hero .eyebrow { animation: bulbs-on 1.6s steps(2, jump-none) 1; }
@keyframes bulbs-on {
  0%   { outline-color: var(--charcoal-soft); }
  100% { outline-color: var(--marigold); }
}
section .eyebrow { background: var(--coral); }

/* ---------- shared section layout ---------- */
main { display: block; }
.section {
  padding: clamp(2.6rem, 7vw, 4.6rem) var(--gutter);
}
.section > .inner { max-width: 72rem; margin: 0 auto; }
.section h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--charcoal);
  margin-top: .6em;
}
.section h2 .flourish { color: var(--coral); }
.lede { font-size: 1.08em; max-width: var(--measure); }
.script-note {
  font-family: var(--script);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--turquoise);
  transform: rotate(-2deg);
  display: inline-block;
  margin: .3em 0;
}

/* sunburst divider between sections — the fan-arch ornament (modern artwork
   after the 1954 facade's sunburst arch), seated on a marigold rule */
.sunburst {
  height: 84px;
  background:
    url("../img/ornament-fan-2.webp") 50% 100% / auto 76px no-repeat,
    var(--cream);
  border-bottom: 3px solid var(--marigold);
}

/* breeze-block band (the pink pool fence) */
.breeze {
  height: 44px;
  background:
    radial-gradient(circle 12px at 50% 50%, rgba(0,0,0,0) 8px, var(--salmon) 8.5px 11px, rgba(0,0,0,0) 11.5px)
      0 0 / 44px 44px,
    linear-gradient(var(--salmon-soft), var(--salmon-soft));
  opacity: .85;
}

/* ---------- big numbers ---------- */
.bignums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.6rem var(--gutter);
  text-align: center;
  max-width: 72rem;
  margin: 0 auto;
}
.bignums .n {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  color: var(--coral);
  text-shadow: 3px 3px 0 var(--marigold);
  line-height: 1;
  display: block;
}
.bignums .l {
  display: block;
  margin-top: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  max-width: 22ch;
  margin-left: auto; margin-right: auto;
}

/* ---------- photos: postcard frames ---------- */
.ph {
  background: var(--ivory);
  border: 1px solid var(--chrome);
  padding: 10px 10px 12px;
  box-shadow: 0 3px 14px rgba(43, 33, 27, .16);
  border-radius: 2px;
  break-inside: avoid;
  margin: 0 0 1.4rem;
}
.ph figcaption {
  font-size: .86rem;
  font-style: italic;
  color: var(--charcoal-soft);
  padding: .6em .2em 0;
}
.ph .credit {
  display: block;
  font-style: normal;
  font-size: .74rem;
  margin-top: .25em;
  color: #7a6a5c;
}
.ph .gh { display: block; }
/* fill the postcard frame: img width attrs are intrinsic hints, not layout */
.ph picture img { width: 100%; height: auto; }
.ph-full { padding: 0; border: 0; box-shadow: none; background: none; }

.gallery {
  columns: 2 22rem;
  column-gap: 1.4rem;
  margin-top: 1.6rem;
}

/* poster figure: the big in-flow image on wing pages */
.ph-feature { max-width: 74rem; margin: 1.8rem auto 0; }
.ph-feature.ph-tall { max-width: 46rem; }

.poster-orn { display: block; margin: 0 auto .9rem; width: clamp(90px, 12vw, 150px); height: auto; }
/* small ephemera (matchbooks etc.): keep near native size, centered in their cell */
.slim-fig { max-width: 19rem; margin: 0 auto; width: 100%; }

/* poster header band on wings (title above the feature figure) */
.poster { text-align: center; padding-bottom: 0; }
.poster h1 {
  font-family: var(--display);
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  color: var(--marquee);
  text-shadow: 3px 3px 0 var(--marigold);
  margin: .35em 0 .2em;
}
.poster .lede { margin: 0 auto; }
.poster-pool    { background: linear-gradient(180deg, var(--sky), var(--cream)); }
.poster-casino  { background: linear-gradient(180deg, var(--salmon-soft), var(--cream)); }
.poster-dining  { background: linear-gradient(180deg, #f3e3c3, var(--cream)); }
.poster-rooms   { background: linear-gradient(180deg, var(--salmon-soft), var(--cream)); }
.poster-log     { background: linear-gradient(180deg, var(--sky), var(--cream)); }

/* typographic hero (The Lanes: no cleared photo yet, by design) */
.hero--type {
  background:
    var(--bulbs) 0 0 / 26px 26px,
    var(--charcoal);
  text-align: center;
  padding: clamp(3rem, 9vw, 6rem) var(--gutter);
}
.hero--type .eyebrow { background: var(--marquee); }
.hero--type h1 {
  font-family: var(--display);
  font-size: clamp(3.4rem, 13vw, 9rem);
  color: var(--marigold);
  text-shadow: 4px 4px 0 var(--marquee), 8px 8px 22px rgba(0,0,0,.5);
  margin: .25em 0 .1em;
  line-height: .95;
}
.hero--type .hero-dek { margin: 0 auto; }

/* dark marquee band (fight night): section-level cousin of .hero--type */
.section--night {
  background:
    var(--bulbs) 0 0 / 26px 26px,
    var(--charcoal);
  color: var(--cream);
  text-align: center;
}
.section--night h2 { color: var(--marigold); text-shadow: 3px 3px 0 var(--marquee); }
.section--night .lede { color: var(--chrome); margin-left: auto; margin-right: auto; }
.section--night .eyebrow { background: var(--marquee); }
.fightbill {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4.5vw, 2.9rem);
  line-height: 1.4;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--marquee);
  margin: 1.2rem 0 1rem;
}
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* two-up figure + text rows on wings */
.duo {
  display: grid;
  gap: 1.8rem var(--gutter);
  align-items: center;
  margin-top: 1.6rem;
}
@media (min-width: 860px) {
  .duo { grid-template-columns: 3fr 2fr; }
  .duo.flip > figure { order: 2; }
}

/* amenity blocks (menu-board style) */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.board .item {
  background: var(--ivory);
  border: 1px solid var(--chrome);
  border-radius: 6px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 2px 0 rgba(43,33,27,.08);
}
.board h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--coral);
}
.board p:last-child { margin-bottom: 0; }

/* ---------- history page: era tinting + timeline ---------- */
.page-history .section { padding-top: clamp(2.2rem, 5vw, 3.4rem); }
.era-dusk { background: linear-gradient(180deg, var(--cream), var(--salmon-soft)); }
.era-night { background: var(--charcoal); color: var(--cream); }
.era-night h2, .era-night .tl .year { color: var(--cream); text-shadow: 2px 2px 0 var(--marquee); }
.era-night a { color: var(--salmon); }
.era-night .ph { background: #3a2e26; border-color: #57483c; }
.era-night .ph figcaption { color: var(--chrome); }
.era-night .ph .credit { color: #a89a8a; }
.era-dawn { background: linear-gradient(180deg, var(--charcoal) 0%, var(--sky) 34%, var(--cream) 100%); }
.era-dawn .dawn-pad { height: clamp(2rem, 8vw, 5rem); }

.tl { position: relative; padding-left: 1.6rem; max-width: var(--measure); }
.tl::before {
  content: "";
  position: absolute; left: 4px; top: .5em; bottom: .4em;
  width: 4px;
  background: var(--marigold);
  border-radius: 2px;
}
.tl .tl-item { position: relative; margin-bottom: 2rem; }
.tl .tl-item::before {
  content: "";
  position: absolute; left: calc(-1.6rem + -2px); top: .42em;
  width: 16px; height: 16px;
  background: var(--coral);
  border: 3px solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--coral);
}
.era-night .tl .tl-item::before { border-color: var(--charcoal); }
.tl .year {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--marquee);
  display: block;
  margin-bottom: .2em;
}
.tl p { margin-bottom: 0; }
.tl .tl-figs { margin-top: 1rem; }

/* ---------- guestbook (classes/IDs per the shared recipe) ---------- */
.log-form {
  background: var(--ivory);
  border: 1px solid var(--chrome);
  border-top: 6px solid var(--coral);
  border-radius: 6px;
  padding: 1.4rem;
  max-width: 44rem;
  margin: 0 auto;
}
.form-group { margin-bottom: .9rem; }
.form-label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .3rem; }
.form-optional { font-weight: 400; color: var(--charcoal-soft); }
.form-input {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--chrome);
  border-radius: 4px;
  padding: .55em .7em;
}
textarea.form-input { min-height: 8.5em; resize: vertical; }

/* REQUIRED: keep the honeypots hidden two different ways */
.gb-hp  { position: absolute !important; left: -9999px !important; top: -9999px !important; height: 0; overflow: hidden; }
.gb-hp2 { display: none !important; }

.btn {
  font: 700 .9rem/1 var(--body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--marquee);
  border: 0;
  border-radius: 999px;
  padding: .9em 1.7em;
  cursor: pointer;
  margin-top: .3rem;
}
.btn:hover { background: var(--coral); }
.btn:disabled { opacity: .6; cursor: wait; }

/* REQUIRED: form status hidden until JS shows it */
.form-message { display: none; margin-top: 1rem; padding: .75rem 1rem; border-radius: 4px; font-size: .95rem; }
.form-message.success { display: block; background: rgba(47, 157, 184, .12); color: #1d6c80; border: 1px solid rgba(47, 157, 184, .45); }
.form-message.error   { display: block; background: rgba(158, 43, 31, .09); color: var(--marquee); border: 1px solid rgba(158, 43, 31, .4); }

#log h2 { margin-top: 2.4rem; text-align: center; }
#entries-container {
  max-width: 44rem;
  margin: 1.4rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.entry-card {
  background: var(--ivory);
  border: 1px solid var(--chrome);
  border-radius: 6px;
  padding: 1rem 1.2rem;
}
.entry-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: .5rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--chrome);
}
.entry-name { margin: 0; font-size: 1.05rem; font-family: var(--body); font-weight: 700; }
.entry-location { font-weight: 400; color: var(--charcoal-soft); font-size: .9rem; }
.entry-date { white-space: nowrap; color: #7a6a5c; font-size: .8rem; }
.entry-message { line-height: 1.7; margin: 0; }
.entries-empty { text-align: center; font-style: italic; color: var(--charcoal-soft); }

.reply-card {
  border-left: 4px solid var(--marigold);
  padding: .5rem 1rem;
  border-radius: 0 4px 4px 0;
  margin: .5rem 0 0 1.5rem;
  background: var(--cream);
}
.reply-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: 2px; }
.reply-name { font-weight: 600; }
.reply-date { white-space: nowrap; color: #7a6a5c; font-size: .78rem; }
.reply-message { line-height: 1.6; margin: 0; }
.reply-toggle {
  margin-top: 1rem; padding: 0;
  background: none; border: none; cursor: pointer;
  color: var(--coral);
  font: 700 .82rem var(--body);
  text-transform: uppercase; letter-spacing: .05em;
}
.reply-toggle:hover { text-decoration: underline; color: var(--marquee); }
.reply-form { margin-top: 1rem; padding-top: 1rem; margin-left: 1.5rem; border-top: 1px dashed var(--chrome); }
.reply-textarea { resize: vertical; min-height: 72px; }
.btn-sm { padding: .6em 1.2em; font-size: .8rem; }

/* ---------- footer ---------- */
.footer {
  background: var(--charcoal);
  color: var(--chrome);
  padding: 2.4rem var(--gutter) 2.8rem;
  margin-top: 3rem;
  border-top: 6px solid var(--marquee);
  font-size: .9rem;
}
.footer .inner { max-width: 72rem; margin: 0 auto; }
.footer a { color: var(--salmon); }
.footer .wheel { width: 40px; height: 40px; margin-bottom: 1rem; opacity: .9; }
.footer .memorial { color: var(--cream); max-width: var(--measure); }
.footer nav { margin-top: 1rem; }
.footer nav a { margin-right: 1em; }

/* ---------- lightbox ---------- */
.lb {
  position: fixed; inset: 0;
  background: rgba(23, 17, 13, .93);
  display: none;
  z-index: 50;
  padding: 2.5rem var(--gutter) 1.5rem;
}
.lb.on { display: grid; grid-template-rows: 1fr auto; justify-items: center; }
.lb img { max-width: 100%; max-height: 82vh; width: auto; height: auto; box-shadow: 0 8px 40px rgba(0,0,0,.6); }
.lb .lb-cap { color: var(--chrome); font-size: .92rem; padding: .8rem 0 0; max-width: 70ch; text-align: center; }
.lb .lb-x {
  position: absolute; top: .7rem; right: 1rem;
  background: none; border: 0; color: var(--cream);
  font-size: 2rem; line-height: 1; cursor: pointer; padding: .2em .4em;
}
.lb .lb-x:hover { color: var(--marigold); }

/* ---------- reveal on scroll ----------
   .rv alone never hides anything: JS adds .rv-wait ONLY to elements still
   below the initial viewport, so on-screen content can't flash out. JS off or
   reduced motion = everything just stays visible. */
.rv { transition: opacity .6s ease, transform .6s ease; }
.rv-wait { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv-wait { opacity: 1; transform: none; transition: none; }
  .hero .eyebrow { animation: none; }
}

/* ---------- 404 ---------- */
.lost { text-align: center; padding: clamp(3rem, 10vw, 6rem) var(--gutter); }
.lost .lede { margin-left: auto; margin-right: auto; }
.lost h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 9vw, 5rem);
  color: var(--marquee);
  text-shadow: 3px 3px 0 var(--marigold);
}
.lost .ph { max-width: 26rem; margin: 2rem auto; transform: rotate(-1.5deg); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .gallery { columns: 1; }
}

/* ---------- print: keep it readable ---------- */
@media print {
  .ribbon, .nav, .footer nav, .lb, .btn { display: none; }
  body { background: #fff; color: #000; }
}
