/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Noto Serif SC', 'Songti SC', 'STZhongsong', 'Microsoft YaHei', serif; 
    /* Aged paper background */
    background-color: #f4ecd8; 
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.15' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    color: #0f3b57; /* Prussian Blue */
    line-height: 1.6; 
    min-height: 100vh; 
    overflow-x: hidden; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Theme Variables - Ukiyo-e Woodblock */
:root {
    --bg-paper: #f4ecd8;
    --bg-paper-light: #fdfbf7;
    --prussian-blue: #0f3b57;
    --wave-blue-light: #4a7c9d;
    --wave-blue-mid: #2b5b7a;
    --wave-blue-dark: #15364d;
    --stamp-red: #c93a3a;
    --text-main: #0f3b57;
    --text-muted: #4a5d6b;
    --border-color: #0f3b57;
}

/* Woodblock Border Style */
.woodblock-border {
    border: 3px solid var(--prussian-blue);
    position: relative;
}
.woodblock-border::after {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: -8px; bottom: -8px;
    border: 1px solid var(--prussian-blue);
    pointer-events: none;
}

/* Navigation */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 5%; 
    background: rgba(244, 236, 216, 0.9); 
    backdrop-filter: blur(2px);
    position: sticky; 
    top: 0; 
    z-index: 100; 
    border-bottom: 3px solid var(--prussian-blue);
}
.nav-logo { 
    font-size: 24px; 
    font-weight: 900; 
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--prussian-blue);
    letter-spacing: 2px;
}
.nav-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--prussian-blue);
}
.nav-links { display: flex; gap: 30px; align-items: center; font-weight: bold; }
.nav-links a { 
    color: var(--text-muted); 
    transition: all 0.3s; 
    font-size: 16px; 
    letter-spacing: 1px;
}
.nav-links a:hover { 
    color: var(--stamp-red); 
}
.btn-download-nav { 
    padding: 8px 24px; 
    background: var(--stamp-red);
    color: #fff !important; 
    border: 2px solid var(--prussian-blue);
    transition: all 0.3s; 
    font-weight: bold;
}
.btn-download-nav:hover { 
    background: var(--prussian-blue);
    color: #fff !important;
}

/* Hero Section - Ukiyo-e Waves */
.hero-wrapper {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5% 150px;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--bg-paper) 0%, #e3d5b8 100%);
}

/* Kanagawa Waves Background */
.ukiyo-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: 1;
    overflow: hidden;
}
.wave-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    background-position: bottom;
}
.wave-1 {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,100 C150,200 250,0 400,100 C550,200 650,0 800,100 L800,200 L0,200 Z' fill='%234a7c9d' stroke='%230f3b57' stroke-width='3'/%3E%3Cpath d='M0,100 C150,200 250,0 400,100 C550,200 650,0 800,100' fill='none' stroke='%23fdfbf7' stroke-width='8' stroke-linecap='round' stroke-dasharray='10 15'/%3E%3C/svg%3E");
    background-size: 800px 200px;
    z-index: 1;
    animation: waveMove 15s linear infinite;
}
.wave-2 {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,150 C200,50 300,250 500,150 C700,50 800,250 1000,150 L1000,250 L0,250 Z' fill='%232b5b7a' stroke='%230f3b57' stroke-width='3'/%3E%3Cpath d='M0,150 C200,50 300,250 500,150 C700,50 800,250 1000,150' fill='none' stroke='%23fdfbf7' stroke-width='6' stroke-linecap='round' stroke-dasharray='5 20'/%3E%3C/svg%3E");
    background-size: 1000px 250px;
    z-index: 2;
    animation: waveMove 20s linear infinite reverse;
}
.wave-3 {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,200 C100,50 250,300 400,150 C500,50 550,250 600,200 L600,300 L0,300 Z' fill='%2315364d' stroke='%230f3b57' stroke-width='4'/%3E%3Cpath d='M0,200 C100,50 250,300 400,150 C500,50 550,250 600,200' fill='none' stroke='%23fdfbf7' stroke-width='10' stroke-linecap='round' stroke-dasharray='15 25'/%3E%3C/svg%3E");
    background-size: 600px 300px;
    z-index: 3;
    animation: waveMove 12s linear infinite;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Flying Paper Plane on Wave Crest */
.ukiyo-plane {
    position: absolute;
    bottom: 180px;
    left: 50%;
    width: 120px;
    height: 120px;
    z-index: 4;
    animation: planeSurf 4s ease-in-out infinite alternate;
}
@keyframes planeSurf {
    0% { transform: translate(-50%, 0) rotate(-15deg); }
    100% { transform: translate(-30%, -40px) rotate(5deg); }
}

.hero-content { 
    z-index: 5; 
    max-width: 1000px; 
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(253, 251, 247, 0.85);
    padding: 50px;
    border: 3px solid var(--prussian-blue);
    box-shadow: 10px 10px 0 var(--prussian-blue);
}

.hero-title {
    font-size: 48px; 
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--prussian-blue);
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
}
.hero-title::before {
    content: '版画';
    position: absolute;
    top: -20px;
    left: -40px;
    font-size: 16px;
    color: var(--stamp-red);
    border: 2px solid var(--stamp-red);
    padding: 2px 5px;
    transform: rotate(-10deg);
}

