/*
Theme Name: Memberoni — Justin Derrico
Theme URI: https://justin-derrico.com
Description: Justin Derrico's member area. A child of the Memberoni parent theme in Justin's brand — dark, fire gradient, Big Shoulders Display over Archivo. Follows the TGW MVP pattern: this theme supplies the shell (header, footer, nav, account chip) and the brand variables that restyle the parent's templates and the GV Members screens. Parent templates are left to render content, so Memberoni stays upgradeable.
Author: Luke Lewis
Template: memberoni
Version: 0.4.0
License: GPL-2.0-or-later
Text Domain: memberoni-jd
*/

/* -----------------------------------------------------------------------------
   Brand tokens. Everything downstream — the parent theme, GV Members, WooCommerce
   — is restyled by these, so a change here moves the whole member area.
   Mirrors justin-derrico-site/site.css so the public pages and the member area
   cannot drift apart.
----------------------------------------------------------------------------- */
:root{
  --jd-ink:#090706;
  --jd-coal:#12100e;
  --jd-card:#15120f;
  --jd-line:rgba(243,236,224,.13);
  --jd-bone:#f3ece0;
  --jd-text:#e8e2d9;
  --jd-ash:#9d958a;
  --jd-flame:#ff5a1f;
  --jd-fire:linear-gradient(100deg,#ff3b12 0%,#ff7a1a 48%,#ffc24a 100%);
  --jd-display:"Big Shoulders Display","Impact",sans-serif;
  --jd-body:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --jd-head-h:74px;
  /* Text that sits ON the fire gradient. Dark in BOTH palettes: in light
     mode --jd-ink is near-white, which would be unreadable on orange. */
  --jd-on-fire:#1a0d05;

  /* Hand the same palette to the GV Members screens. */
  --gvm-ink:var(--jd-ink);
  --gvm-card:var(--jd-card);
  --gvm-line:var(--jd-line);
  --gvm-text:var(--jd-text);
  --gvm-dim:var(--jd-ash);
  --gvm-accent:var(--jd-flame);
  --gvm-accent-grad:var(--jd-fire);
  --gvm-on-accent:var(--jd-on-fire);
  --gvm-display:var(--jd-display);
  --gvm-radius:3px;
}

html,body{background:var(--jd-ink);color:var(--jd-text)}
body{font-family:var(--jd-body);font-size:1.0625rem;line-height:1.65;-webkit-font-smoothing:antialiased}
::selection{background:var(--jd-flame);color:var(--jd-ink)}
a{color:var(--jd-bone)}
h1,h2,h3,h4,.entry-title,.course_title{font-family:var(--jd-display);font-weight:900;text-transform:uppercase;color:var(--jd-bone);letter-spacing:.005em}

/* -----------------------------------------------------------------------------
   The shell
----------------------------------------------------------------------------- */
.jd-head{position:sticky;top:0;z-index:120;background:var(--jd-ink);border-bottom:1px solid var(--jd-line)}
.jd-head-in{display:flex;align-items:center;gap:1.4rem;max-width:1320px;margin:0 auto;padding:0 clamp(16px,3vw,34px);height:var(--jd-head-h)}
.jd-brand{display:flex;align-items:center;gap:.7rem;text-decoration:none;color:var(--jd-bone);margin-right:auto}
.jd-brand .mark{width:26px;height:30px;display:block}
.jd-brand-name{font-family:var(--jd-display);font-weight:900;font-size:1.4rem;letter-spacing:.06em;text-transform:uppercase;line-height:1}
.jd-nav{display:flex;align-items:center;gap:1.5rem;list-style:none;margin:0;padding:0}
.jd-nav a{position:relative;color:var(--jd-ash);text-decoration:none;font-size:.82rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;padding:6px 0}
.jd-nav a:hover,.jd-nav .current-menu-item>a{color:var(--jd-bone)}
.jd-nav a::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--jd-fire);transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.jd-nav a:hover::after,.jd-nav .current-menu-item>a::after{transform:scaleX(1)}

.jd-chip{display:flex;align-items:center;gap:.55rem;padding:.5rem .85rem;border-radius:99px;background:rgba(243,236,224,.07);box-shadow:inset 0 0 0 1px var(--jd-line);color:var(--jd-bone);text-decoration:none;font-size:.82rem;font-weight:700;letter-spacing:.06em}
.jd-chip:hover{background:rgba(243,236,224,.12)}
.jd-chip-av{width:24px;height:24px;border-radius:50%;background:var(--jd-fire);color:var(--jd-on-fire);display:grid;place-items:center;font-family:var(--jd-display);font-size:.8rem;font-weight:900}
.jd-cta{display:inline-flex;align-items:center;padding:.72rem 1.1rem;background:var(--jd-fire);color:var(--jd-on-fire);text-decoration:none;font-weight:800;font-size:.8rem;letter-spacing:.14em;text-transform:uppercase;line-height:1}

