/*
Theme Name: The Bumbling Sailor
Theme URI: https://thebumblingsailor.co.uk/
Author: The Bumbling Sailor
Description: Custom membership-first WordPress theme for The Bumbling Sailor. Designed to work alongside Restrict Content Pro without changing member data or subscriptions.
Version: 0.6.2
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: bumbling-sailor
*/

:root {
  --ink: #12202a;
  --muted: #60717d;
  --paper: #f9f1e4;
  --paper-2: #fffaf1;
  --navy: #0f2d46;
  --navy-2: #0b2235;
  --sea: #2a7f8f;
  --rust: #c75a2e;
  --sand: #d8c8a6;
  --line: rgba(18,32,42,.13);
  --shadow: 0 18px 50px rgba(13,41,56,.12);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(47,111,122,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,111,122,.025) 1px, transparent 1px);
  background-size: 46px 46px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: var(--navy); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--rust); }
img { max-width: 100%; height: auto; }

.bs-wrap { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.bs-site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(249,241,228,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bs-header-row { min-height: 78px; display:flex; align-items:center; gap:24px; }
.bs-brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink); min-width:max-content; }
.bs-brand-logo-icon { width:58px; height:58px; border-radius:50%; object-fit:contain; flex:0 0 auto; }
.bs-brand-copy strong { display:block; font-family:Georgia,"Times New Roman",serif; font-size:1.18rem; line-height:1; letter-spacing:-.025em; color:var(--navy); }
.bs-brand-copy strong em { color:var(--sea); font-style:normal; font-weight:500; }
.bs-brand-copy span { display:block; color:var(--muted); font-size:.73rem; margin-top:4px; }
.custom-logo { max-height:52px; width:auto; display:block; }

