/*
Theme Name: Bayshore
Theme URI: https://bayshore.media
Author: Eissa Fiham
Description: Custom editorial theme for Bayshore — modern car culture, ownership economics, gear, and creator content. Paper-and-ink magazine layout with Bayside Blue accents and monospaced spec blocks.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: bayshore
*/

/* ---------- Tokens ---------- */
:root {
  --bs-paper: #F7F5F1;
  --bs-ink: #131416;
  --bs-blue: #2253C4;
  --bs-blue-deep: #173B8F;
  --bs-gray: #8A877F;
  --bs-hairline: #E6E2D9;
  --bs-night: #131416;
  --bs-night-line: #3A3B3E;

  --bs-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-serif: "Instrument Serif", Georgia, serif;
  --bs-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bs-max: 1200px;
  --bs-measure: 680px;
  --bs-gutter: clamp(20px, 4vw, 48px);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bs-paper);
  color: var(--bs-ink);
  font-family: var(--bs-sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--bs-blue); }
:focus-visible { outline: 2px solid var(--bs-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.bs-wrap { max-width: var(--bs-max); margin: 0 auto; padding-left: var(--bs-gutter); padding-right: var(--bs-gutter); }
.bs-measure { max-width: var(--bs-measure); margin-left: auto; margin-right: auto; }

/* ---------- Type utilities ---------- */
.bs-label {
  font-family: var(--bs-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bs-gray);
}
.bs-label--blue { color: var(--bs-blue); }
.bs-label a:hover { color: var(--bs-blue); }
.bs-meta {
  font-family: var(--bs-mono);
  font-size: 12px;
  color: var(--bs-gray);
}

/* ---------- Header ---------- */
.bs-header {
  border-bottom: 1px solid var(--bs-hairline);
  background: var(--bs-paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.bs-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.bs-brand { display: flex; align-items: center; gap: 10px; }
.bs-brand__badge {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bs-blue);
  color: var(--bs-paper);
  font-family: var(--bs-sans);
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bs-brand__word {
  font-family: var(--bs-sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--bs-ink);
}
.bs-brand:hover .bs-brand__word { color: var(--bs-ink); }
.bs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.bs-nav a {
  font-family: var(--bs-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bs-ink);
  padding: 6px 0;
}
.bs-nav a:hover, .bs-nav .current-menu-item a { color: var(--bs-blue); }
.bs-nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px; cursor: pointer; color: var(--bs-ink);
}
.bs-nav-toggle svg { display: block; }

@media (max-width: 800px) {
  .bs-nav-toggle { display: block; }
  .bs-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bs-paper);
    border-bottom: 1px solid var(--bs-hairline);
    padding: 12px var(--bs-gutter) 20px;
  }
  .bs-nav.is-open { display: block; }
  .bs-nav ul { flex-direction: column; gap: 0; }
  .bs-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--bs-hairline); }
  .bs-nav li:last-child a { border-bottom: 0; }
}

/* ---------- Hero (homepage) ---------- */
.bs-hero { border-bottom: 1px solid var(--bs-hairline); }
.bs-hero__media { background: var(--bs-hairline); }
.bs-hero__media img { width: 100%; height: clamp(260px, 55vh, 620px); object-fit: cover; }
.bs-hero__body { padding: 28px 0 40px; }
.bs-hero__title {
  font-family: var(--bs-sans);
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 10px 0 12px;
  max-width: 18ch;
}
.bs-hero__dek {
  font-family: var(--bs-serif);
  font-size: clamp(18px, 2.2vw, 22px);
  color: #5C5A54;
  margin: 0 0 14px;
  max-width: 52ch;
}

/* ---------- The Brief ---------- */
.bs-brief { border-bottom: 1px solid var(--bs-hairline); padding: 28px 0; }
.bs-brief__list { list-style: none; margin: 14px 0 0; padding: 0; }
.bs-brief__item { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--bs-hairline); }
.bs-brief__item:first-child { border-top: 0; padding-top: 0; }
.bs-brief__item h3 { font-size: 17px; font-weight: 500; line-height: 1.4; margin: 0; }