.jd-iconbtn{width:38px;height:38px;border-radius:50%;border:1px solid var(--jd-line);background:none;display:grid;place-items:center;color:var(--jd-ash);cursor:pointer;flex:none}
.jd-iconbtn:hover{color:var(--jd-bone);border-color:var(--jd-line2)}
/* One button, two glyphs: show the palette you would switch TO. */
.jd-iconbtn .ic-moon{display:none}
html[data-theme="light"] .jd-iconbtn .ic-sun{display:none}
html[data-theme="light"] .jd-iconbtn .ic-moon{display:block}
@media (prefers-color-scheme:light){
  :root:not([data-theme]) .jd-iconbtn .ic-sun{display:none}
  :root:not([data-theme]) .jd-iconbtn .ic-moon{display:block}
}

.jd-burger{display:none;background:none;border:0;width:44px;height:44px;padding:10px;cursor:pointer}
.jd-burger span{display:block;height:2px;background:var(--jd-bone);margin:5px 0}

.jd-foot{border-top:1px solid var(--jd-line);margin-top:clamp(40px,6vw,90px);padding:clamp(28px,4vw,46px) clamp(16px,3vw,34px)}
.jd-foot-in{max-width:1320px;margin:0 auto;display:flex;flex-wrap:wrap;gap:1.2rem;align-items:center;justify-content:space-between;color:var(--jd-ash);font-size:.86rem}
.jd-foot a{color:var(--jd-ash);text-decoration:none}
.jd-foot a:hover{color:var(--jd-bone)}

@media (max-width:900px){
  .jd-nav{position:fixed;inset:var(--jd-head-h) 0 auto;flex-direction:column;align-items:flex-start;gap:0;background:var(--jd-ink);border-bottom:1px solid var(--jd-line);padding:8px 0;display:none}
  .jd-nav.open{display:flex}
  .jd-nav li{width:100%}
  .jd-nav a{display:block;padding:.95rem clamp(16px,3vw,34px);font-size:.95rem}
  .jd-burger{display:block}
  .jd-cta{display:none}
}

/* -----------------------------------------------------------------------------
   Memberoni surfaces — restyled through the parent's own classes
----------------------------------------------------------------------------- */
.content-grid .grid-item,.course_lesson_list li,.memberoni-card{background:var(--jd-card);border:1px solid var(--jd-line);border-radius:3px}
.course_lesson_list{list-style:none;padding:0}
.course_lesson_list li{margin:0 0 8px}
.course_lesson_list li a{display:flex;align-items:center;gap:.8rem;padding:.9rem 1.1rem;color:var(--jd-text);text-decoration:none}
.course_lesson_list li a:hover{background:rgba(243,236,224,.05)}
.lesson_length{margin-left:auto;color:var(--jd-ash);font-size:.82rem}

/* The parent's locked card, in Justin's brand. */
.protected_content,.memberoni-protected{background:var(--jd-card);border:1px solid var(--jd-line);border-left:3px solid var(--jd-flame);padding:clamp(20px,3vw,34px);border-radius:3px}

