/*
Theme Name: Blocksy Child - W5RTM
Theme URI: https://w5rtm.net/
Description: Child theme for Blocksy matching the Drones, Drams & Cigars aesthetic (dark, whiskey-gold, signal-green). Includes splash front page + home/projects/docs templates.
Author: W5RTM
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child-w5rtm
*/

/* --------- Design tokens --------- */
:root{
  /* Balanced palette (current) */
  --w5-bg: #0b1220;
  --w5-panel: rgba(255,255,255,.06);
  --w5-panel2: rgba(255,255,255,.10);
  --w5-text: rgba(232,238,244,.92);
  --w5-muted: rgba(205,214,224,.74);
  --w5-muted-strong: rgba(218,226,234,.82);
  --w5-faint: rgba(184,194,205,.62);
  --w5-gold: #C58A5C;  /* softer whiskey */
  --w5-green: #5FCF8A;  /* muted signal green */
  --w5-radius: 18px;
  --w5-shadow: 0 10px 35px rgba(0,0,0,.35);

  --theme-background-color: var(--w5-bg);
  --theme-text-color: var(--w5-text);
  --theme-palette-color-1: var(--w5-gold);
  --theme-palette-color-2: var(--w5-green);
  --theme-palette-color-7: var(--w5-panel2);
  --theme-palette-color-8: var(--w5-bg);
}

/* Alternative palettes (commented) */
/*
:root{
  --w5-text: rgba(230,225,215,.92);  // Warm/dim
  --w5-muted: rgba(206,198,187,.74);
  --w5-muted-strong: rgba(220,212,200,.82);
  --w5-faint: rgba(182,173,160,.62);
  --w5-gold: #C08A54;
  --w5-green: #6BC58A;
}
*/
/*
:root{
  --w5-text: rgba(226,234,244,.92);  // Cool/dim
  --w5-muted: rgba(198,208,220,.74);
  --w5-muted-strong: rgba(214,224,234,.82);
  --w5-faint: rgba(176,188,202,.62);
  --w5-gold: #B9835B;
  --w5-green: #57C39A;
}
*/

/* Make WP background feel like the banner/logo palette */
body{
  font-size: 16.5px;
  line-height: 1.7;
  background:
    radial-gradient(1200px 800px at 10% 5%, rgba(201,138,77,.18), transparent 60%),
    radial-gradient(900px 650px at 90% 10%, rgba(77,214,123,.12), transparent 55%),
    radial-gradient(1200px 900px at 50% 100%, rgba(255,255,255,.06), transparent 60%),
    var(--w5-bg);
}

h2,
h3,
h4,
h5,
h6,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.wp-site-blocks h2,
.wp-site-blocks h3,
.wp-site-blocks h4,
.wp-site-blocks h5,
.wp-site-blocks h6{
  color: var(--w5-gold) !important;
}


/* Header/Footer base */
header.site-header,
.ct-header,
.ct-header [data-device],
.ct-header [data-row],
.ct-header [data-row] > div,
.ct-header [data-sticky],
.ct-header .ct-header-ghost,
.ct-header .ct-header-main,
.ct-header .ct-header-top,
.ct-header .ct-header-bottom,
.ct-header .ct-header-middle{
  background-color: var(--w5-bg) !important;
  --background-color: var(--w5-bg);
}

footer.site-footer,
.ct-footer,
.ct-footer [data-row],
.ct-footer [data-row] > div,
.ct-footer [data-row*="top"],
.ct-footer [data-row*="middle"],
.ct-footer [data-row*="bottom"]{
  background-color: var(--w5-bg) !important;
  --background-color: var(--w5-bg);
}

.ct-header,
.ct-footer{
  color: var(--w5-text);
}

.ct-header a,
.ct-footer a{
  color: var(--w5-text);
}

.ct-header a:hover,
.ct-footer a:hover{
  color: var(--w5-gold);
}
footer.site-footer,
.ct-footer,
.ct-footer [data-row],
.ct-footer [data-row*="top"],
.ct-footer [data-row*="middle"],
.ct-footer [data-row*="bottom"]{
  background-color: var(--w5-bg);
}

.ct-header,
.ct-footer{
  color: var(--w5-text);
}

.ct-header a,
.ct-footer a{
  color: var(--w5-text);
}

