/*
Theme Name: 3DP Outpost
Theme URI: https://www.3dpoutpost.com
Description: Blocksy child theme for 3D Printing Outpost — ember-on-graphite workshop identity, photo-forward, day/night aware.
Author: 3D Printing Outpost
Template: blocksy
Version: 1.0.0
*/

/* ============================================================
   3DP Outpost — semantic theme tokens.
   Workshop graphite is the DEFAULT (night); the shop-wall light
   scheme applies when the OS asks for light or the visitor picks it.
   Accent = ember/hotend orange (deliberately NOT the sister site's cyan).
   The inline no-flash script in functions.php sets data-theme early.
   ============================================================ */
:root[data-theme="dark"], :root:not([data-theme]){
  --op-page:#171a21; --op-header:#14171d; --op-header-border:#262c37;
  --op-header-text:#dfe3ea; --op-header-icon:#dfe3ea;
  --op-surface:#232833; --op-surface-2:#1c212b;
  --op-text:#c2cad6; --op-heading:#f6f4ef; --op-muted:#8a95a6;
  --op-border:#2b323f; --op-card-border:#2b323f; --op-card-hover-border:#f26a1b;
  --op-accent:#f7883a; --op-accent-hover:#ffa15c; --op-link:#f7883a; --op-link-hover:#ffa15c;
  --op-ember:#f26a1b; --op-ember-deep:#c14a10; --op-ok:#3fae6b;
  --op-btn:#f26a1b; --op-btn-hover:#ff8636; --op-btn-text:#171a21;
  --op-footer:#101319; --op-footer-text:#8892a0;
  --op-breadcrumb:#8a95a6; --op-breadcrumb-link:#a4adba;
  --op-card-title:#f2f0ea; --op-card-excerpt:#9aa4b0; --op-card-meta:#828d9a;
  --op-dropdown-bg:#1b2029; --op-dropdown-text:#dfe3ea; --dropdown-background-hover-color:rgba(255,255,255,.06);
  /* Blocksy core palette (color-1 accent … color-8 page bg) */
  --theme-palette-color-1:#f26a1b !important; --theme-palette-color-2:#c14a10 !important;
  --theme-palette-color-3:#f6f4ef !important; --theme-palette-color-4:#c2cad6 !important;
  --theme-palette-color-5:#2b323f !important; --theme-palette-color-6:#1c212b !important;
  --theme-palette-color-7:#1a1f27 !important; --theme-palette-color-8:#171a21 !important;
  /* Hero scene — night: finished outpost glowing warm, printer idle */
  --h-panel:#1a1f28; --h-frame:#5a6678; --h-bed:#cfd5de; --h-bed-edge:#f26a1b;
  --h-wall:#2c3340; --h-wall-l:#242a35; --h-roof:#1d232d; --h-layer:#3a4350;
  --h-window:#ffc061; --h-glow:#f26a1b; --h-spool:#c14a10; --h-fila:#f26a1b;
  --h-bench:#20262f; --h-bench-top:#2b3340; --h-prod:#3a4350; --h-prod-2:#4a5568;
  --h-sky:#141922; --h-sky-2:#1b212b; --h-led:#f7883a;
}
:root[data-theme="light"]{
  --op-page:#f7f6f3; --op-header:#ffffff; --op-header-border:#e6e2d9;
  --op-header-text:#2a2f38; --op-header-icon:#3a414c;
  --op-surface:#ffffff; --op-surface-2:#efece5;
  --op-text:#39414d; --op-heading:#1c1f26; --op-muted:#6b7280;
  --op-border:#e4e0d7; --op-card-border:#e7e3da; --op-card-hover-border:#f26a1b;
  --op-accent:#c14a10; --op-accent-hover:#a23d0c; --op-link:#c14a10; --op-link-hover:#a23d0c;
  --op-ember:#f26a1b; --op-ember-deep:#c14a10; --op-ok:#2f8f55;
  --op-btn:#f26a1b; --op-btn-hover:#e05e12; --op-btn-text:#1c1f26;
  --op-footer:#efece5; --op-footer-text:#5a6470;
  --op-breadcrumb:#6b7280; --op-breadcrumb-link:#4a525d;
  --op-card-title:#1c1f26; --op-card-excerpt:#4a525d; --op-card-meta:#6b7683;
  --op-dropdown-bg:#ffffff; --op-dropdown-text:#2a2f38; --dropdown-background-hover-color:rgba(0,0,0,.05);
  --theme-palette-color-1:#c14a10 !important; --theme-palette-color-2:#a23d0c !important;
  --theme-palette-color-3:#1c1f26 !important; --theme-palette-color-4:#39414d !important;
  --theme-palette-color-5:#e4e0d7 !important; --theme-palette-color-6:#efece5 !important;
  --theme-palette-color-7:#ffffff !important; --theme-palette-color-8:#f7f6f3 !important;
  /* Hero scene — day: active print, bright shop, cool daylight */
  --h-panel:#eceae3; --h-frame:#4a5568; --h-bed:#2b3340; --h-bed-edge:#f26a1b;
  --h-wall:#f0ece3; --h-wall-l:#ddd6c6; --h-roof:#c9552b; --h-layer:#c3bcaa;
  --h-window:#bcd3e0; --h-glow:#f26a1b; --h-spool:#c14a10; --h-fila:#f26a1b;
  --h-bench:#d8d2c4; --h-bench-top:#e6e0d2; --h-prod:#c3bcaa; --h-prod-2:#a9a196;
  --h-sky:#e3ecf1; --h-sky-2:#d3e0e8; --h-led:#f7883a;
}
@media (prefers-color-scheme: light){
  :root:not([data-theme]){
    --op-page:#f7f6f3; --op-header:#ffffff; --op-header-border:#e6e2d9;
    --op-header-text:#2a2f38; --op-header-icon:#3a414c;
    --op-surface:#ffffff; --op-surface-2:#efece5;
    --op-text:#39414d; --op-heading:#1c1f26; --op-muted:#6b7280;
    --op-border:#e4e0d7; --op-card-border:#e7e3da; --op-card-hover-border:#f26a1b;
    --op-accent:#c14a10; --op-accent-hover:#a23d0c; --op-link:#c14a10; --op-link-hover:#a23d0c;
    --op-ember:#f26a1b; --op-ember-deep:#c14a10; --op-ok:#2f8f55;
    --op-btn:#f26a1b; --op-btn-hover:#e05e12; --op-btn-text:#1c1f26;
    --op-footer:#efece5; --op-footer-text:#5a6470;
    --op-breadcrumb:#6b7280; --op-breadcrumb-link:#4a525d;
    --op-card-title:#1c1f26; --op-card-excerpt:#4a525d; --op-card-meta:#6b7683;
    --op-dropdown-bg:#ffffff; --op-dropdown-text:#2a2f38; --dropdown-background-hover-color:rgba(0,0,0,.05);
    --theme-palette-color-1:#c14a10 !important; --theme-palette-color-2:#a23d0c !important;
    --theme-palette-color-3:#1c1f26 !important; --theme-palette-color-4:#39414d !important;
    --theme-palette-color-5:#e4e0d7 !important; --theme-palette-color-6:#efece5 !important;
    --theme-palette-color-7:#ffffff !important; --theme-palette-color-8:#f7f6f3 !important;
    --h-panel:#eceae3; --h-frame:#4a5568; --h-bed:#2b3340; --h-bed-edge:#f26a1b;
    --h-wall:#f0ece3; --h-wall-l:#ddd6c6; --h-roof:#c9552b; --h-layer:#c3bcaa;
    --h-window:#bcd3e0; --h-glow:#f26a1b; --h-spool:#c14a10; --h-fila:#f26a1b;
    --h-bench:#d8d2c4; --h-bench-top:#e6e0d2; --h-prod:#c3bcaa; --h-prod-2:#a9a196;
    --h-sky:#e3ecf1; --h-sky-2:#d3e0e8; --h-led:#f7883a;
  }
}

