/*
Theme Name: Randomly Jiva
Theme URI: https://randomlyjiva.com/
Author: Randomly Jiva - TiaKari Enterprises
Description: Custom standalone theme for RandomlyJiva.com and its branded sections.
Version: 0.6.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: randomlyjiva
*/

:root {
  --rj-black: #101010;
  --rj-charcoal: #1a1a1a;
  --rj-snow: #f8f8f5;
  --rj-white: #ffffff;
  --rj-gray: #8f8f8f;
  --rj-line: rgba(255,255,255,.13);
  --rj-blue: #1686d9;
  --rj-purple: #6a35a5;
  --rj-lavender: #a58bd4;
  --rj-max: 1380px;
  --rj-pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rj-snow);
  color: #151515;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

/* Shared interior shell — XStore Dark-inspired structure */
.rj-site-header {
  background: var(--rj-black);
  color: var(--rj-white);
  border-bottom: 1px solid var(--rj-line);
}
.rj-masthead {
  min-height: 112px;
  max-width: var(--rj-max);
  margin: 0 auto;
  padding: 20px var(--rj-pad);
  display: grid;
  grid-template-columns: minmax(180px,1fr) minmax(260px,auto) minmax(180px,1fr);
  align-items: center;
  gap: 28px;
}
.rj-header-left { justify-self: start; min-width: 0; }
.rj-parent-brand, .rj-main-brand { display: inline-flex; align-items:center; text-decoration:none; }
.rj-parent-brand img { max-height: 48px; width:auto; display:block; }
.rj-main-brand img { max-height: 70px; width:auto; display:block; margin:0 auto; }
.rj-parent-brand .rj-wordmark-fallback { font-size: 18px; font-weight:800; letter-spacing:-.03em; }
.rj-main-brand .rj-wordmark-fallback { font-size: clamp(26px,3vw,44px); font-weight:800; letter-spacing:-.04em; }
.rj-header-balance { display:block; width:150px; height:1px; }
.rj-section-brand { text-align:center; justify-self:center; min-width:0; }
.rj-section-brand img { max-height:72px; max-width:min(420px,42vw); width:auto; display:block; margin:0 auto; }
.rj-section-brand__text { font-size:clamp(26px,3vw,44px); font-weight:800; letter-spacing:-.04em; white-space:nowrap; }
.rj-header-tools { justify-self:end; display:flex; align-items:center; gap:4px; }
.rj-header-tool {
  position:relative; width:42px; height:42px; border:0; border-radius:0;
  background:transparent; color:inherit; cursor:pointer;
  display:grid; place-items:center; text-decoration:none; opacity:.88;
}
.rj-header-tool:hover, .rj-header-tool:focus-visible { opacity:1; background:rgba(255,255,255,.065); outline:none; }
.rj-header-tool svg { width:20px; height:20px; }
.rj-cart-count {
  position:absolute; top:4px; right:2px; min-width:16px; height:16px; padding:0 4px;
  display:grid; place-items:center; border-radius:999px; background:var(--rj-accent,#fff);
  color:#fff; font-size:9px; font-weight:800; line-height:1;
}
body:not(.rj-section-unholy-geek):not(.rj-section-tiakari):not(.rj-section-jivafang) .rj-cart-count { background:#fff; color:#111; }
.rj-search-panel {
  max-height:0; overflow:hidden; opacity:0;
  background:var(--rj-black); color:var(--rj-white);
  transition:max-height .25s ease, opacity .2s ease;
  border-top:1px solid transparent;
}
.rj-search-panel.is-open { max-height:110px; opacity:1; border-top-color:var(--rj-line); }
.rj-search-panel__inner { max-width:var(--rj-max); margin:0 auto; padding:14px var(--rj-pad) 20px; }
.rj-search-form { display:flex; gap:10px; max-width:760px; margin:0 auto; }
.rj-search-form input[type="search"] {
  flex:1; min-width:0; border:0; border-bottom:1px solid rgba(255,255,255,.52);
  background:transparent; color:white; padding:12px 2px; outline:none;
}
.rj-search-form button { border:1px solid rgba(255,255,255,.25); background:transparent; color:white; padding:10px 16px; cursor:pointer; }
.rj-primary-nav { border-top:1px solid var(--rj-line); }
.rj-primary-nav__inner { max-width:var(--rj-max); margin:0 auto; padding:0 var(--rj-pad); }
.rj-primary-nav ul { margin:0; padding:0; list-style:none; display:flex; justify-content:center; gap:clamp(24px,4vw,60px); }
.rj-primary-nav a { display:block; padding:16px 0 15px; text-decoration:none; text-transform:uppercase; font-size:12px; font-weight:700; letter-spacing:.13em; opacity:.82; }
.rj-primary-nav a:hover, .rj-primary-nav .current-menu-item > a { opacity:1; }

/* Section accents */
body.rj-section-unholy-geek { --rj-accent: var(--rj-blue); }
body.rj-section-tiakari { --rj-accent: var(--rj-purple); }
body.rj-section-jivafang { --rj-accent: var(--rj-lavender); }
body:not(.rj-section-unholy-geek):not(.rj-section-tiakari):not(.rj-section-jivafang) { --rj-accent: #111111; }
.rj-accent-line { height: 3px; background: var(--rj-accent); }
.rj-content a:not(.button):not(.wp-block-button__link) { text-decoration-color: var(--rj-accent); text-underline-offset: 3px; }

.rj-content { max-width: var(--rj-max); margin: 0 auto; padding: clamp(44px, 7vw, 90px) var(--rj-pad); }
.rj-page-title { font-size: clamp(42px, 7vw, 92px); margin: 0 0 28px; line-height: .92; letter-spacing: -.055em; }

/* Footer */
.rj-footer-widgets { background: var(--rj-charcoal); color: white; border-top: 3px solid var(--rj-accent); }
.rj-footer-widgets__inner { max-width: var(--rj-max); margin: 0 auto; padding: 46px var(--rj-pad); display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 32px; }
.rj-footer-widgets .widget { margin: 0; }
.rj-footer-widgets h2, .rj-footer-widgets h3 { margin-top: 0; }
.rj-site-footer { background: var(--rj-black); color: rgba(255,255,255,.72); }
.rj-site-footer__inner { max-width: var(--rj-max); margin: 0 auto; padding: 19px var(--rj-pad); display: flex; justify-content: space-between; gap: 18px; align-items: center; font-size: 12px; }

/* Gateway/front page */
body.home { background: var(--rj-black); }
.rj-gateway { min-height: 100svh; background: var(--rj-black); color: white; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; }
.rj-gateway-header { border-bottom: 1px solid var(--rj-line); }
.rj-gateway-header__inner { max-width: var(--rj-max); margin: 0 auto; padding: 20px var(--rj-pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rj-gateway-brand img { max-height: 62px; width: auto; display: block; }
.rj-gateway-brand .rj-wordmark-fallback { font-weight: 800; }
.rj-gateway-menu ul { margin: 0; padding: 0; display: flex; gap: clamp(18px,3vw,40px); list-style: none; }
.rj-gateway-menu a { color: white; text-decoration: none; font-size: 12px; letter-spacing: .12em; font-weight: 700; text-transform: uppercase; opacity: .78; }
.rj-logo-rail { border-bottom: 1px solid rgba(255,255,255,.04); }
.rj-logo-rail__inner { max-width: var(--rj-max); margin: 0 auto; padding: 15px var(--rj-pad) 20px; display: flex; justify-content: center; gap: clamp(22px, 4vw, 54px); overflow-x: auto; scrollbar-width: thin; }
.rj-logo-rail button { flex: 0 0 auto; appearance: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: rgba(255,255,255,.48); padding: 8px 0 6px; font-weight: 800; cursor: pointer; }
.rj-logo-rail button:hover, .rj-logo-rail button.is-active { color: white; border-bottom-color: white; }

.rj-hero-shell { position: relative; min-height: 0; background: var(--rj-snow); color: #111; overflow: hidden; }
.rj-hero-edge { position: absolute; left: 0; width: 100%; height: clamp(70px,10vw,145px); z-index: 8; pointer-events: none; background-repeat: repeat-x; background-size: auto 100%; }
.rj-hero-edge--top { top: -2px; background-image: url('assets/img/grunge-edge-top.png'); background-position: center top; }
.rj-hero-edge--bottom { bottom: -2px; background-image: url('assets/img/grunge-edge-bottom.png'); background-position: center bottom; }
.rj-hero-stage { position: relative; min-height: clamp(420px, 56vh, 650px); height: 100%; }
.rj-hero-panel { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: clamp(34px,7vw,100px); align-items: stretch; padding: clamp(90px,10vw,150px) var(--rj-pad); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .32s ease, transform .32s ease, visibility 0s linear .32s; pointer-events: none; }
.rj-hero-panel.is-active { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; pointer-events: auto; }
.rj-hero-art, .rj-hero-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.rj-hero-art { align-items: center; text-align: center; }
.rj-hero-art__fallback { font-size: clamp(42px,6vw,88px); line-height: .9; font-weight: 900; letter-spacing: -.065em; }
.rj-hero-copy { align-items: flex-start; max-width: 820px; }
.rj-kicker { margin: 0 0 16px; text-transform: uppercase; letter-spacing: .24em; font-size: 11px; color: #777; }
.rj-hero-title { margin: 0; font-size: clamp(44px,6vw,86px); line-height: .9; letter-spacing: -.06em; text-wrap: balance; }
.rj-hero-description { margin: 22px 0 0; font-size: clamp(16px,1.6vw,22px); max-width: 690px; }
.rj-hero-meta { margin: 18px 0 0; text-transform: uppercase; letter-spacing: .14em; font-size: 11px; color: #777; }
.rj-hero-cta { display: inline-flex; margin-top: 25px; font-weight: 800; text-decoration: none; border-bottom: 2px solid #111; padding-bottom: 2px; }
.rj-gateway-footer { text-align: center; padding: 15px var(--rj-pad); font-size: 11px; color: rgba(255,255,255,.75); }

/* Shop */
.rj-shop-hero { min-height: 250px; background: var(--rj-charcoal); color: white; display: flex; align-items: center; }
.rj-shop-hero__inner { width: 100%; max-width: var(--rj-max); margin: 0 auto; padding: 38px var(--rj-pad); }
.rj-shop-hero h1 { margin: 0; font-size: clamp(48px,7vw,86px); line-height: .9; letter-spacing: -.055em; }
.rj-shop-hero p { max-width: 640px; margin: 16px 0 0; color: rgba(255,255,255,.68); }
.rj-shop-bands { max-width: var(--rj-max); margin: 0 auto; padding: 44px var(--rj-pad) 0; }
.rj-band { margin-bottom: 46px; }
.rj-band__head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.rj-band__head h2 { margin: 0; font-size: clamp(24px,3vw,38px); letter-spacing: -.04em; }
.rj-category-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; }
.rj-category-card { min-height: 130px; background: #e9e9e5; position: relative; overflow: hidden; text-decoration: none; display: flex; align-items: end; padding: 17px; font-weight: 800; }
.rj-category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.rj-category-card::after { content: ''; position:absolute; inset:0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 65%); z-index:1; }
.rj-category-card span { position: relative; z-index:2; color:white; }
.rj-featured-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; }
.rj-shop-layout { max-width: var(--rj-max); margin: 0 auto; padding: 0 var(--rj-pad) 70px; display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 40px; align-items: start; }
.rj-shop-main .products { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 30px 18px; }
.rj-shop-main .products::before, .rj-shop-main .products::after { display:none !important; }
.rj-shop-main .products li.product { width: auto !important; float: none !important; margin: 0 !important; }
.rj-shop-sidebar { border-left: 1px solid #d8d8d4; padding-left: 26px; position: sticky; top: 24px; }
.rj-shop-sidebar .widget { margin-bottom: 30px; }
.rj-shop-sidebar .widget-title { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }

/* Product */
.single-product .product { max-width: var(--rj-max); margin: 0 auto !important; padding: 58px var(--rj-pad) 24px; }
.single-product div.product .woocommerce-product-gallery { width: 54%; }
.single-product div.product .summary { width: 41%; }
.rj-product-meta-block { border-top: 1px solid #d7d7d2; border-bottom: 1px solid #d7d7d2; padding: 16px 0; margin: 22px 0; font-size: 13px; }
.rj-product-additional { margin-top: 24px; }
.rj-product-additional h3 { margin-bottom: 12px; }
.rj-product-additional table { width: 100%; border-collapse: collapse; }
.rj-product-additional th, .rj-product-additional td { text-align: left; vertical-align: top; padding: 8px 0; border-bottom: 1px solid #e1e1dd; font-size: 13px; }
.rj-product-info-grid { max-width: var(--rj-max); margin: 36px auto 72px; padding: 0 var(--rj-pad); display: grid; grid-template-columns: repeat(var(--rj-info-cols, 1),minmax(0,1fr)); gap: clamp(22px,3vw,42px); }
.rj-product-info-panel { border-top: 2px solid #151515; padding-top: 16px; }
.rj-product-info-panel h3 { margin: 0 0 12px; font-size: 20px; }
.rj-product-info-panel p:first-child { margin-top: 0; }
.woocommerce-tabs { display:none !important; }

/* Portfolio template placeholder/plugin-ready */
.rj-portfolio-shell { max-width: var(--rj-max); margin: 0 auto; padding: 54px var(--rj-pad) 80px; }
.rj-portfolio-viewer { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,34%); align-items: center; min-height: 560px; }
.rj-portfolio-image { min-height: 520px; background: #ddd; overflow:hidden; }
.rj-portfolio-image img { width:100%; height:100%; object-fit:cover; }
.rj-portfolio-card { margin-left: -90px; background: rgba(248,248,245,.9); backdrop-filter: blur(9px); padding: clamp(28px,4vw,56px); position: relative; z-index:2; box-shadow: 0 18px 45px rgba(0,0,0,.11); }
.rj-portfolio-card h2 { font-size: clamp(34px,4vw,56px); line-height: .95; margin:0 0 18px; letter-spacing:-.05em; }
.rj-portfolio-thumbs { display:flex; gap:10px; overflow-x:auto; padding-top:18px; min-height:75px; }
.rj-portfolio-thumb { width:92px; height:62px; flex:0 0 auto; border:2px solid transparent; padding:0; background:#ddd; cursor:pointer; }
.rj-portfolio-thumb.is-active { border-color:#111; }
.rj-portfolio-thumb img { width:100%; height:100%; object-fit:cover; }

@media (max-width: 1000px) {
  .rj-category-grid { grid-template-columns: repeat(3,1fr); }
  .rj-featured-grid, .rj-shop-main .products { grid-template-columns: repeat(2,1fr) !important; }
  .rj-shop-layout { grid-template-columns: 1fr 220px; }
  .rj-hero-panel { grid-template-columns: 1fr 1.7fr; }
}
@media (max-width: 760px) {
  .rj-masthead { grid-template-columns: 1fr auto; min-height:auto; gap:14px; padding-top:16px; padding-bottom:16px; }
  .rj-header-left { grid-column:1; grid-row:1; }
  .rj-header-tools { grid-column:2; grid-row:1; }
  .rj-section-brand { grid-column:1 / -1; grid-row:2; padding-top:4px; }
  .rj-section-brand img { max-width:min(88vw,420px); }
  .rj-header-balance { display:none; }
  .rj-primary-nav__inner { overflow-x:auto; }
  .rj-primary-nav ul { justify-content:flex-start; width:max-content; }
  .rj-site-footer__inner { flex-direction:column; align-items:flex-start; }
  .rj-gateway-header__inner { flex-direction:column; align-items:flex-start; }
  .rj-gateway-menu { width:100%; overflow-x:auto; }
  .rj-gateway-menu ul { width:max-content; }
  .rj-hero-stage { min-height: 700px; }
  .rj-hero-panel { grid-template-columns:1fr; gap:20px; align-content:center; padding-top:120px; padding-bottom:120px; }
  .rj-hero-art, .rj-hero-copy { justify-content:flex-start; }
  .rj-hero-art { min-height:150px; }
  .rj-shop-layout { grid-template-columns:1fr; }
  .rj-shop-sidebar { border-left:0; border-top:1px solid #d8d8d4; padding:28px 0 0; position:static; }
  .rj-category-grid { grid-template-columns:repeat(2,1fr); }
  .single-product div.product .woocommerce-product-gallery, .single-product div.product .summary { width:100%; float:none; }
  .rj-portfolio-viewer { grid-template-columns:1fr; }
  .rj-portfolio-card { margin:-50px 18px 0; }
}
@media (max-width: 480px) {
  .rj-category-grid, .rj-featured-grid, .rj-shop-main .products { grid-template-columns:1fr !important; }
  .rj-search-form { flex-direction:column; }
}


/* Reusable identity landing page: optional banner -> 2/3 About + 1/3 Explore -> modules */
.rj-identity-page { --rj-identity-accent: var(--rj-accent); }
.rj-identity-banner { width:100%; background:var(--rj-black); overflow:hidden; }
.rj-identity-banner img { display:block; width:100%; height:clamp(220px,30vw,420px); object-fit:cover; }
.rj-identity-intro { max-width:var(--rj-max); margin:0 auto; padding:clamp(48px,7vw,90px) var(--rj-pad); display:grid; grid-template-columns:minmax(0,2fr) minmax(260px,1fr); gap:clamp(42px,6vw,90px); align-items:start; }
.rj-identity-about h1, .rj-identity-explore h2 { margin-top:0; letter-spacing:-.045em; }
.rj-identity-about h1 { font-size:clamp(38px,5vw,68px); line-height:.95; margin-bottom:24px; }
.rj-identity-about__logo { float:left; width:min(34%,260px); max-height:190px; object-fit:contain; object-position:left top; margin:4px clamp(22px,3vw,38px) 18px 0; }
.rj-identity-about__copy { font-size:clamp(16px,1.35vw,20px); }
.rj-identity-about__copy::after { content:''; display:block; clear:both; }
.rj-identity-about__copy > :first-child { margin-top:0; }
.rj-identity-explore { border-left:2px solid var(--rj-accent); padding-left:clamp(22px,3vw,38px); }
.rj-identity-explore h2 { font-size:clamp(25px,3vw,38px); line-height:1; margin-bottom:20px; }
.rj-identity-links { list-style:none; margin:0; padding:0; }
.rj-identity-links li { border-top:1px solid #d9d9d4; }
.rj-identity-links li:last-child { border-bottom:1px solid #d9d9d4; }
.rj-identity-links a { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:15px 2px; text-decoration:none; font-weight:700; }
.rj-identity-links a::after { content:'↗'; color:var(--rj-accent); font-size:1.1em; }
.rj-identity-links a:hover { color:var(--rj-accent); }
.rj-identity-portfolio { background:var(--rj-black); color:white; padding:clamp(44px,6vw,72px) 0; overflow:hidden; }
.rj-identity-portfolio__head { max-width:var(--rj-max); margin:0 auto 24px; padding:0 var(--rj-pad); display:flex; justify-content:space-between; align-items:end; gap:20px; }
.rj-identity-portfolio__head h2 { margin:0; font-size:clamp(32px,4.5vw,60px); letter-spacing:-.05em; line-height:.95; }
.rj-identity-portfolio__head span { color:var(--rj-accent); font-size:12px; text-transform:uppercase; letter-spacing:.14em; font-weight:800; }
.rj-identity-marquee { display:flex; width:max-content; animation:rjIdentityMarquee 42s linear infinite; }
.rj-identity-marquee:hover { animation-play-state:paused; }
.rj-identity-marquee__group { display:flex; gap:18px; padding-right:18px; }
.rj-identity-project { width:clamp(240px,27vw,390px); flex:0 0 auto; text-decoration:none; color:white; }
.rj-identity-project__image { aspect-ratio:4/3; background:#292929; overflow:hidden; }
.rj-identity-project__image img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .35s ease; }
.rj-identity-project:hover img { transform:scale(1.025); }
.rj-identity-project h3 { margin:12px 0 0; font-size:18px; }
.rj-identity-project p { margin:5px 0 0; color:rgba(255,255,255,.62); font-size:13px; }
.rj-identity-page-content { max-width:var(--rj-max); margin:0 auto; padding:clamp(48px,7vw,90px) var(--rj-pad); }
@keyframes rjIdentityMarquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@media (prefers-reduced-motion: reduce) { .rj-identity-marquee { animation:none; max-width:100vw; overflow-x:auto; } }

@media (max-width:760px) {
  .rj-identity-intro { grid-template-columns:1fr; }
  .rj-identity-explore { border-left:0; border-top:2px solid var(--rj-accent); padding:24px 0 0; }
  .rj-identity-about__logo { width:min(42vw,190px); }
}
