/* Pismo Beach Clamming — shared site styles */

:root {
  --parchment: #f4ead5;
  --parchment-dark: #ebdfc4;
  --ink: #1a2845;
  --ink-soft: #3d4a63;
  --rust: #8b3a2f;
  --rust-light: #b85542;
  --rule: #c4b896;

  /* Tide depth palette (used on almanac) */
  --easy-bg: #1f5d3a;
  --easy-fg: #f4ead5;
  --good-bg: #6ea571;
  --good-fg: #1a2845;
  --wet-bg: #d9a441;
  --wet-fg: #1a2845;
  --deep-bg: #c0573a;
  --deep-fg: #f4ead5;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: "ss01", "ss02";
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(139, 58, 47, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(26, 40, 69, 0.04) 0%, transparent 50%);
  opacity: 0.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  position: relative;
  z-index: 2;
}

/* MASTHEAD */
.masthead {
  text-align: center;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  padding: 1.75rem 0;
  margin-bottom: 0;
}
.masthead .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.6rem;
}
.masthead h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.02em;
}
.masthead h1 a { color: inherit; text-decoration: none; }
.masthead h1 .ornament {
  display: inline-block;
  margin: 0 0.4em;
  color: var(--rust);
  font-style: normal;
}
.masthead .tagline {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* PRIMARY NAV */
.primary-nav {
  border-bottom: 3px double var(--ink);
  background: var(--parchment-dark);
  margin-bottom: 2.5rem;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.primary-nav li { display: flex; }
.primary-nav a {
  display: block;
  padding: 0.85rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid var(--rule);
}
.primary-nav li:last-child a { border-right: none; }
.primary-nav a:hover { background: var(--ink); color: var(--parchment); }
.primary-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--parchment);
  font-weight: 600;
}

/* MOBILE NAV TOGGLE */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  color: var(--ink);
}

/* PAGE HEADER (page-specific subtitle below nav) */
.page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}
.page-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 0.5rem;
}
.page-header .page-tagline {
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 720px;
  margin: 0 auto;
}

/* CONTENT TYPOGRAPHY */
section { margin-bottom: 2.5rem; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}
.section-head h3 {
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
}
.section-head .section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--rust);
  text-transform: uppercase;
}

.prose p { margin-bottom: 1rem; max-width: 72ch; }
.prose p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
}
.prose h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.prose ul, .prose ol {
  margin: 0 0 1rem 1.5rem;
  max-width: 72ch;
}
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--rust); }
.prose a:hover { color: var(--rust-light); }
.prose strong { color: var(--rust); font-weight: 600; }
.prose blockquote {
  border-left: 4px solid var(--rust);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 70ch;
}
.prose blockquote cite {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.4rem;
  font-style: normal;
}

/* INFO BLOCK (used on safety page especially) */
.info-block {
  background: var(--parchment-dark);
  border-left: 4px solid var(--rust);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.info-block.warning {
  border-left-color: var(--deep-bg);
  background: rgba(192, 87, 58, 0.08);
}
.info-block h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.info-block.warning h4 { color: var(--deep-bg); }

.hotline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--rust);
  display: inline-block;
  margin: 0.4rem 0;
}

/* TWO-RULES DISPLAY (safety page hero) */
.two-rules {
  background: var(--ink);
  color: var(--parchment);
  padding: 2rem 1.5rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
  border: 2px solid var(--ink);
  position: relative;
}
.two-rules::before, .two-rules::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: var(--rust);
}
.two-rules::before { top: 0.5rem; }
.two-rules::after { bottom: 0.5rem; }
.two-rules .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1rem;
}
.two-rules .rule {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  margin: 0.5rem 0;
}
.two-rules .rule:first-of-type { margin-top: 0; }

/* PULL-QUOTE ANECDOTE */
.anecdote {
  background: var(--parchment-dark);
  border-left: 4px solid var(--ink);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.anecdote .anecdote-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.75rem;
}
.anecdote p {
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 0.85rem;
}
.anecdote p:last-child { margin-bottom: 0; }
.anecdote p.lesson {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-style: italic;
  color: var(--ink-soft);
}