/* Base */
body{background-color:var(--op-page) !important;color:var(--op-text) !important;}
h1,h2,h3,h4,h5,h6,.entry-title,.entry-title a{color:var(--op-heading);}
a{color:var(--op-link);}
a:hover{color:var(--op-link-hover);}

/* Header */
.ct-header,.ct-header [data-row]{background-color:var(--op-header) !important;}
.ct-header{border-bottom:1px solid var(--op-header-border);}
.ct-header a,.ct-header .ct-menu-link{color:var(--op-header-text) !important;}
.ct-header a:hover,.ct-header .current-menu-item>a,.ct-header .current-menu-ancestor>a{color:var(--op-accent) !important;}
.ct-header .ct-icon{color:var(--op-header-icon);}

/* Submenu dropdowns: pin panel + text per theme */
.ct-header .sub-menu,
.ct-header [class*="animated-submenu"] > .sub-menu{background-color:var(--op-dropdown-bg) !important;}
.ct-header .sub-menu .ct-menu-link,.ct-header .sub-menu a{color:var(--op-dropdown-text) !important;}
.ct-header .sub-menu li:hover>.ct-menu-link,
.ct-header .sub-menu .current-menu-item>.ct-menu-link,
.ct-header .sub-menu .ct-menu-link:hover{color:var(--op-accent) !important;}

