/**
 * Hot Water - Main Stylesheet
 * /Library/WebServer/Documents/hotwater.world/css/style.css
 * 
 * Color Palette (Japanese woodcut aesthetic):
 * - Primary: Slate blue #4a6b7c
 * - Secondary: Ochre #c4a35a
 * - Dark: Rock gray #3d3d3d
 * - Light: Warm paper #f5f1e8
 * - Accent: Reed gold #8b7355
 */

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: #f5f1e8;
    color: #3d3d3d;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #4a6b7c;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #4a6b7c;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #c4a35a;
}

/* ============================================================================
   HERO HEADER (Homepage with Animated Montage)
   ============================================================================ */

.hero-header {
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Curved bottom edge - theater screen effect */
.hero-header::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: -10%;
    right: -10%;
    height: 75px;
    background: #f5f1e8;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    z-index: 3;
}

/* Slideshow container */
.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Individual slides */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    /* Animation timing set dynamically in header.php */
}

/* First slide visible immediately */
.hero-slide.first {
    opacity: 1;
}

/* Warm overlay with vignette for depth */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 100% 80% at center 40%, transparent 30%, rgba(30, 25, 20, 0.5) 100%),
        linear-gradient(to bottom,
            rgba(61, 61, 61, 0.4) 0%,
            rgba(61, 61, 61, 0.5) 60%,
            rgba(61, 61, 61, 0.6) 100%);
    z-index: 1;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 50px 40px 100px;
}

.hero-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.hero-logo img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(61, 61, 61, 0.8);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
}

.hero-tagline {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    margin-bottom: 25px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-nav {
    margin-top: 15px;
}

.hero-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    transition: color 0.2s ease;
}

.hero-nav a:hover {
    color: #c4a35a;
}

/* ============================================================================
   INTERIOR PAGE HEADER
   ============================================================================ */

.site-header {
    background-color: #3d3d3d;
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #f5f1e8;
    letter-spacing: 0.05em;
}

.site-logo-image {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.site-logo:hover {
    color: #c4a35a;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #f5f1e8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: #c4a35a;
}

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Footer */
.site-footer {
    background: #3d3d3d;
    color: #e8e4e0;
    padding: 35px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-footer a {
    color: #c4a882;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #fff;
}

/* Footer Projects Grid */
.footer-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 32px;
    margin-bottom: 25px;
    text-align: left;
}

.footer-project {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.footer-project:hover {
    color: #fff;
}

.footer-project-name {
    display: block;
    font-size: 0.95em;
    font-weight: 600;
    color: #c4a882;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.footer-project:hover .footer-project-name {
    color: #fff;
}

.footer-project-desc {
    display: block;
    font-size: 0.8em;
    color: #a09080;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.footer-project:hover .footer-project-desc {
    color: #bdc3c7;
}

/* Footer Divider */
.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0 25px;
}

/* Footer Copyright */
.footer-copyright {
    text-align: center;
}

.footer-copyright p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.footer-copyright p:last-child {
    margin-bottom: 0;
}

.footer-tagline {
    font-style: italic;
    color: #a09080;
    font-size: 0.9em !important;
}

/* Footer Green Tech */
.footer-green-tech {
    margin-top: 15px;
}

.footer-green-tech a {
    color: #7cb87c;
}

.footer-green-tech a:hover {
    color: #9cd89c;
}

.footer-green-desc {
    font-size: 0.8em !important;
    color: #8b8070;
    font-style: italic;
}

/* Landing Page */
.hero {
    text-align: center;
    padding: 2rem 0 4rem;
}

.hero-image-container {
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    color: #4a6b7c;
    margin-bottom: 0.5rem;
}

.hero .volume-line {
    font-size: 3.5rem;
    color: #4a6b7c;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.25rem;
    color: #8b7355;
    font-style: italic;
    margin-bottom: 2rem;
}

.hero .genre-line {
    font-size: 1.5rem;
    color: #c4a35a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
}


.hero .synopsis {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Call to Action Buttons */
.cta-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-button.primary {
    background-color: #4a6b7c;
    color: #f5f1e8;
}

.cta-button.primary:hover {
    background-color: #3d5a69;
    color: #f5f1e8;
}

.cta-button.secondary {
    background-color: transparent;
    color: #4a6b7c;
    border: 2px solid #4a6b7c;
}

.cta-button.secondary:hover {
    background-color: #4a6b7c;
    color: #f5f1e8;
}

/* Stats Line */
.stats-line {
    color: #8b7355;
    font-size: 0.95rem;
    margin-top: 2rem;
}

/* Table of Contents */
.toc-container {
    max-width: 800px;
    margin: 0 auto;
}

.part-group {
    margin-bottom: 3rem;
}

.part-title {
    font-size: 1.25rem;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid #c4a35a;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.chapter-list {
    list-style: none;
}

.chapter-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.chapter-item:hover {
    background-color: rgba(74, 107, 124, 0.05);
}

.chapter-item a {
    flex: 1;
}

.chapter-title {
    font-weight: 600;
    color: #4a6b7c;
}

.chapter-meta {
    color: #8b7355;
    font-size: 0.875rem;
}

.chapter-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b7355;
    background-color: rgba(139, 115, 85, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.gated-indicator {
    color: #c4a35a;
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #3d3d3d;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: Georgia, serif;
    font-size: 1rem;
    border: 2px solid #8b7355;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a6b7c;
}

/* Subscribe Box */
.subscribe-box {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border: 2px solid #c4a35a;
    border-radius: 8px;
    text-align: center;
}

.subscribe-box h2 {
    margin-bottom: 1rem;
}

.subscribe-box p {
    margin-bottom: 1.5rem;
    color: #8b7355;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(74, 107, 124, 0.1);
    border: 1px solid #4a6b7c;
    color: #4a6b7c;
}

.alert-error {
    background-color: rgba(196, 163, 90, 0.1);
    border: 1px solid #c4a35a;
    color: #8b7355;
}

/* About Page */
.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.about-section {
    margin-bottom: 3rem;
}

/* ============================================================================
   TRILOGY SHOWCASE (Multi-Volume Layout)
   Activated when multiple volumes are published
   ============================================================================ */

.trilogy-hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
}

.trilogy-title {
    font-size: 3rem;
    color: #4a6b7c;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.trilogy-subtitle {
    font-size: 1.25rem;
    color: #8b7355;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.trilogy-tagline {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.trilogy-volumes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.trilogy-volume-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.trilogy-volume-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.volume-card-cover {
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #4a6b7c 0%, #2d4a5a 100%);
    overflow: hidden;
}

.volume-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.volume-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.3);
    font-size: 6rem;
    font-weight: 300;
}

