/* ============================================================
   WEISSMAN FAMILY — Ship's Log design system
   Palette: deep navy hull, teal wheel-ring, warm wood amber,
   sandy deck cream, gold rivets — pulled straight from the emblem.
   Signature element: the rope divider (wavy line = the rope
   wrapped around the anchor in the crest), used to break up
   every section instead of a plain <hr>.
   ============================================================ */

:root {
  --navy-deep:   #0e2138;
  --navy-ink:    #16233a;
  --navy-panel:  #142a45;
  --teal:        #1c8c93;
  --teal-deep:   #0f5f66;
  --amber-wood:  #c97a32;
  --amber-light: #e3a25c;
  --gold:        #e8c468;
  --sand:        #f6f0e2;
  --sand-deep:   #ece1c8;
  --rope-cream:  #faf6ec;
  --ink-soft:    #3c4a5e;
  --shadow:      0 10px 30px rgba(14, 33, 56, 0.15);
  --shadow-soft: 0 4px 14px rgba(14, 33, 56, 0.10);
  --radius:      14px;
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-script:  'Caveat', cursive;
  --font-body:    'Nunito Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy-ink);
  background: var(--sand);
  line-height: 1.6;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-deep);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--teal-deep); text-decoration: none; }
a:hover { color: var(--amber-wood); }

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

.script {
  font-family: var(--font-script);
  color: var(--amber-wood);
  font-size: 1.4em;
  font-weight: 700;
}

/* Focus visibility for keyboard nav */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- Page watermark (emblem on every page) ---------- */
.page-emblem-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('../assets/images/emblem-full.png');
  background-repeat: no-repeat;
  background-position: center 90px;
  background-size: min(640px, 78vw);
  opacity: 0.06;
}
main, header.site-header, footer.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy-deep);
  border-bottom: 4px solid var(--teal);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sand);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}
.brand img { height: 46px; width: auto; border-radius: 8px; }
.brand span.tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--teal);
  border-radius: 8px;
  color: var(--sand);
  font-size: 1.4rem;
  padding: 4px 10px;
  cursor: pointer;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--sand);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 8px 14px;
  border-radius: 8px;
  display: block;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--teal);
  color: var(--navy-deep);
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 0 16px; }
  .nav-inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 64px 0 40px;
}
.hero .script { display: block; font-size: clamp(2.4rem, 7vw, 4rem); margin-bottom: 4px; }
.hero h1 { margin-bottom: 10px; }
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto;
}

.page-hero {
  text-align: center;
  padding: 46px 0 24px;
}
.page-hero .eyebrow {
  font-family: var(--font-display);
  color: var(--teal-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Rope divider (signature element) ---------- */
.rope-divider {
  display: flex;
  justify-content: center;
  margin: 8px 0 8px;
}
.rope-divider svg { width: 100%; max-width: 480px; height: 22px; }

/* ---------- Cards / plank boards ---------- */
.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.board-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .board-grid { grid-template-columns: 1fr; }
}

.plank-card {
  background: var(--rope-cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 8px solid var(--amber-wood);
  padding: 26px 28px 28px;
}
@keyframes announcement-jump {
  0% { transform: translateY(0); }
  30% { transform: translateY(-14px); }
  50% { transform: translateY(0); }
  65% { transform: translateY(-7px); }
  80% { transform: translateY(0); }
  90% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
.plank-card.jump-in {
  animation: announcement-jump 0.8s ease-out;
}
.plank-card h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  font-size: 1.4rem;
}
.plank-card h2 .icon { font-size: 1.3rem; }

.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--sand-deep);
}
.list-clean > li:last-child { border-bottom: none; }

.entry-date {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--teal-deep);
  background: rgba(28, 140, 147, 0.1);
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 4px;
}

.announcement-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}
.announcement-bullets li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  text-align: justify;
  color: var(--navy-ink);
}
.announcement-bullets li:last-child { margin-bottom: 0; }
.announcement-bullets li::before {
  content: "*";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--amber-wood);
  font-size: 0.85em;
  font-weight: 700;
}

.crew-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sand-deep);
}
.crew-row:last-child { border-bottom: none; }
.crew-row .anchor-bullet {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy-deep);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.crew-row.upcoming {
  background: linear-gradient(90deg, rgba(232,196,104,0.18), transparent);
  border-radius: 8px;
  padding-left: 8px;
  margin-left: -8px;
}
.crew-row .who { font-weight: 700; color: var(--navy-deep); }
.crew-row .when { font-size: 0.88rem; color: var(--ink-soft); }

.important-date-row { align-items: flex-start; }
.important-date-prefix {
  font-weight: 700;
  color: var(--navy-deep);
  white-space: nowrap;
  padding-top: 1px;
}
.important-date-name {
  display: block;
  font-weight: 700;
  color: var(--navy-deep);
}
.important-date-age {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 2px;
}

.badge-soon {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-deep);
  background: var(--gold);
  padding: 3px 9px;
  border-radius: 20px;
}

.empty-note {
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--amber-wood);
  color: var(--rope-cream);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--amber-light); color: var(--navy-deep); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal-deep);
}
.btn-outline:hover { background: var(--teal); color: white; }