/* Site logo — painted over the Blocksy site title; day/night PNG swap.
   URLs are relative to this stylesheet (themes/blocksy-child/style.css). */
:root[data-theme="dark"],:root:not([data-theme]){--op-logo:url('brand/logo-lockup-horizontal.png');}
:root[data-theme="light"]{--op-logo:url('brand/logo-lockup-horizontal-light.png');}
@media (prefers-color-scheme: light){:root:not([data-theme]){--op-logo:url('brand/logo-lockup-horizontal-light.png');}}
.site-title-container .site-title{
  display:inline-block;width:210px;height:48px;max-width:60vw;
  background:left center/contain no-repeat var(--op-logo);
  overflow:hidden;text-indent:-9999px;white-space:nowrap;color:transparent !important;
}
.site-title-container .site-title a{display:block;width:100%;height:100%;text-indent:-9999px;color:transparent !important;}
@media (max-width:782px){.site-title-container .site-title{width:164px;height:38px;}}

/* Wider content for landscape print photos */
.ct-container{max-width:1240px !important;}
.entry-content.is-layout-constrained{--wp--style--global--content-size:940px;}
.entry-content img{border-radius:8px;}

/* Single post: bigger title, align title/meta with body column */
.hero-section.is-width-constrained{max-width:940px !important;}
.single .entry-header .page-title{font-size:clamp(2.25rem,4.5vw,3rem);line-height:1.15;}

/* Featured image at the top of single posts */
.op-featured-image{max-width:940px;margin:0 auto 1.8em;}
.op-featured-image img{display:block;width:100%;height:auto;border-radius:8px;}
@media (max-width:768px){.op-featured-image{padding:0 20px;}}

/* Breadcrumbs aligned with content */
.op-breadcrumbs{max-width:940px;margin:0 auto 1.6em;padding:0;color:var(--op-breadcrumb);}
@media (max-width:768px){.op-breadcrumbs{padding:0 20px;}}
.op-breadcrumbs a{color:var(--op-breadcrumb-link);text-decoration:none;}
.op-breadcrumbs a:hover{color:var(--op-accent);}

/* Post cards: surface, image-first */
.entry-card{
  display:flex;flex-direction:column;
  background:var(--op-surface) !important;
  border:1px solid var(--op-card-border);
  border-radius:12px;overflow:hidden;
  transition:border-color .15s ease;
}
.entry-card:hover{border-color:var(--op-card-hover-border);}
.entry-card .ct-media-container{order:-1;margin:0 0 1.1em;}
.entry-card .ct-media-container img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;}
.entry-card .entry-title a{color:var(--op-card-title);}
.entry-card .entry-excerpt{color:var(--op-card-excerpt);}
.entry-card .entry-meta,.entry-card .ct-meta-element-date,.entry-card .ct-meta-element-author,.entry-card .ct-meta-element-author a{color:var(--op-card-meta);}
.entry-card [class*="ct-term"] a{color:var(--op-accent);text-transform:uppercase;letter-spacing:.04em;font-size:.72rem;}