.volume-card-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.volume-card-number {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8b7355;
}

.volume-card-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a6b7c;
}

.volume-card-tagline {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 0.25rem;
}

.volume-card-stats {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.5rem;
}

.trilogy-synopsis {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.trilogy-synopsis p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.trilogy-cta {
    text-align: center;
    padding: 1rem 1.5rem 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================================================
   VOLUME TABS (Read.php Multi-Volume TOC)
   ============================================================================ */

.volume-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.volume-tab {
    padding: 0.6rem 1.25rem;
    border: 2px solid #e5e0d5;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.volume-tab:hover {
    border-color: #4a6b7c;
    color: #4a6b7c;
}

.volume-tab.active {
    background: #4a6b7c;
    border-color: #4a6b7c;
    color: white;
}

/* ============================================================================
   HAMBURGER MENU
   ============================================================================ */

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #f5f1e8;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================================
   GALLERY PAGE
   ============================================================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    cursor: pointer;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.gallery-item a {
    font-size: 0.85rem;
    color: #c4a35a;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    /* Hamburger menu visible */
    .hamburger {
        display: block;
    }
    
    /* Interior header nav - dropdown style */
    .nav-container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        background: #3d3d3d;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-links li {
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
    }
    
    /* Hero nav - dropdown style */
    .hero-nav {
        position: relative;
    }
    
    .hero-nav .nav-links-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(61, 61, 61, 0.95);
        border-radius: 8px;
        padding: 0.5rem 0;
        min-width: 160px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        margin-top: 10px;
    }
    
    .hero-nav .nav-links-wrapper.show {
        display: block;
    }
    
    .hero-nav .nav-links-wrapper a {
        display: block;
        padding: 0.75rem 1.5rem;
        margin: 0;
        text-align: center;
    }
    
    .hero-nav .hamburger span {
        background: rgba(255, 255, 255, 0.9);
    }
    
    /* Hero responsive */
    .hero-header {
        min-height: 420px;
    }
    
    .hero-header::after {
        height: 50px;
        bottom: -15px;
    }
    
    .hero-content {
        padding: 40px 20px 80px;
    }
    
    .hero-logo img {
        width: 80px;
        height: 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    main {
        padding: 1rem;
    }
    
    /* Footer responsive */
    .footer-container {
        padding: 0 1.5rem;
    }
    
    .footer-projects {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 20px;
    }
    
    .footer-project-name {
        font-size: 0.9em;
    }
    
    .footer-project-desc {
        font-size: 0.75em;
    }
    
    .footer-green-desc {
        font-size: 0.75em !important;
    }
}

@media (max-width: 600px) {
    .hero-header {
        min-height: 380px;
    }
    
    .hero-header::after {
        height: 35px;
        bottom: -10px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .trilogy-title {
        font-size: 2.25rem;
    }
    
    .trilogy-volumes {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
    
    .volume-tab {
        flex: 1 1 100%;
        text-align: center;
    }
    
    /* Footer mobile */
    .footer-projects {
        grid-template-columns: 1fr;
        text-align: center;
    }
}