/* WooCommerce, lightly. */
.woocommerce-page .button,.woocommerce a.button,.woocommerce button.button.alt{
  background:var(--jd-fire)!important;color:var(--jd-on-fire)!important;border-radius:3px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.woocommerce ul.products li.product{background:var(--jd-card);border:1px solid var(--jd-line);border-radius:3px;padding:14px}
.woocommerce .price{color:var(--jd-bone)}

.jd-wrap{max-width:1320px;margin:0 auto;padding:clamp(28px,4vw,54px) clamp(16px,3vw,34px)}
.jd-skip{position:absolute;left:-9999px}
.jd-skip:focus{left:8px;top:8px;z-index:200;background:var(--jd-bone);color:var(--jd-ink);padding:.6rem 1rem}

/* -----------------------------------------------------------------------------
   Parent surfaces that ship light.
   Found by scanning the rendered member pages for backgrounds brighter than
   mid-grey, not by guessing: on Memberoni 2.0.4 it is exactly these two.
   Re-run that scan after a parent update.
----------------------------------------------------------------------------- */
.jd-theme header.page_title{background:var(--jd-ink);border-bottom:1px solid var(--jd-line);padding:clamp(26px,4vw,46px) 0}
.jd-theme header.page_title h1{font-family:var(--jd-display);font-weight:900;text-transform:uppercase;color:var(--jd-bone);font-size:clamp(1.9rem,4vw,3rem);line-height:1}
.jd-theme header.page_title .breadcrumbs,.jd-theme header.page_title a{color:var(--jd-ash)}
.jd-theme section.inner.oh,.jd-theme .content_area,.jd-theme .site-content{background:transparent}

/* The parent's own body copy inside course and lesson pages. */
.jd-theme .entry-content,.jd-theme .course_content{color:var(--jd-text)}
.jd-theme .entry-content a{color:var(--jd-flame)}

/* -----------------------------------------------------------------------------
   Light mode

   Dark is the default. Light arrives two ways and they must not fight:
     html[data-theme="light"]      an explicit choice, remembered in
                                   localStorage and applied before first paint
                                   by jd_theme_boot() so the page never flashes
     prefers-color-scheme: light   no choice made yet — follow the device, but
                                   only while :root carries no data-theme

   Both selectors out-specify the plain :root blocks in this file and in
   assets/jd-course.css, which is why the course page follows without that
   stylesheet needing a light block of its own.

   The two blocks below are the same declarations twice. They have to be: a
   media query cannot be merged into a plain selector. Change one, change both.
----------------------------------------------------------------------------- */
@media (prefers-color-scheme:light){
  :root:not([data-theme]){
  /* Paper, not a washed-out dark theme: warm bone-white, the same family as the
     brand's --jd-bone, so the member area reads as one site in either palette. */
  --jd-ink:#faf7f2;
  --jd-coal:#f3eee5;
  --jd-card:#ffffff;
  --jd-panel:#ffffff;
  --jd-panel2:#f5efe6;
  --jd-row:#ffffff;
  --jd-row2:#faf7f2;
  --jd-line:rgba(26,13,5,.12);
  --jd-line2:rgba(26,13,5,.2);
  --jd-bone:#17120e;
  --jd-text:#3a332c;
  --jd-ash:#6b6257;
  /* Measured, not picked: #8a8077 put the sidebar runtimes at 3.9:1 on white. */
  --jd-dim:#786e63;
  --jd-ck-ring:#d3cabd;
  --jd-num:#c2b7a8;
  --jd-hover:#f0e9de;
  --jd-faint:rgba(26,13,5,.09);
  --jd-faint2:rgba(26,13,5,.045);
  --jd-shadow:0 18px 50px rgba(26,13,5,.12);
  /* The flame has to work as INK here, not just as a fill: the dark theme's
     #ff5a1f on white is about 2.9:1, under the 4.5:1 text minimum, and the
     gold end of the button gradient all but vanishes. Buttons keep the bright
     gradient (dark text on it), text and borders get the deeper one. */
  --jd-flame:#c8400c;
  --jd-ember:#c04a08;
  --jd-gold:#8a6508;
  --jd-fire-ink:linear-gradient(100deg,#c62f08 0%,#cf5a0c 48%,#b07a07 100%);
  }
}
html[data-theme="light"]{
  /* Paper, not a washed-out dark theme: warm bone-white, the same family as the
     brand's --jd-bone, so the member area reads as one site in either palette. */
  --jd-ink:#faf7f2;
  --jd-coal:#f3eee5;
  --jd-card:#ffffff;
  --jd-panel:#ffffff;
  --jd-panel2:#f5efe6;
  --jd-row:#ffffff;
  --jd-row2:#faf7f2;
  --jd-line:rgba(26,13,5,.12);
  --jd-line2:rgba(26,13,5,.2);
  --jd-bone:#17120e;
  --jd-text:#3a332c;
  --jd-ash:#6b6257;
  /* Measured, not picked: #8a8077 put the sidebar runtimes at 3.9:1 on white. */
  --jd-dim:#786e63;
  --jd-ck-ring:#d3cabd;
  --jd-num:#c2b7a8;
  --jd-hover:#f0e9de;
  --jd-faint:rgba(26,13,5,.09);
  --jd-faint2:rgba(26,13,5,.045);
  --jd-shadow:0 18px 50px rgba(26,13,5,.12);
  /* The flame has to work as INK here, not just as a fill: the dark theme's
     #ff5a1f on white is about 2.9:1, under the 4.5:1 text minimum, and the
     gold end of the button gradient all but vanishes. Buttons keep the bright
     gradient (dark text on it), text and borders get the deeper one. */
  --jd-flame:#c8400c;
  --jd-ember:#c04a08;
  --jd-gold:#8a6508;
  --jd-fire-ink:linear-gradient(100deg,#c62f08 0%,#cf5a0c 48%,#b07a07 100%);
}

/* The account chip's wash is a light-on-dark tint; it has to flip. */
@media (prefers-color-scheme:light){
  :root:not([data-theme]) .jd-chip{background:rgba(26,13,5,.05)}
  :root:not([data-theme]) .jd-chip:hover{background:rgba(26,13,5,.09)}
}
html[data-theme="light"] .jd-chip{background:rgba(26,13,5,.05)}
html[data-theme="light"] .jd-chip:hover{background:rgba(26,13,5,.09)}

/* The parent's two light surfaces need no override in light mode; the dark
   overrides at the top of this file would make them black, so release them. */
@media (prefers-color-scheme:light){
  :root:not([data-theme]) .jd-theme header.page_title{background:var(--jd-coal)}
}
html[data-theme="light"] .jd-theme header.page_title{background:var(--jd-coal)}