/* Hide author + date meta (keep categories) */
.meta-author,.meta-date{display:none !important;}

/* Buttons */
.wp-block-button__link,.ct-button{background-color:var(--op-btn);color:var(--op-btn-text) !important;border:none;font-weight:600;}
.wp-block-button__link:hover,.ct-button:hover{background-color:var(--op-btn-hover);}
.wp-block-button.is-style-outline .wp-block-button__link{
  background:transparent;color:var(--op-accent) !important;border:1.5px solid var(--op-accent);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover{background:var(--op-accent);color:var(--op-btn-text) !important;}

/* Footer */
.ct-footer,#footer{background-color:var(--op-footer) !important;color:var(--op-footer-text);border-top:1px solid var(--op-border);}
.ct-footer a{color:var(--op-footer-text);}
.ct-footer a:hover{color:var(--op-accent);}

/* ============================================================
   Homepage sections (built as a static front page)
   ============================================================ */
/* No Blocksy page-title hero on the static front page (the homepage speaks for itself) */
body.home .hero-section{display:none !important;}

.op-home-hero{
  background:linear-gradient(180deg,var(--op-surface-2),var(--op-page));
  border-bottom:1px solid var(--op-border);
}
.op-home-hero .op-hero-inner{
  max-width:1180px;margin:0 auto;padding:56px 24px 44px;
  display:grid;grid-template-columns:1.05fr 1fr;gap:40px;align-items:center;
}
.op-hero-copy h1{
  font-size:clamp(2.1rem,4.4vw,3.25rem);line-height:1.1;margin:0 0 .5em;color:var(--op-heading);
}
.op-hero-copy .op-hero-accent{color:var(--op-ember);}
.op-hero-copy p{font-size:1.12rem;line-height:1.6;color:var(--op-text);margin:0 0 1.5em;max-width:34em;}
.op-hero-cta{display:flex;gap:14px;flex-wrap:wrap;}
.op-btn{
  display:inline-block;padding:12px 22px;border-radius:8px;font-weight:600;text-decoration:none;
  background:var(--op-btn);color:var(--op-btn-text) !important;transition:background .15s;
}
.op-btn:hover{background:var(--op-btn-hover);}
.op-btn--ghost{background:transparent;color:var(--op-accent) !important;border:1.5px solid var(--op-accent);}
.op-btn--ghost:hover{background:var(--op-accent);color:var(--op-btn-text) !important;}
.op-hero-art{margin:0;}
.op-hero-art svg{display:block;width:100%;height:auto;max-width:520px;margin-left:auto;}
@media (max-width:860px){
  .op-home-hero .op-hero-inner{grid-template-columns:1fr;gap:24px;padding:36px 20px 28px;}
  .op-hero-art{order:-1;}
  .op-hero-art svg{margin:0 auto;max-width:420px;}
}

/* Section shell */
.op-section{max-width:1180px;margin:0 auto;padding:46px 24px;}
.op-section > h2{font-size:1.6rem;margin:0 0 .3em;color:var(--op-heading);}
.op-section > .op-section-sub{color:var(--op-muted);margin:0 0 1.6em;font-size:1rem;}

/* Pillar cards */
.op-pillars{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;}
@media (max-width:900px){.op-pillars{grid-template-columns:repeat(2,1fr);}}
@media (max-width:520px){.op-pillars{grid-template-columns:1fr;}}
.op-pillar{
  display:block;text-decoration:none;background:var(--op-surface);
  border:1px solid var(--op-card-border);border-radius:12px;padding:22px 20px;
  transition:border-color .15s,transform .15s;
}
.op-pillar:hover{border-color:var(--op-card-hover-border);transform:translateY(-2px);}
.op-pillar .op-pillar-ico{color:var(--op-heading);margin-bottom:10px;display:block;}
.op-pillar .op-pillar-ico svg{width:30px;height:30px;display:block;}
.op-pillar h3{margin:0 0 .35em;font-size:1.14rem;color:var(--op-heading);}
.op-pillar p{margin:0;font-size:.94rem;line-height:1.5;color:var(--op-card-excerpt);}

/* "Start here" band */
.op-starthere{background:var(--op-surface-2);border-top:1px solid var(--op-border);border-bottom:1px solid var(--op-border);}
.op-starthere .op-section{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;}
.op-starthere h2{margin:0 0 .2em;}
.op-starthere p{margin:0;color:var(--op-text);max-width:40em;}

/* Latest posts block on the homepage (auto-updates as posts publish) */
.op-latest{padding-top:0;}
.op-latest .wp-block-latest-posts{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:18px;}
@media (max-width:900px){.op-latest .wp-block-latest-posts{grid-template-columns:repeat(2,1fr);}}
@media (max-width:520px){.op-latest .wp-block-latest-posts{grid-template-columns:1fr;}}
.op-latest .wp-block-latest-posts li{background:var(--op-surface);border:1px solid var(--op-card-border);border-radius:12px;overflow:hidden;padding:0 0 16px;transition:border-color .15s;}
.op-latest .wp-block-latest-posts li:hover{border-color:var(--op-card-hover-border);}
.op-latest .wp-block-latest-posts__featured-image img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;margin-bottom:14px;}
.op-latest .wp-block-latest-posts__post-title{display:block;padding:0 16px;color:var(--op-card-title) !important;font-weight:600;font-size:1.05rem;line-height:1.3;text-decoration:none;}
.op-latest .wp-block-latest-posts__post-excerpt{padding:8px 16px 0;margin:0;color:var(--op-card-excerpt);font-size:.92rem;line-height:1.5;}
.op-latest .wp-block-latest-posts li > a:hover{color:var(--op-accent) !important;}