/* ---------- Album / music grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.tile-card {
  background: var(--rope-cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
}
.tile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile-card .thumb {
  aspect-ratio: 4/3;
  background: var(--navy-panel);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  font-size: 2.4rem;
  overflow: hidden;
}
.tile-card .thumb img { width: 80%; height: 80%; object-fit: contain; margin: auto; }
.tile-card .tile-body { padding: 14px 16px 18px; }
.tile-card h3 { margin-bottom: 4px; color: var(--navy-deep); }
.tile-card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Music player ---------- */
.player-card {
  background: var(--navy-deep);
  color: var(--sand);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
  border-top: 8px solid var(--teal);
}
.player-card h2 { color: var(--sand); }
.album-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.album-cover {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  box-shadow: var(--shadow-soft);
}
.now-playing {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.now-playing .disc {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex: none;
}
.now-playing .disc.spinning { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.now-playing .track-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.now-playing .track-sub { font-size: 0.85rem; color: var(--amber-light); }

audio { width: 100%; margin-top: 6px; }
audio::-webkit-media-controls-panel { background: var(--navy-panel); }

.track-list { list-style: none; margin: 0; padding: 0; }
.track-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.track-item:hover { background: rgba(255,255,255,0.06); }
.track-item.active { background: var(--teal); color: var(--navy-deep); }
.track-item .track-num {
  font-family: var(--font-display);
  width: 22px; text-align: center; opacity: 0.7;
}
.track-item .track-title { flex: 1; }
.track-item .track-len { font-size: 0.82rem; opacity: 0.75; }
.track-item button.play-btn {
  background: none; border: none; color: inherit; font-size: 1.1rem; cursor: pointer;
}

.empty-tracks {
  border: 2px dashed rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  color: var(--amber-light);
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 10px; padding: 8px 0; }
.contact-list .ic { flex: none; width: 22px; text-align: center; }

.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--navy-deep);
  font-size: 0.95rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 2px solid var(--sand-deep);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--teal); }

.form-status {
  margin-top: 10px;
  font-weight: 600;
  min-height: 1.4em;
}
.form-status.ok { color: var(--teal-deep); }
.form-status.err { color: #b3492e; }

.remark {
  border-bottom: 1px solid var(--sand-deep);
  padding: 14px 0;
}
.remark:last-child { border-bottom: none; }
.remark .remark-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-display); font-weight: 700; color: var(--navy-deep);
}
.remark .remark-date { font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; font-family: var(--font-body); }

/* ---------- Setup notice (removable) ---------- */
.setup-note {
  background: #fff8e6;
  border: 2px dashed var(--amber-wood);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.setup-note strong { color: var(--amber-wood); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--sand);
  padding: 34px 0 24px;
  margin-top: 40px;
  border-top: 4px solid var(--teal);
  text-align: center;
}
.site-footer img { height: 54px; width: auto; margin: 0 auto 10px; border-radius: 8px; }
.site-footer .foot-links {
  display: flex; justify-content: center; gap: 18px; margin: 10px 0 14px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--amber-light); }
.site-footer .copyright { font-size: 0.82rem; color: rgba(246,240,226,0.6); }
.site-footer .site-meta {
  font-size: 0.78rem;
  color: rgba(246,240,226,0.5);
  margin-top: 6px;
}
.site-footer .site-meta .meta-sep { margin: 0 8px; }

/* ---------- Humans page: couples + individuals columns ---------- */
.humans-layout {
  display: grid;
  grid-template-columns: 1fr auto 2fr;
  gap: 32px;
  align-items: stretch;
}
.humans-individuals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.humans-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.humans-divider {
  width: 14px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    135deg,
    var(--amber-wood) 0px, var(--amber-wood) 7px,
    var(--rope-cream) 7px, var(--rope-cream) 14px
  );
  box-shadow: var(--shadow-soft);
  align-self: stretch;
}
@media (max-width: 900px) {
  .humans-layout { grid-template-columns: 1fr; }
  .humans-divider {
    width: auto;
    height: 14px;
    background: repeating-linear-gradient(
      -45deg,
      var(--amber-wood) 0px, var(--amber-wood) 7px,
      var(--rope-cream) 7px, var(--rope-cream) 14px
    );
  }
}
@media (max-width: 600px) {
  .humans-individuals { grid-template-columns: 1fr; }
}

/* ---------- Empty state (e.g. Others page) ---------- */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--ink-soft);
}
.empty-state-icon {
  display: block;
  font-size: 2.4rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* ---------- Pictures: named album sections ---------- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .album-grid { grid-template-columns: 1fr; }
}
.album-card {
  background: var(--rope-cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.album-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.album-card h2 {
  font-size: 1.15rem;
  line-height: 1.3;
  padding: 18px 16px 4px;
  margin: 0;
  min-height: 3.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-card .thumb {
  aspect-ratio: 4/3;
  background: var(--navy-panel);
  margin: 10px 16px 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-card .thumb img { width: 80%; height: 80%; object-fit: contain; }
.album-card .view-link {
  display: block;
  padding: 14px 16px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal-deep);
}
.album-card .view-link:hover { color: var(--amber-wood); }

/* ---------- Photo grid + lightbox ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.photo-grid--square .photo-item { aspect-ratio: 1; }
.photo-grid--square .photo-item img { object-fit: contain; background: var(--rope-cream); }
.photo-item {
  border: none;
  padding: 0;
  background: var(--rope-cream);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/3;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.photo-item:hover img { transform: scale(1.05); }

.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 33, 56, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-caption { color: var(--sand); margin-top: 14px; font-family: var(--font-body); }

.album-description { max-width: 640px; margin: 0 auto 30px; text-align: center; color: var(--ink-soft); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.breadcrumb a { color: var(--teal-deep); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
