/*
 Theme Name: Japan Hacks Guide
 Theme URI: https://japanhacksguide.com
 Description: Custom child theme for Japan Hacks Guide - Japanese-inspired travel blog
 Author: Japan Hacks Guide
 Template: astra
 Version: 1.1.0
 Text Domain: japanhacks
*/

/* === CSS Variables === */
:root {
  --jh-ink: #1A1A2E;
  --jh-ink-light: #2A2A3E;
  --jh-gold: #C5A572;
  --jh-gold-light: #D4BB8A;
  --jh-red: #8B2252;
  --jh-washi: #FAF6F0;
  --jh-text: #2D2D2D;
  --jh-text-light: #E8E0D4;
}

/* === Hide stray WP/Astra elements === */
.custom-logo-link,
.custom-logo,
.site-logo-img,
.wp-block-site-logo,
.ast-site-identity,
.site-branding,
.ast-custom-logo,
#ast-scroll-top {
  display: none !important;
}

/* ============================================================
   CLOUD LAYER SYSTEM
   - .jh-cloud is always position:absolute or relative
   - High z-index = foreground (overlaps content for 3D depth)
   - data-speed on each element drives parallax in JS
   ============================================================ */
.jh-cloud {
  --cloud-y: 0px;
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
  will-change: transform;
}

.jh-cloud img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero bottom cloud — sits at very bottom, overlaps scroll indicator */
.jh-cloud--hero-bottom {
  bottom: -30px;
  z-index: 25;
  opacity: 0.7;
  transform: translateY(var(--cloud-y));
}

/* Reveal top cloud — hangs from top, overlaps into hero/reveal boundary */
.jh-cloud--reveal-top {
  top: -60px;
  z-index: 50;
  opacity: 0.55;
  transform: scaleY(-1) translateY(var(--cloud-y));
}

/* Reveal bottom cloud — sits at bottom, bleeds into transition */
.jh-cloud--reveal-bottom {
  bottom: -40px;
  z-index: 50;
  opacity: 0.6;
  transform: translateY(var(--cloud-y));
}

/* Mid-page clouds — between sections, foreground overlap */
.jh-cloud--mid-a,
.jh-cloud--mid-b {
  position: relative;
  z-index: 50;
  margin-top: -80px;
  margin-bottom: -60px;
  opacity: 0.35;
  transform: translateY(var(--cloud-y));
}

.jh-cloud--mid-b {
  transform: scaleX(-1) translateY(var(--cloud-y));
  opacity: 0.3;
  margin-top: -60px;
  margin-bottom: -50px;
}

/* Social section cloud — top edge, overlaps category section bottom */
.jh-cloud--social {
  top: -70px;
  z-index: 50;
  opacity: 0.4;
  transform: translateY(var(--cloud-y));
}

/* === Custom Header === */
.jh-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  transition: background 0.3s ease;
}

.jh-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.jh-header-logo img {
  height: 40px;
  width: 40px;
}