.ct-header a:hover,
.ct-footer a:hover{
  color: var(--w5-gold);
}
/* Buttons */
.w5-btn,
.wp-block-button__link{
  border-radius: 14px;
  font-weight: 650;
  text-decoration: none;
}
.w5-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--w5-text);
  transition: transform .05s ease, background .2s ease, border-color .2s ease;
}
.w5-btn:hover{ background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.26); }
.w5-btn:active{ transform: translateY(1px); }
.w5-btn--gold{
  background: linear-gradient(135deg, rgba(197,138,92,.92), rgba(197,138,92,.62));
  border-color: rgba(197,138,92,.45);
  color:#10151f;
}
.w5-btn--green{
  background: linear-gradient(135deg, rgba(95,207,138,.90), rgba(95,207,138,.55));
  border-color: rgba(95,207,138,.45);
  color:#0b1220;
}
.w5-filter-bar{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.w5-filter-stack{
  display: grid;
  gap: 12px;
}
.w5-filter-btn{
  padding: 8px 14px;
  font-size: 0.95rem;
}
.w5-year-btn{
  padding: 8px 14px;
  font-size: 0.95rem;
}
.w5-filter-btn.is-active{
  background: linear-gradient(135deg, rgba(197,138,92,.92), rgba(197,138,92,.62));
  border-color: rgba(197,138,92,.45);
  color:#10151f;
}
.w5-year-btn.is-active{
  background: linear-gradient(135deg, rgba(95,207,138,.90), rgba(95,207,138,.55));
  border-color: rgba(95,207,138,.45);
  color:#0b1220;
}
.w5-post-card.is-hidden{
  display: none;
}

/* Panels / cards */
.w5-card{
  background: var(--w5-panel);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--w5-radius);
  box-shadow: var(--w5-shadow);
  padding: 22px;
}

/* Hero banner (home template) */
.w5-hero{
  border-radius: 22px;
  overflow:hidden;
  box-shadow: var(--w5-shadow);
  border: 1px solid rgba(255,255,255,.10);
}
.w5-hero__bg{
  min-height: 320px;
  background-position: center;
  background-size: cover;
}
.w5-hero__overlay{
  min-height: 320px;
  display:flex;
  align-items:flex-end;
  padding: 22px;
  background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.70));
}
.w5-hero__title{
  margin:0;
  color: var(--w5-text);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -.5px;
}
.w5-hero__lead{
  margin: 8px 0 0 0;
  color: var(--w5-muted);
  max-width: 70ch;
}

/* Splash (front-page) */
.w5-splash{
  min-height: calc(100vh - 120px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 18px;
}
.w5-splash__inner{
  text-align:center;
  max-width: 900px;
}
.w5-splash__logo{
  max-width: min(880px, 92vw);
  height:auto;
  filter: drop-shadow(0 18px 42px rgba(0,0,0,.45));
}
.w5-splash__cta{
  margin-top: 18px;
  display:flex;
  gap: 12px;
  justify-content:center;
  flex-wrap: wrap;
}


/* Theme-aligned text */
body{
  color: var(--w5-text);
}

/* Utilities & layout helpers */
.w5-longform{
  padding: 26px 0;
}
.w5-longform__inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}
.w5-title{
  margin: 0 0 8px 0;
}
.w5-lead{
  margin: 0;
  color: var(--w5-muted);
  max-width: 80ch;
}
.w5-section{
  margin-top: 14px;
}
.w5-section--lg{
  margin-top: 18px;
}
.w5-section--xl{
  margin-top: 28px;
}
.w5-meta{
  margin-top: 10px;
  font-size: 12px;
  color: var(--w5-faint);
}
.w5-muted{
  color: var(--w5-muted);
}
.w5-muted-strong{
  color: var(--w5-muted-strong);
}
.w5-note{
  margin: 0;
  color: var(--w5-muted);
}
.w5-m-0{
  margin: 0;
}
.w5-mt-6{
  margin-top: 6px;
}
.w5-mt-8{
  margin-top: 8px;
}
.w5-mt-10{
  margin-top: 10px;
}
.w5-mt-12{
  margin-top: 12px;
}
.w5-mt-14{
  margin-top: 14px;
}
.w5-mt-18{
  margin-top: 18px;
}
.w5-mt-28{
  margin-top: 28px;
}
.w5-mb-10{
  margin-bottom: 10px;
}
.w5-mb-12{
  margin-bottom: 12px;
}
.w5-max-78{
  max-width: 78ch;
}
.w5-max-80{
  max-width: 80ch;
}
.w5-heading-md{
  margin: 0;
  font-size: 20px;
}
.w5-heading-sm{
  margin: 0 0 10px 0;
  font-size: 18px;
}
.w5-pt-18{
  padding-top: 18px;
}
.w5-faint{
  color: var(--w5-faint);
}
.w5-opacity-60{
  opacity: .6;
}
.w5-toc-list{
  margin: 0;
  padding-left: 18px;
}
.w5-flex-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.w5-flex-between{
  align-items: baseline;
  justify-content: space-between;
}

.w5-scotch-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 16px 0;
}
@media (max-width: 900px){
  .w5-scotch-grid{
    grid-template-columns: 1fr;
  }
}
.w5-scotch-image{
  width: 100%;
  height: 180px;
  height: auto;
  object-fit: contain;
  background-color: #0b1220;
  border-radius: 12px;
  display: block;
}