/* ---------- Section rails ---------- */
.bs-rail { padding: 36px 0; border-bottom: 1px solid var(--bs-hairline); }
.bs-rail__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.bs-rail__all { font-family: var(--bs-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--bs-blue); }
.bs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ---------- Cards ---------- */
.bs-card { border: 1px solid var(--bs-hairline); background: #FFFFFF; display: flex; flex-direction: column; }
.bs-card__media { background: var(--bs-hairline); aspect-ratio: 16 / 10; overflow: hidden; }
.bs-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.bs-card:hover .bs-card__media img { transform: scale(1.025); }
.bs-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bs-card__title { font-size: 18px; font-weight: 500; line-height: 1.35; margin: 0; }
.bs-card__title a:hover { color: var(--bs-blue); }
.bs-card__meta { margin-top: auto; }

/* ---------- Newsletter band ---------- */
.bs-news { background: var(--bs-night); color: var(--bs-paper); padding: 48px 0; }
.bs-news__line {
  font-family: var(--bs-serif);
  font-size: clamp(20px, 3vw, 28px);
  margin: 10px 0 22px;
  max-width: 30ch;
}
.bs-news__form { display: flex; gap: 10px; max-width: 460px; flex-wrap: wrap; }
.bs-news__form input[type="email"] {
  flex: 1; min-width: 220px;
  background: transparent;
  border: 1px solid var(--bs-night-line);
  color: var(--bs-paper);
  font-family: var(--bs-mono);
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 0;
}
.bs-news__form input[type="email"]::placeholder { color: var(--bs-gray); }
.bs-news__form button {
  background: var(--bs-blue);
  color: var(--bs-paper);
  border: 0;
  font-family: var(--bs-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 12px 22px;
  cursor: pointer;
}
.bs-news__form button:hover { background: var(--bs-blue-deep); }

/* ---------- Footer ---------- */
.bs-footer { background: var(--bs-paper); padding: 28px 0 36px; }
.bs-footer__inner { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.bs-footer__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; }
.bs-footer__menu a { font-family: var(--bs-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bs-gray); }
.bs-footer__menu a:hover { color: var(--bs-blue); }
.bs-footer__legal { font-family: var(--bs-mono); font-size: 10.5px; color: var(--bs-gray); }

/* ---------- Article ---------- */
.bs-article__head { padding: 36px 0 8px; }
.bs-article__title {
  font-family: var(--bs-sans);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 10px 0 14px;
}
.bs-article__dek {
  font-family: var(--bs-serif);
  font-size: clamp(18px, 2.2vw, 22px);
  color: #5C5A54;
  margin: 0 0 18px;
}
.bs-article__byline {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--bs-hairline);
  border-bottom: 1px solid var(--bs-hairline);
}
.bs-article__hero { margin: 28px 0; }
.bs-article__hero img { width: 100%; }
.bs-article__hero figcaption { padding-top: 8px; }

.bs-content { padding-bottom: 24px; }
.bs-content > * { max-width: var(--bs-measure); margin-left: auto; margin-right: auto; }
.bs-content p { margin: 0 0 1.4em; }
.bs-content h2 { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 1.8em auto 0.7em; letter-spacing: -0.01em; }
.bs-content h3 { font-size: 20px; font-weight: 600; margin: 1.6em auto 0.6em; }
.bs-content a { color: var(--bs-blue); border-bottom: 1px solid rgba(34, 83, 196, 0.3); }
.bs-content a:hover { border-bottom-color: var(--bs-blue); }
.bs-content blockquote {
  font-family: var(--bs-serif);
  font-size: 22px;
  line-height: 1.45;
  border-left: 2px solid var(--bs-blue);
  margin: 1.6em auto;
  padding: 4px 0 4px 22px;
  color: #44423D;
}
.bs-content figure { margin: 1.8em auto; }
.bs-content .alignfull { max-width: none; }
.bs-content .alignwide { max-width: 960px; }
.bs-content ul, .bs-content ol { padding-left: 1.2em; margin: 0 0 1.4em; }
.bs-content li { margin-bottom: 0.4em; }
.bs-content hr { border: 0; border-top: 1px solid var(--bs-hairline); margin: 2.2em auto; }
.bs-content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.bs-content table td, .bs-content table th { border: 1px solid var(--bs-hairline); padding: 8px 10px; text-align: left; }

/* ---------- Signature: the Numbers block ---------- */
.bs-numbers {
  background: #FFFFFF;
  border: 1px solid var(--bs-hairline);
  border-top: 2px solid var(--bs-blue);
  padding: 20px 22px;
  margin: 2em auto;
  font-family: var(--bs-mono);
}
.bs-numbers__title {
  font-size: 11px !important;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bs-blue);
  margin: 0 0 12px !important;
  font-family: var(--bs-mono) !important;
}
.bs-numbers table { border-collapse: collapse; width: 100%; font-size: 14px; }
.bs-numbers table td { border: 0; border-top: 1px solid var(--bs-hairline); padding: 8px 0; }
.bs-numbers table tr:first-child td { border-top: 0; }
.bs-numbers table td:first-child { color: var(--bs-gray); }
.bs-numbers table td:last-child { text-align: right; font-weight: 500; }
.bs-numbers table tfoot td { border-top: 2px solid var(--bs-ink); font-weight: 500; }
.bs-numbers__note { font-size: 11.5px; color: var(--bs-gray); margin: 12px 0 0 !important; }