/* WEBCAM CARDS */
.webcam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.webcam-card {
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.webcam-card:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--rust);
}
.webcam-card .cam-thumb {
  height: 140px;
  background: linear-gradient(135deg, #2c3e5a 0%, #4a6580 50%, #6b8aa6 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(244, 234, 213, 0.9);
}
.webcam-card .cam-thumb .cam-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.webcam-card .cam-thumb::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0573a;
  box-shadow: 0 0 0 0 rgba(192, 87, 58, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(192, 87, 58, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(192, 87, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(192, 87, 58, 0); }
}
.webcam-card .cam-body {
  padding: 1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.webcam-card .cam-name {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.webcam-card .cam-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex: 1;
}
.webcam-card .cam-source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--rule);
}

/* IN-TEXT REMINDER (small inline biotoxin reminder block for top of relevant pages) */
.inline-reminder {
  background: rgba(217, 164, 65, 0.12);
  border: 1px solid rgba(217, 164, 65, 0.3);
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink);
}
.inline-reminder strong {
  font-style: normal;
  color: var(--deep-bg);
}

/* IMAGE TREATMENT */
figure {
  margin: 1.5rem 0;
}
figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
figure.figure-portrait {
  max-width: 50%;
  margin: 1.5rem auto;
}
figure figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 0.4rem;
  padding: 0 0.25rem;
}
figure figcaption .credit {
  display: block;
  font-size: 0.72rem;
  font-style: normal;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 0.2rem;
}

/* HERO FIGURE — full-width, image at top of content sections */
.hero-figure {
  margin: 0 auto 2rem;
  max-width: 80%;
}
.hero-figure img {
  border: none;
  border-bottom: 3px solid var(--ink);
  max-height: 384px;
  object-fit: cover;
}

/* PUBLISHER PORTRAIT — constrained vertical photo for about page */
.publisher-portrait {
  max-width: 360px;
  margin: 1.5rem auto;
}

/* VIDEO EMBED — click-to-load YouTube. Keeps default page weight low. */
.video-embed {
  margin: 1.5rem 0;
}
.video-embed-thumb {
  display: block;
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  cursor: pointer;
  border: 1px solid var(--rule);
  background: var(--ink);
  text-decoration: none;
  overflow: hidden;
}
.video-embed-thumb img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.video-embed-thumb:hover img {
  opacity: 1;
}
.video-embed-thumb .video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(192, 87, 58, 0.92);
  color: var(--parchment);
  font-size: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s, background 0.15s;
}
.video-embed-thumb:hover .video-play-button {
  background: var(--rust);
  transform: translate(-50%, -50%) scale(1.08);
}
.video-embed iframe {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--rule);
}
.video-embed .video-caption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
  margin-top: 0.6rem;
  padding: 0 1rem;
}

/* RELATED LINKS BLOCK (cross-page navigation) */
.related-pages {
  background: var(--parchment-dark);
  padding: 1.5rem;
  border: 1px solid var(--rule);
  margin: 3rem 0 1rem;
}
.related-pages h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}
.related-pages .related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.related-pages a {
  display: block;
  padding: 1rem;
  background: var(--parchment);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.related-pages a:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--rust);
}
.related-pages a strong {
  display: block;
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.related-pages a span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* PLACEHOLDER (for skeleton pages awaiting content) */
.placeholder-notice {
  background: rgba(217, 164, 65, 0.15);
  border: 1px dashed var(--wet-bg);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

/* FOOTER */
.site-footer {
  margin-top: 4rem;
  padding-top: 0;
  border-top: 3px double var(--ink);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer .footer-reminder {
  background: rgba(192, 87, 58, 0.10);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.site-footer .footer-reminder strong {
  color: var(--deep-bg);
  font-weight: 600;
}
.site-footer .footer-reminder a {
  color: var(--rust);
  font-weight: 600;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.site-footer h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--rust); }
.site-footer .footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
}
.site-footer .publisher-line {
  font-style: italic;
  margin-bottom: 0.4rem;
}
.site-footer p { margin-bottom: 0.5rem; }

/* MOBILE */
@media (max-width: 700px) {
  .container { padding: 1.25rem 1rem 3rem; }
  .masthead { padding: 1.25rem 0; }
  .nav-toggle { display: block; width: 100%; text-align: left; }
  .primary-nav ul {
    display: none;
    flex-direction: column;
  }
  .primary-nav ul.open { display: flex; }
  .primary-nav a { border-right: none; border-bottom: 1px solid var(--rule); }
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* PRINT */
@media print {
  @page { margin: 0.5in; }
  body { background: white; color: black; }
  body::before { display: none; }
  .container { max-width: none; padding: 0; }
  .primary-nav, .nav-toggle, .related-pages { display: none !important; }
  .masthead { border-color: black; padding: 1rem 0; margin-bottom: 1rem; }
  .masthead h1 { font-size: 2rem; }
  .info-block { background: white !important; }
  .site-footer { page-break-before: avoid; border-color: black; }
}