.hero p { 
    font-size: 20px; 
    margin-bottom: 40px; 
    color: var(--text-muted);
    max-width: 750px;
    font-weight: bold;
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; margin-bottom: 50px; flex-wrap: wrap; }

.btn-ukiyo { 
    padding: 15px 35px; 
    font-size: 18px; 
    font-weight: bold; 
    color: #fff; 
    background: var(--prussian-blue);
    border: 2px solid var(--prussian-blue);
    box-shadow: 4px 4px 0 var(--stamp-red);
    transition: all 0.2s;
    letter-spacing: 2px;
}
.btn-ukiyo:hover { 
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--stamp-red);
    background: var(--wave-blue-mid);
}

.btn-ukiyo-outline { 
    padding: 15px 35px; 
    font-size: 18px; 
    font-weight: bold; 
    color: var(--prussian-blue); 
    background: var(--bg-paper-light);
    border: 2px solid var(--prussian-blue);
    box-shadow: 4px 4px 0 var(--prussian-blue);
    transition: all 0.2s;
    letter-spacing: 2px;
}
.btn-ukiyo-outline:hover { 
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--prussian-blue);
    background: #fff;
}

.hero-images { 
    display: flex; 
    justify-content: center; 
    gap: 25px; 
    z-index: 5; 
    align-items: flex-end; 
    margin-top: 20px;
}
.hero-images img { 
    max-width: 28%; 
    border: 3px solid var(--prussian-blue);
    background: #fff;
    padding: 5px;
    box-shadow: 8px 8px 0 rgba(15, 59, 87, 0.2);
    transition: all 0.3s; 
    /* Slight sepia filter to match woodblock style */
    filter: sepia(0.2) contrast(1.1);
}
.hero-images img:hover { 
    transform: translateY(-10px); 
    filter: sepia(0) contrast(1.1);
}

/* Features Section */
.features { padding: 100px 5%; background: var(--bg-paper-light); position: relative; z-index: 2; border-top: 3px solid var(--prussian-blue); border-bottom: 3px solid var(--prussian-blue);}
.section-title { 
    text-align: center; 
    font-size: 36px; 
    margin-bottom: 60px; 
    font-weight: 900;
    color: var(--prussian-blue);
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--stamp-red);
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; }

.feature-card { 
    padding: 40px 30px; 
    text-align: center; 
    background: var(--bg-paper);
    transition: all 0.3s; 
}
.feature-card:hover { 
    transform: translateY(-5px); 
    background: #fff;
}
.feature-card h3 { 
    font-size: 22px; 
    margin-bottom: 15px; 
    font-weight: 900; 
    color: var(--prussian-blue);
    border-bottom: 2px dashed var(--prussian-blue);
    display: inline-block;
    padding-bottom: 5px;
}
.feature-card p { color: var(--text-muted); font-size: 15px;}