/* ============================================================
   Code blocks + copy button (theme-aware)
   ============================================================ */
.entry-content pre{
  position:relative;margin:0;overflow-x:auto;
  background:var(--op-surface-2);border:1px solid var(--op-border);border-radius:6px;
  padding:14px 16px;font-size:.9rem;line-height:1.5;color:var(--op-heading);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
}
.entry-content pre code{background:none;border:0;padding:0;color:inherit;white-space:pre;}
.entry-content :not(pre)>code{
  background:var(--op-surface-2);border:1px solid var(--op-border);border-radius:4px;
  padding:.1em .4em;font-size:.88em;color:var(--op-heading);
}
.entry-content .op-code{position:relative;margin:16px 0;}
.entry-content .op-code pre{margin:0;}
.op-copy-btn{
  position:absolute;top:8px;right:8px;z-index:2;
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;padding:0;border-radius:5px;cursor:pointer;line-height:0;
  color:var(--op-text);background:var(--op-surface);border:1px solid var(--op-border);
  opacity:.55;transition:opacity .15s,color .15s,border-color .15s;
}
.op-copy-btn svg{width:15px;height:15px;display:block;}
.entry-content .op-code:hover .op-copy-btn{opacity:1;}
.op-copy-btn:focus-visible{opacity:1;outline:2px solid var(--op-accent);outline-offset:2px;}
.op-copy-btn:hover{color:var(--op-accent);border-color:var(--op-accent);}
.op-copy-btn.op-copied{opacity:1;color:var(--op-accent);border-color:var(--op-accent);}

/* Editorial draft notes */
.entry-content .op-note{
  background:var(--op-surface-2);border:1px solid var(--op-border);
  border-left:4px solid var(--op-ember);border-radius:4px;
  padding:10px 14px;margin:16px 0;color:var(--op-text);
}
.entry-content .op-note strong{color:var(--op-heading);}