/* Hero card layouts (drone/radio detail pages) */
.w5-hero-card{
  margin-top: 28px;
  overflow: hidden;
}
.w5-hero-grid{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  align-items: center;
}
@media (max-width: 900px){
  .w5-hero-grid{
    grid-template-columns: 1fr;
  }
}
.w5-hero-media{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: auto;
  background: linear-gradient(135deg, rgba(93,139,255,.16), rgba(13,17,23,.6));
}
.w5-hero-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.w5-hero-placeholder{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--w5-muted);
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  padding: 0 16px;
}
.w5-hero-badge{
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,.45);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--w5-text);
}

/* Splash note */
.w5-splash-note{
  margin-top: 14px;
  color: var(--w5-muted);
  font-size: 13px;
}

/* Docs TOC */
.w5-toc-nested{
  margin-left: 14px;
}

/* Docs template typography */
.w5-docs{
  max-width: 980px;
  margin: 0 auto;
}
.w5-docs h2, .w5-docs h3{
  scroll-margin-top: 90px;
}
.w5-docs code, .w5-docs pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.w5-docs pre{
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 14px;
  overflow:auto;
}
.w5-docs table{
  width:100%;
  border-collapse: collapse;
}
.w5-docs th, .w5-docs td{
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 10px;
  vertical-align: top;
}
.w5-docs th{
  background: rgba(255,255,255,.06);
}

/* Projects list */
.w5-projects-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .w5-projects-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 620px){
  .w5-projects-grid{ grid-template-columns: 1fr; }
}
.w5-project-card{
  padding: 16px;
}
.w5-project-card h3{
  margin: 0 0 6px 0;
  font-size: 16px;
}
.w5-project-card p{
  margin: 0;
  color: var(--w5-muted);
}

/* Navigation link colors */
.ct-header a,
.ct-header .ct-menu a,
.ct-header .menu a,
.ct-header nav a{
  color: var(--w5-text);
}

.ct-header a:hover,
.ct-header .ct-menu a:hover,
.ct-header .menu a:hover,
.ct-header nav a:hover{
  color: var(--w5-gold);
}

.ct-header a:visited,
.ct-header .ct-menu a:visited,
.ct-header .menu a:visited,
.ct-header nav a:visited{
  color: var(--w5-muted);
}

.ct-header .current-menu-item > a,
.ct-header .current_page_item > a{
  color: var(--w5-gold);
}

/* Gallery */
.w5-gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){
  .w5-gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px){
  .w5-gallery-grid{
    grid-template-columns: 1fr;
  }
}
.w5-gallery-item{
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.2);
}
.w5-gallery-image{
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.w5-text-orange {
  color: #f28c28;
}

.w5-about-gallery .w5-gallery-image {
  height: 360px;
  object-fit: contain;
  background: rgba(0,0,0,.25);
}

.w5-about-gallery .w5-hero-placeholder {
  min-height: 360px;
}

.page-template-page-about-me .entry-content h1,
.page-template-page-about-me .entry-content h2,
.page-template-page-about-me .entry-content h3,
.page-template-page-about-me .entry-content h4,
.page-template-page-about-me .entry-content h5,
.page-template-page-about-me .entry-content h6{
  color: #f28c28;
}

.w5-btn--red{
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.w5-btn--red:hover{
  background: #a93226;
  border-color: #a93226;
  color: #fff;
}

/* Force page background */
html,
body{
  background-color: var(--w5-bg) !important;
}

#main-container,
main.site-main,
.site-main,
.ct-container-full,
.ct-container,
.ct-container-narrow,
.ct-container-wide,
.ct-container-full[data-content],
.ct-container-full[data-content] > *{
  background-color: transparent !important;
  background-image: none !important;
}

/* Logbook layout */
.w5-logbook-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px){
  .w5-logbook-grid{
    grid-template-columns: 1fr;
  }
}
.w5-logbook-grid iframe,
.w5-logbook-grid img{
  max-width: 100%;
}

/* Embedded frames */
.w5-embed-frame{
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,.2);
}
.w5-embed-frame iframe{
  width: 100%;
  height: clamp(320px, 70vh, 720px);
  border: 0;
  display: block;
}
@media (max-width: 900px){
  .w5-embed-frame iframe{
    height: clamp(320px, 60vh, 560px);
  }
}
@media (max-width: 600px){
  .w5-embed-frame iframe{
    height: clamp(260px, 55vh, 420px);
  }
}


/* Links table */
.w5-links-table table{
  width: 100%;
  border-collapse: collapse;
}
.w5-links-table th,
.w5-links-table td{
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 12px;
  text-align: left;
}
.w5-links-table th{
  background: rgba(255,255,255,.06);
}
.w5-links-table a{
  color: var(--w5-green);
}
.w5-links-table a:visited{
  color: var(--w5-gold);
}