.jh-header-logo span {
  color: var(--jh-gold);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.jh-header-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jh-header-nav a {
  color: var(--jh-text-light);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.jh-header-nav a:hover {
  color: var(--jh-gold);
}

/* === Hero Section === */
.jh-hero {
  position: relative;
  height: 100vh;
  background: var(--jh-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.jh-hero-ink {
  position: absolute;
  z-index: 1;
  opacity: 0.1;
}

.jh-hero-ink img {
  width: 100%;
  height: auto;
}

.jh-hero-ink.left {
  top: 10%;
  left: -5%;
  width: 300px;
  transform: rotate(-15deg);
}

.jh-hero-ink.right {
  bottom: 20%;
  right: -5%;
  width: 250px;
  transform: rotate(15deg) scaleX(-1);
}

.jh-hero-title {
  position: relative;
  z-index: 20;
  text-align: center;
}

.jh-hero-title img {
  max-width: 500px;
  width: 80vw;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(197, 165, 114, 0.3));
}

.jh-hero-tagline {
  position: relative;
  z-index: 20;
  color: var(--jh-gold);
  font-size: 16px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 20px;
  opacity: 0.9;
  text-shadow: 0 0 30px rgba(26, 26, 46, 0.8);
}

.jh-hero-scroll {
  position: absolute;
  bottom: 40px;
  z-index: 15;
  color: var(--jh-gold);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}

.jh-hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: var(--jh-gold);
  margin: 10px auto 0;
  opacity: 0.5;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* === Reveal Section (Fuji Scene + Value Props) === */
.jh-reveal {
  position: relative;
  min-height: 100vh;
  background-color: var(--jh-ink);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark overlay for text readability */
.jh-reveal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 46, 0.3) 0%,
    rgba(26, 26, 46, 0.55) 40%,
    rgba(26, 26, 46, 0.7) 100%
  );
  z-index: 1;
}

.jh-reveal-content {
  --reveal-y: 40px;
  position: relative;
  z-index: 10;
  max-width: 960px;
  width: 100%;
  padding: 120px 40px 100px;
  text-align: center;
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity 0.1s ease-out;
}

.jh-reveal-heading {
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 2px;
  font-family: 'Noto Serif JP', serif;
  margin-bottom: 60px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.jh-reveal-heading span {
  color: var(--jh-gold);
  display: block;
  font-size: 36px;
}

.jh-reveal-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.jh-reveal-feature {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 165, 114, 0.2);
  padding: 35px 25px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.jh-reveal-feature:hover {
  transform: translateY(-5px);
  border-color: rgba(197, 165, 114, 0.5);
}

.jh-reveal-feature-icon {
  font-size: 32px;
  color: var(--jh-gold);
  margin-bottom: 15px;
  line-height: 1;
}

.jh-reveal-feature h3 {
  color: var(--jh-gold);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-family: 'Noto Serif JP', serif;
}

.jh-reveal-feature p {
  color: var(--jh-text-light);
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
}

/* === Transition to Washi === */
.jh-transition {
  height: 150px;
  background: linear-gradient(to bottom, var(--jh-ink), var(--jh-washi));
}

/* === Patreon Section === */
.jh-patreon {
  background: var(--jh-washi);
  padding: 80px 20px;
  display: flex;
  justify-content: center;
}

.jh-patreon-card {
  max-width: 750px;
  width: 100%;
  background: var(--jh-ink);
  border: none !important;
  padding: 100px 80px 80px;
  text-align: center;
  position: relative !important;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(26, 26, 46, 0.4);
}

/* Decorative gold frame as background */
.jh-patreon-frame {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  pointer-events: none;
  z-index: 0 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

.jh-patreon-heading {
  position: relative;
  z-index: 1;
  color: var(--jh-gold);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: 'Noto Serif JP', serif;
  margin-bottom: 20px;
}

.jh-patreon-divider-line {
  width: 60px;
  height: 2px;
  background: var(--jh-gold);
  margin: 0 auto 25px;
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

.jh-patreon-text {
  color: var(--jh-text-light);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 35px;
  position: relative;
  z-index: 1;
}

.jh-patreon-btn {
  display: inline-block;
  background: var(--jh-gold);
  color: var(--jh-ink);
  padding: 16px 50px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.jh-patreon-btn:hover {
  background: var(--jh-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(197, 165, 114, 0.3);
  color: var(--jh-ink);
}

/* === Section Titles === */
.jh-section-title {
  text-align: center;
  font-size: 32px;
  color: var(--jh-ink);
  font-weight: 700;
  margin-bottom: 50px;
  letter-spacing: 2px;
  font-family: 'Noto Serif JP', serif;
}

/* === Articles Section === */
.jh-articles {
  position: relative;
  background: var(--jh-washi);
  padding: 60px 20px 80px;
}

.jh-shoji-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: var(--jh-ink);
  border: 3px solid var(--jh-ink);
}

.jh-shoji-card {
  background: var(--jh-washi);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--jh-text);
  display: block;
}

.jh-shoji-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(26, 26, 46, 0.2);
  z-index: 2;
  color: var(--jh-text);
}

.jh-shoji-card-img {
  width: 100% !important;
  height: 180px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-bottom: 3px solid var(--jh-ink) !important;
  background: linear-gradient(135deg, #2A2A3E 0%, #1A1A2E 100%) !important;
  overflow: hidden !important;
}

.jh-shoji-card-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.jh-shoji-card-emoji {
  font-size: 64px !important;
  line-height: 1 !important;
  display: block !important;
  text-align: center !important;
}

.jh-shoji-card-body {
  padding: 20px;
}

.jh-shoji-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--jh-ink);
  line-height: 1.5;
  margin: 0 0 8px;
}

.jh-shoji-card-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* === Categories Section === */
.jh-categories {
  position: relative;
  background: #F0EBE3;
  padding: 60px 20px 80px;
}

.jh-category-row {
  max-width: 900px;
  margin: 0 auto;
  display: flex !important;
  justify-content: space-around !important;
  flex-wrap: wrap;
  gap: 30px;
}

.jh-category-item {
  text-align: center;
  text-decoration: none;
  color: var(--jh-ink);
  transition: transform 0.3s ease;
}

.jh-category-item:hover {
  transform: translateY(-5px);
  color: var(--jh-ink);
}

.jh-category-icon {
  width: 140px !important;
  height: 140px !important;
  margin: 0 auto 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background: #F0EBE3 !important;
}

.jh-category-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  mix-blend-mode: multiply !important;
  filter: drop-shadow(0 2px 8px rgba(26, 26, 46, 0.15));
}

.jh-category-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* === Social Section === */
.jh-social {
  position: relative;
  background: linear-gradient(to bottom, #F0EBE3, var(--jh-ink));
  padding: 100px 20px 80px;
  text-align: center;
  overflow: hidden;
}

.jh-social .jh-section-title {
  color: var(--jh-ink);
  position: relative;
  z-index: 10;
}

.jh-social-icons {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin: 30px 0;
  position: relative;
  z-index: 10;
}

.jh-social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--jh-ink);
  transition: transform 0.3s ease;
}