/* Blog Section */
.blog { padding: 100px 5%; background: var(--bg-paper); }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 1100px; margin: 0 auto; }
.blog-card { 
    display: flex; 
    flex-direction: column; 
    background: var(--bg-paper-light);
    transition: all 0.3s;
}
.blog-card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--prussian-blue); }
.blog-card img { width: 100%; height: 260px; object-fit: cover; border-bottom: 3px solid var(--prussian-blue); filter: sepia(0.3);}
.blog-card:hover img { filter: sepia(0); }
.blog-content { padding: 30px; }
.blog-date { display: inline-block; margin-bottom: 15px; font-size: 14px; color: #fff; background: var(--stamp-red); padding: 4px 10px; font-weight: bold;}
.blog-content h3 { font-size: 22px; margin-bottom: 15px; font-weight: 900; color: var(--prussian-blue);}
.blog-content p { color: var(--text-muted); margin-bottom: 0; }
.btn-more { 
    display: block; 
    width: 240px; 
    margin: 60px auto 0; 
    text-align: center; 
    padding: 15px; 
    background: transparent;
    color: var(--prussian-blue); 
    font-weight: 900; 
    border: 2px solid var(--prussian-blue);
    transition: all 0.3s; 
    letter-spacing: 2px;
}
.btn-more:hover { background: var(--prussian-blue); color: #fff; }

/* FAQ Section */
.faq { padding: 100px 5%; max-width: 900px; margin: 0 auto; background: var(--bg-paper-light); margin-top: 40px; margin-bottom: 80px; box-shadow: 10px 10px 0 rgba(15,59,87,0.1);}
.faq-item { 
    background: var(--bg-paper); 
    margin-bottom: 20px; 
    padding: 25px 30px; 
    border: 2px solid var(--prussian-blue);
    transition: all 0.3s;
}
.faq-item:hover { background: #fff; transform: translateX(5px);}
.faq-question { font-size: 18px; font-weight: 900; margin-bottom: 12px; color: var(--prussian-blue);}
.faq-question::before { content: '問. '; color: var(--stamp-red); }
.faq-answer { color: var(--text-muted); font-size: 15px; }

/* Footer */
.footer { background: var(--prussian-blue); padding: 80px 5% 30px; color: #a4b8c6; border-top: 5px solid var(--wave-blue-dark);}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto 50px; }
.footer-col h4 { font-size: 18px; color: #fff; margin-bottom: 25px; font-weight: 900; letter-spacing: 2px;}
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #a4b8c6; transition: color 0.2s; font-weight: bold;}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 14px; font-weight: bold;}

/* Download Page Grid */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; max-width: 1100px; margin: 60px auto; padding: 0 5%; }
.download-card { 
    padding: 40px 30px; 
    text-align: center; 
    background: var(--bg-paper-light); 
    transition: all 0.3s;
}
.download-card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--prussian-blue); }
.download-card h3 { font-size: 24px; margin-bottom: 15px; font-weight: 900; color: var(--prussian-blue);}
.download-card p { color: var(--text-muted); margin-bottom: 30px; font-size: 15px; }
.btn-dl-card { 
    display: inline-block; 
    padding: 12px 30px; 
    background: var(--prussian-blue);
    color: #fff; 
    font-weight: 900; 
    border: 2px solid var(--prussian-blue);
    transition: all 0.3s; 
}
.btn-dl-card:hover { background: #fff; color: var(--prussian-blue); }

/* Page specific headers */
.page-header { 
    padding: 100px 5% 80px; 
    text-align: center; 
    position: relative;
    background: var(--bg-paper);
    border-bottom: 3px solid var(--prussian-blue);
}
.page-header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background: var(--bg-paper-light);
    padding: 40px;
}
.page-header h1 { 
    font-size: 42px; 
    margin-bottom: 20px; 
    font-weight: 900;
    color: var(--prussian-blue);
    letter-spacing: 2px;
}
.page-header p { font-size: 18px; color: var(--text-muted); font-weight: bold;}

/* === perf: reduce motion & lower GPU cost === */
.feature-card,
.blog-card,
.hero-content,
.glass-panel,
.pearl-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* perf: limit decorative infinite layers on mid/low-end devices */
@media (max-width: 768px) {
    .bubble:nth-child(n+3),
    .tiny-plane:nth-child(n+3),
    .bg-shard:nth-child(n+4),
    .orb:nth-child(n+2) {
        display: none !important;
    }
}