/* ---------- Signature: the Verdict box ---------- */
.bs-verdict {
  background: #FFFFFF;
  border: 1px solid var(--bs-hairline);
  padding: 20px 22px;
  margin: 2em auto;
}
.bs-verdict__stamp {
  display: inline-block;
  font-family: var(--bs-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  margin: 0 0 10px !important;
}
.bs-verdict--worth .bs-verdict__stamp { background: var(--bs-blue); color: var(--bs-paper); }
.bs-verdict--waste .bs-verdict__stamp { background: var(--bs-ink); color: var(--bs-paper); }
.bs-verdict p:last-child { margin-bottom: 0; }

/* ---------- Affiliate disclosure ---------- */
.bs-disclosure {
  max-width: var(--bs-measure);
  margin: 0 auto 1.8em;
  padding: 10px 14px;
  border: 1px solid var(--bs-hairline);
  font-family: var(--bs-mono);
  font-size: 11.5px;
  color: var(--bs-gray);
}

/* ---------- Author box / related ---------- */
.bs-author {
  display: flex; gap: 16px; align-items: flex-start;
  border-top: 1px solid var(--bs-hairline);
  padding: 24px 0;
  margin-top: 16px;
}
.bs-author img { border-radius: 50%; width: 56px; height: 56px; flex-shrink: 0; }
.bs-author__name { font-weight: 600; font-size: 15px; margin: 0 0 4px; }
.bs-author__bio { font-size: 14px; color: #5C5A54; margin: 0; }

.bs-related { border-top: 1px solid var(--bs-hairline); padding: 32px 0 48px; }
.bs-related .bs-grid { margin-top: 18px; }

/* ---------- Archive / category hub ---------- */
.bs-hub__head { padding: 40px 0 28px; border-bottom: 1px solid var(--bs-hairline); }
.bs-hub__title { font-size: clamp(28px, 4vw, 42px); font-weight: 600; letter-spacing: -0.015em; margin: 8px 0 10px; }
.bs-hub__desc { font-family: var(--bs-serif); font-size: 19px; color: #5C5A54; max-width: 56ch; margin: 0; }
.bs-hub__grid { padding: 32px 0 56px; }

/* ---------- Pagination ---------- */
.bs-pagination { display: flex; gap: 8px; justify-content: center; padding: 8px 0 48px; font-family: var(--bs-mono); font-size: 13px; }
.bs-pagination .page-numbers { padding: 8px 12px; border: 1px solid var(--bs-hairline); color: var(--bs-ink); }
.bs-pagination .page-numbers.current { background: var(--bs-ink); color: var(--bs-paper); border-color: var(--bs-ink); }
.bs-pagination a.page-numbers:hover { border-color: var(--bs-blue); color: var(--bs-blue); }

/* ---------- Pages ---------- */
.bs-page__head { padding: 40px 0 10px; }
.bs-page__title { font-size: clamp(28px, 4vw, 42px); font-weight: 600; margin: 0 0 16px; letter-spacing: -0.015em; }

/* ---------- WP alignment + misc ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}
.wp-caption, figcaption { font-family: var(--bs-mono); font-size: 11.5px; color: var(--bs-gray); }