.bs-nav { margin-left:auto; }
.bs-nav ul { list-style:none; display:flex; gap:8px; align-items:center; margin:0; padding:0; flex-wrap:wrap; }
.bs-nav a { display:block; padding:10px 12px; text-decoration:none; font-weight:700; font-size:.93rem; border-radius:999px; }
.bs-nav a:hover, .bs-nav .current-menu-item > a { background:rgba(18,56,75,.08); color:var(--navy); }
.bs-account { margin-left:4px; display:inline-flex; align-items:center; gap:8px; background:var(--navy); color:#fff; text-decoration:none; font-weight:800; padding:11px 16px; border-radius:999px; }
.bs-account:hover { background:var(--rust); color:white; }
.bs-menu-toggle { display:none; margin-left:auto; min-width:46px; min-height:44px; border:1px solid var(--line); background:var(--paper-2); border-radius:12px; padding:9px 12px; font-weight:800; cursor:pointer; }
.bs-nav .bs-nav-account { display:none; }
.bs-menu-toggle:focus-visible, .bs-nav a:focus-visible, .bs-account:focus-visible, .bs-button:focus-visible { outline:3px solid var(--rust); outline-offset:3px; }

.bs-hero { padding:70px 0 42px; position:relative; overflow:hidden; }
.bs-hero-grid { display:grid; grid-template-columns: 1.05fr .95fr; gap:38px; align-items:center; position:relative; z-index:1; }
.bs-hero-copy { position:relative; }
.bs-hero-copy::after { content:"✦"; position:absolute; z-index:-1; right:2%; top:-18%; font-family:Georgia,serif; font-size:clamp(11rem,22vw,19rem); line-height:1; color:rgba(47,111,122,.045); transform:rotate(12deg); pointer-events:none; }
.bs-eyebrow { display:inline-flex; align-items:center; gap:8px; margin:0 0 14px; font-weight:900; text-transform:uppercase; letter-spacing:.12em; font-size:.76rem; color:var(--rust); }
.bs-hero h1 { margin:0; max-width:900px; font-family: Georgia, "Times New Roman", serif; font-size:clamp(3rem,7vw,6.8rem); line-height:.91; letter-spacing:-.055em; }
.bs-hero h1 em { color:var(--sea); font-weight:400; }
.bs-lede { max-width:700px; font-size:clamp(1.08rem,1.7vw,1.28rem); color:#3f515d; margin:24px 0 28px; }
.bs-actions { display:flex; gap:12px; flex-wrap:wrap; }
.bs-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:0 20px; border-radius:999px; text-decoration:none; font-weight:900; border:1px solid var(--navy); }
.bs-button-primary { background:var(--navy); color:#fff; }
.bs-button-primary:hover { background:var(--rust); border-color:var(--rust); color:#fff; }
.bs-button-secondary { background:transparent; color:var(--navy); }
.bs-button-secondary:hover { background:var(--paper-2); color:var(--navy); }

.bs-hero-media { aspect-ratio:16/9; min-height:0; border-radius:32px; overflow:hidden; box-shadow:var(--shadow); position:relative; background:linear-gradient(145deg,var(--navy),var(--sea)); border:1px solid rgba(18,56,75,.14); }
.bs-hero-media img { width:100%; height:100%; object-fit:cover; object-position:center; position:absolute; inset:0; }
.bs-hero-media::after { content:""; position:absolute; inset:0; background:linear-gradient(to top, rgba(13,41,56,.90), rgba(13,41,56,.16) 58%, rgba(13,41,56,0) 78%); }
.bs-hero-media.is-video::before { content:"▶"; position:absolute; z-index:3; left:50%; top:45%; transform:translate(-50%,-50%); width:62px; height:62px; display:grid; place-items:center; padding-left:4px; border-radius:50%; background:rgba(13,41,56,.86); color:#fff; font-size:1.25rem; box-shadow:0 10px 30px rgba(13,41,56,.28); }
.bs-hero-note { position:absolute; z-index:2; left:24px; right:24px; bottom:22px; color:#fff; }
.bs-hero-note small { opacity:.78; text-transform:uppercase; letter-spacing:.1em; font-weight:800; }
.bs-hero-note strong { display:block; font-family:Georgia,serif; font-size:1.65rem; margin-top:4px; text-shadow:0 2px 18px rgba(0,0,0,.48); }

.bs-section { padding:56px 0; }
.bs-section-head { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:22px; position:relative; padding-top:18px; }
.bs-section-head::before { content:""; position:absolute; left:0; top:0; width:74px; height:2px; background:linear-gradient(90deg,var(--rust) 0 36%, transparent 36% 44%, var(--sea) 44% 80%, transparent 80% 88%, var(--navy) 88% 100%); border-radius:999px; }
.bs-section-head h2 { margin:0; font-family:Georgia,serif; font-size:clamp(2rem,4vw,3.5rem); letter-spacing:-.04em; }
.bs-section-head p { margin:0; max-width:620px; color:var(--muted); }

.bs-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.bs-card { display:flex; flex-direction:column; min-width:0; background:var(--paper-2); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:0 8px 30px rgba(13,41,56,.06); }
.bs-card-media { aspect-ratio:16/9; background:#d8e0df; overflow:hidden; position:relative; }
.bs-card-media img { width:100%; height:100%; object-fit:cover; object-position:center; transition:transform .35s ease; }
.bs-card:hover .bs-card-media img { transform:scale(1.03); }
.bs-card-media.is-video::after { content:"▶"; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:54px; height:54px; display:grid; place-items:center; padding-left:3px; border-radius:50%; background:rgba(13,41,56,.88); color:#fff; font-size:1.15rem; box-shadow:0 8px 24px rgba(13,41,56,.24); }
.bs-card-body { padding:20px; display:flex; flex-direction:column; flex:1; }
.bs-card-meta { display:flex; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:.82rem; font-weight:750; }
.bs-chip { border-radius:999px; padding:5px 9px; background:rgba(18,56,75,.08); color:var(--navy); }
.bs-card h3 { font-family:Georgia,serif; margin:12px 0 8px; font-size:1.45rem; line-height:1.13; }
.bs-card h3 a { text-decoration:none; color:var(--ink); }
.bs-card h3 a:hover { color:var(--rust); }
.bs-card p { color:var(--muted); margin:0 0 18px; }
.bs-card-link { margin-top:auto; font-weight:900; text-decoration:none; }

.bs-feature-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.bs-feature { min-height:220px; padding:24px; border-radius:var(--radius); background:var(--navy); color:#fff; display:flex; flex-direction:column; justify-content:flex-end; text-decoration:none; overflow:hidden; position:relative; border:1px solid rgba(255,255,255,.08); }
.bs-feature::before { content:""; position:absolute; width:132px; height:132px; border:1px solid rgba(255,255,255,.16); border-radius:50%; right:-38px; top:-38px; box-shadow:0 0 0 18px rgba(255,255,255,.035); }
.bs-feature::after { content:"✦"; position:absolute; right:19px; top:10px; color:rgba(255,255,255,.23); font-family:Georgia,serif; font-size:2.15rem; line-height:1; }
.bs-feature:nth-child(2n) { background:var(--sea); }
.bs-feature:nth-child(3n) { background:var(--rust); }
.bs-feature small { text-transform:uppercase; letter-spacing:.12em; opacity:.74; font-weight:900; }
.bs-feature strong { display:block; font-family:Georgia,serif; font-size:1.65rem; line-height:1.05; margin-top:6px; }
.bs-feature:hover { color:#fff; transform:translateY(-2px); }

.bs-membership { background:var(--navy-2); color:white; }
.bs-membership .bs-section-head p { color:rgba(255,255,255,.72); }
.bs-membership .bs-section-head h2 { color:#fff; }
.bs-membership-panel { display:grid; grid-template-columns:1.2fr .8fr; gap:22px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); padding:30px; border-radius:28px; }
.bs-membership-panel h3 { margin:0 0 10px; font-family:Georgia,serif; font-size:2rem; }
.bs-membership-panel ul { margin:18px 0 0; padding-left:1.2em; }
.bs-membership-price { align-self:center; text-align:center; background:#fff; color:var(--ink); border-radius:22px; padding:28px; }
.bs-membership-price strong { display:block; font-size:2.8rem; line-height:1; color:var(--navy); }
.bs-membership-price span { display:block; color:var(--muted); margin:7px 0 18px; }

.bs-content { width:min(calc(100% - 32px),850px); margin:0 auto; padding:54px 0 72px; }
.bs-content-wide { width:min(calc(100% - 32px),var(--max)); }
.bs-entry-header { margin-bottom:28px; }
.bs-entry-header h1 { margin:8px 0 12px; font-family:Georgia,serif; font-size:clamp(2.5rem,6vw,5rem); line-height:.98; letter-spacing:-.045em; }
.bs-entry-meta { color:var(--muted); font-size:.92rem; }
.bs-entry-content { font-size:1.08rem; }
.bs-entry-content > * { max-width:100%; }
.bs-entry-content h2, .bs-entry-content h3 { font-family:Georgia,serif; line-height:1.12; }
.bs-entry-content iframe { max-width:100%; }
.bs-entry-content { overflow-wrap:anywhere; }
.bs-entry-content table, .rcp-table { width:100%; border-collapse:collapse; }
.bs-entry-content th, .bs-entry-content td, .rcp-table th, .rcp-table td { padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.rcp_message, .rcp_success, .rcp_error { max-width:100%; border-radius:14px; padding:12px 14px; }

.bs-lock-notice { margin:28px 0; padding:28px; background:var(--paper-2); border:1px solid var(--line); border-radius:22px; }
.bs-lock-notice h2 { margin-top:0; }

.bs-pagination { margin-top:34px; display:flex; justify-content:center; }
.bs-pagination .nav-links { display:flex; gap:8px; flex-wrap:wrap; }
.bs-pagination a, .bs-pagination span { min-width:40px; min-height:40px; display:grid; place-items:center; padding:0 12px; border-radius:999px; background:var(--paper-2); border:1px solid var(--line); text-decoration:none; font-weight:800; }
.bs-pagination .current { background:var(--navy); color:#fff; }

.bs-site-footer { border-top:1px solid var(--line); padding:44px 0; background:#ece6da; position:relative; }
.bs-site-footer::before { content:""; position:absolute; left:0; right:0; top:8px; height:3px; opacity:.22; background:repeating-linear-gradient(90deg,var(--navy) 0 10px, transparent 10px 16px, var(--rust) 16px 24px, transparent 24px 30px); }
.bs-footer-grid { display:grid; grid-template-columns:1.2fr .8fr; gap:28px; }
.bs-footer-grid h2 { font-family:Georgia,serif; margin:0 0 10px; }
.bs-footer-nav ul { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.bs-footer-nav a { text-decoration:none; font-weight:750; }
.bs-footer-brand { display:flex; align-items:center; gap:16px; }
.bs-footer-brand img { width:82px; height:82px; border-radius:50%; object-fit:contain; flex:0 0 auto; }
.bs-footer-logo-wide { width:min(100%,420px); max-height:220px; object-fit:contain; object-position:left center; }
.bs-copyright { margin-top:28px; color:var(--muted); font-size:.86rem; }

/* Restrict Content Pro: preserve functionality, improve presentation */
#rcp_registration_form,
#rcp_login_form,
#rcp_profile_editor_form,
#rcp_update_card_form,
.rcp_form {
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:22px;
  padding:24px;
  box-shadow:0 8px 30px rgba(13,41,56,.06);
}
.rcp_form input[type="text"],
.rcp_form input[type="email"],
.rcp_form input[type="password"],
.rcp_form input[type="number"],
.rcp_form select,
.rcp_form textarea {
  width:100%; min-height:46px; border:1px solid rgba(18,32,42,.2); border-radius:12px; background:#fff; padding:10px 12px; font:inherit;
}
.rcp_form input[type="submit"],
.rcp_form button,
#rcp_registration_form input[type="submit"] {
  border:0; border-radius:999px; background:var(--navy); color:#fff; font:inherit; font-weight:900; padding:12px 18px; cursor:pointer;
}
.rcp_form input[type="submit"]:hover, .rcp_form button:hover { background:var(--rust); }

/* Newsletter removed from the new presentation. This only hides common front-end subscription blocks. */
.wp-block-jetpack-subscriptions,
.wp-block-jetpack-subscriptions__supports-newline,
.jetpack-subscribe-modal,
#subscribe-email,
.widget_blog_subscription { display:none !important; }

.screen-reader-text { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

@media (max-width: 980px) {
  .bs-menu-toggle { display:block; }
  .bs-nav { display:none; position:absolute; top:78px; left:16px; right:16px; background:var(--paper-2); border:1px solid var(--line); border-radius:18px; padding:12px; box-shadow:var(--shadow); }
  .bs-nav.is-open { display:block; }
  .bs-nav ul { display:block; }
  .bs-nav a { padding:12px; }
  .bs-nav .bs-nav-account { display:block; margin-top:6px; border-top:1px solid var(--line); padding-top:6px; }
  .bs-nav .bs-nav-account a { background:var(--navy); color:#fff; }
  .bs-nav .bs-nav-account a:hover { background:var(--rust); color:#fff; }
  .bs-account { display:none; }
  .bs-hero-grid, .bs-membership-panel { grid-template-columns:1fr; }
  .bs-hero-media { min-height:0; }
  .bs-grid { grid-template-columns:repeat(2,1fr); }
  .bs-feature-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 640px) {
  .bs-wrap { width:min(calc(100% - 22px),var(--max)); }
  .bs-header-row { min-height:68px; }
  .bs-nav { top:68px; }
  .bs-brand-copy span { display:none; }
  .bs-brand-logo-icon { width:48px; height:48px; }
  .bs-brand-copy strong { font-size:1rem; }
  .bs-hero { padding:44px 0 28px; }
  .bs-hero h1 { font-size:clamp(3.05rem,16vw,5.2rem); }
  .bs-hero-media { min-height:0; border-radius:24px; }
  .bs-section { padding:42px 0; }
  .bs-section-head { display:block; }
  .bs-section-head p { margin-top:8px; }
  .bs-grid, .bs-feature-grid { grid-template-columns:1fr; }
  .bs-feature { min-height:160px; }
  .bs-footer-grid { grid-template-columns:1fr; }
  .bs-entry-content table, .rcp-table { display:block; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .rcp_form, #rcp_registration_form, #rcp_login_form, #rcp_profile_editor_form, #rcp_update_card_form { padding:18px; }
}

body.admin-bar .bs-site-header { top:32px; }
@media (max-width:782px) { body.admin-bar .bs-site-header { top:46px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .bs-card-media img, .bs-feature { transition:none !important; }
}

/* Bumbling Sailor mobile layout repair — 2026-09-28. */
@media (max-width: 980px) {
  .bs-hero .bs-hero-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    aspect-ratio: auto;
    min-width: 0;
    background: var(--navy);
    text-decoration: none;
  }
  .bs-hero .bs-hero-media > img {
    position: static;
    grid-area: 1 / 1;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
  .bs-hero .bs-hero-media::after { display: none; }
  .bs-hero .bs-hero-media.is-video::before {
    position: static;
    grid-area: 1 / 1;
    place-self: center;
    transform: none;
    width: 56px;
    height: 56px;
    pointer-events: none;
  }
  .bs-hero .bs-hero-note {
    position: static;
    grid-area: 2 / 1;
    min-width: 0;
    padding: 16px 20px 20px;
    color: #fff;
  }
  .bs-hero .bs-hero-note small {
    display: block;
    font-size: .75rem;
    line-height: 1.4;
  }
  .bs-hero .bs-hero-note strong {
    margin-top: 6px;
    font-size: clamp(1.2rem, 3.8vw, 1.65rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-shadow: none;
  }
  .bs-site-header .bs-nav { top: 100%; }
}
@media (max-width: 640px) {
  .bs-site-header .bs-header-row { gap: 12px; }
  .bs-site-header .bs-brand { min-width: 0; }
  .bs-site-header .bs-brand-copy { min-width: 0; }
  .bs-site-header .bs-brand-copy strong { line-height: 1.15; }
  .bs-site-header .bs-menu-toggle { flex-shrink: 0; }
}
/* The mobile WordPress toolbar scrolls away below this breakpoint. */
@media (max-width: 600px) {
  body.admin-bar .bs-site-header { top: 0 !important; }
}