.jh-social-link:hover {
  transform: translateY(-5px);
  color: var(--jh-ink);
}

.jh-social-link svg {
  width: 48px;
  height: 48px;
}

.jh-social-link span {
  font-size: 14px;
  font-weight: 600;
}

.jh-social-handle {
  color: var(--jh-text);
  font-size: 16px;
  margin-top: 10px;
  letter-spacing: 1px;
  position: relative;
  z-index: 10;
}

/* === Footer === */
.jh-footer {
  background: var(--jh-ink);
  padding: 50px 20px;
  text-align: center;
}

.jh-footer-logo {
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  display: block;
}

.jh-footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.jh-footer-links a {
  color: var(--jh-gold);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.jh-footer-links a:hover {
  opacity: 0.7;
}

.jh-footer-copy {
  color: var(--jh-text-light);
  font-size: 12px;
  opacity: 0.5;
}

/* === Responsive === */
@media (max-width: 768px) {
  .jh-header {
    padding: 10px 20px;
  }

  .jh-header-nav {
    display: none;
  }

  .jh-hero-title img {
    max-width: 280px;
  }

  .jh-hero-tagline {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .jh-reveal-content {
    padding: 100px 20px 80px;
  }

  .jh-reveal-heading {
    font-size: 28px;
  }

  .jh-reveal-heading span {
    font-size: 24px;
  }

  .jh-reveal-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .jh-shoji-grid {
    grid-template-columns: 1fr;
  }

  .jh-patreon-card {
    padding: 60px 30px 50px;
  }

  .jh-patreon-heading {
    font-size: 28px;
  }

  .jh-category-row {
    gap: 20px;
  }

  .jh-category-icon {
    width: 100px !important;
    height: 100px !important;
  }

  .jh-cloud--mid-a,
  .jh-cloud--mid-b {
    margin-top: -50px;
    margin-bottom: -40px;
  }

  .jh-footer-links {
    flex-direction: column;
    gap: 15px;
  }
}
