/* ==========================================================================
   ZEN MEDITATION TOKYO — Design System
   Following STYLE-GUIDELINES.md
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Serif+JP:wght@400;500;700&display=swap');

/* --- Custom Properties --- */
:root {
    /* Primary Palette */
    --sumi-ink: #1A1A1A;
    --charcoal: #2D2D2D;
    --stone-warm: #6B6560;
    --shironeri: #F5F0EB;
    --snow: #FAFAF8;
    --white: #FFFFFF;

    /* Earthy Tones */
    --matcha: #7A8B6F;
    --moss: #4A5D3E;
    --bamboo: #C4B59A;
    --terracotta: #B07B5F;

    /* Accent Palette */
    --kinsui-gold: #B8963E;
    --gold-soft: #D4B96A;
    --gold-pale: #F0E6CC;

    /* Functional */
    --success: #5E8C61;
    --warning: #C4973B;
    --error: #A65D57;

    /* Spacing (Base-8) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-24: 96px;
    --space-32: 128px;
}

/* --- Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}

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

/* --- Base --- */
body {
    font-family: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
    background-color: var(--shironeri);
    color: var(--charcoal);
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
.serif {
    font-family: 'Noto Serif JP', Georgia, serif;
    color: var(--sumi-ink);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin-bottom: var(--space-4);
}

h2 {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-8);
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.005em;
    margin-bottom: var(--space-4);
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: var(--space-3);
}

p {
    margin-bottom: var(--space-6);
    line-height: 1.65;
}

.overline {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--stone-warm);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-12);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-16);
    }
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-16) 0;
}

@media (min-width: 1024px) {
    .section {
        padding: var(--space-24) 0;
    }
}

@media (max-width: 767px) {
    .section {
        padding: var(--space-12) 0;
    }
}

/* --- Skip-to-Content (Accessibility) --- */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--kinsui-gold);
    color: var(--white);
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    font-weight: 500;
    transition: top 200ms ease;
}

.skip-to-content:focus {
    top: 0;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 300ms ease-in-out;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--shironeri), 0 0 0 4px var(--kinsui-gold);
}

.btn-primary {
    background-color: var(--kinsui-gold);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--gold-soft);
    box-shadow: 0 4px 12px rgba(184, 150, 62, 0.25);
}

.btn-primary:active {
    background-color: #9A7D34;
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--stone-warm);
    color: var(--charcoal);
}

.btn-secondary:hover {
    background-color: var(--shironeri);
    border-color: var(--charcoal);
}

.btn-secondary:active {
    background-color: #E8E2DA;
}

.btn-ghost {
    background: transparent;
    color: var(--kinsui-gold);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: #9A7D34;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    transition: all 300ms ease;
    background: transparent;
}

nav.scrolled {
    background-color: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 64px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.logo {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: color 300ms ease;
}

nav.scrolled .logo {
    color: var(--sumi-ink);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 400;
    position: relative;
    transition: color 300ms ease;
}

nav.scrolled .nav-links a {
    color: var(--charcoal);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--kinsui-gold);
    transition: width 200ms ease;
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-links .btn {
    padding: 10px 20px;
    font-size: 14px;
    margin-left: var(--space-4);
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: all 300ms ease;
}

nav.scrolled .hamburger span {
    background-color: var(--sumi-ink);
}

.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);
}

/* Mobile overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(26, 26, 26, 0.97);
    z-index: 1050;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    opacity: 0;
    transition: opacity 300ms ease;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-menu-overlay a {
    color: var(--white);
    text-decoration: none;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 400ms ease forwards;
}

.mobile-menu-overlay a:nth-child(1) {
    animation-delay: 100ms;
}

.mobile-menu-overlay a:nth-child(2) {
    animation-delay: 200ms;
}

.mobile-menu-overlay a:nth-child(3) {
    animation-delay: 300ms;
}

.mobile-menu-overlay a:nth-child(4) {
    animation-delay: 400ms;
}

.mobile-menu-overlay a:nth-child(5) {
    animation-delay: 500ms;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* --- Hero --- */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    background-color: var(--sumi-ink);
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: saturate(0.8) brightness(1.05);
    transition: opacity 800ms ease 300ms;
}

.hero.active .hero-bg {
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.5), transparent);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 720px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: var(--space-6);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 700ms ease-out 500ms, transform 700ms ease-out 500ms;
}

.hero p {
    font-size: 1.125rem;
    line-height: 1.65;
    margin-bottom: var(--space-8);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 700ms ease-out 700ms, transform 700ms ease-out 700ms;
    color: rgba(255, 255, 255, 0.9);
}

.hero .btn {
    opacity: 0;
    transition: opacity 500ms ease-out 1000ms, background-color 300ms ease, box-shadow 300ms ease, transform 150ms ease;
}

.hero.active h1,
.hero.active p,
.hero.active .btn {
    opacity: 1;
    transform: translateY(0);
}

.social-proof-hero {
    margin-top: var(--space-8);
    opacity: 0;
    transition: opacity 700ms ease-out 1200ms;
}

.hero.active .social-proof-hero {
    opacity: 1;
}

.social-proof-hero span {
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* --- Grid & Cards --- */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--white);
    border: 1px solid rgba(107, 101, 96, 0.12);
    border-radius: 8px;
    padding: var(--space-6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 400ms ease-in-out, transform 400ms ease-in-out;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--space-4);
    filter: saturate(0.85) brightness(1.02);
    transition: transform 600ms ease;
    overflow: hidden;
}

.card:hover .card-img {
    transform: scale(1.03);
}

.card-img-wrapper {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.card-img-wrapper img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: saturate(0.85) brightness(1.02);
    transition: transform 600ms ease;
    display: block;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.03);
}

.card-location {
    font-size: 0.875rem;
    color: var(--kinsui-gold);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

/* --- Reviews Carousel --- */
.reviews-section {
    background-color: var(--sumi-ink);
    color: var(--white);
}

.reviews-container {
    overflow-x: auto;
    display: flex;
    gap: var(--space-6);
    padding: var(--space-4) 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.reviews-container::-webkit-scrollbar {
    display: none;
}

.review-card {
    min-width: 400px;
    flex-shrink: 0;
    background: var(--white);
    color: var(--charcoal);
    padding: var(--space-8);
    border-radius: 10px;
    scroll-snap-align: start;
    border: 1px solid rgba(107, 101, 96, 0.1);
    min-height: 220px;
}

@media (max-width: 640px) {
    .review-card {
        min-width: 85vw;
    }
}

.stars {
    color: var(--kinsui-gold);
    margin-bottom: var(--space-4);
    font-size: 1.125rem;
}

.review-text {
    font-style: italic;
    font-family: 'Noto Serif JP', serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--charcoal);
    margin-bottom: var(--space-6);
}

.reviewer {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.reviewer-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--sumi-ink);
}

.reviewer-source {
    font-size: 12px;
    color: var(--stone-warm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Trust bar */
.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-6) 0;
    color: var(--stone-warm);
    font-size: 14px;
}

.trust-bar .separator {
    width: 1px;
    height: 16px;
    background: rgba(107, 101, 96, 0.2);
}

/* --- FAQ Accordion --- */
.faq-container {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(107, 101, 96, 0.1);
}

.faq-trigger {
    padding: 20px var(--space-6);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--sumi-ink);
    text-align: left;
    transition: background 200ms ease;
}

.faq-trigger:hover {
    background-color: rgba(245, 240, 235, 0.5);
}

.faq-trigger:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--kinsui-gold);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease-in-out, padding 300ms ease-in-out, opacity 300ms ease-in-out;
    background-color: var(--snow);
    opacity: 0;
}

.faq-item.active .faq-content {
    max-height: 500px;
    padding: 0 var(--space-6) 20px var(--space-6);
    opacity: 1;
}

.faq-content p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--charcoal);
}

.faq-item.active .chevron-icon {
    transform: rotate(180deg);
}

.chevron-icon {
    transition: transform 300ms ease-in-out;
    width: 20px;
    height: 20px;
    color: var(--stone-warm);
    flex-shrink: 0;
}

/* --- Breathing Timer --- */
.breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid var(--kinsui-gold);
    margin: var(--space-12) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 300ms ease;
    font-family: 'Noto Serif JP', serif;
    color: var(--charcoal);
}

.breathing-circle:hover {
    transform: scale(1.02);
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* --- Sticky Mobile CTA --- */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: var(--shironeri);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    transform: translateY(100%);
    transition: transform 300ms ease;
}

.sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta .btn {
    width: calc(100% - 32px);
    max-width: 400px;
    padding: 12px 24px;
}

@media (max-width: 768px) {
    .sticky-cta {
        display: flex;
    }

    main {
        padding-bottom: 64px;
    }
}

/* --- Section Image --- */
.section-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    filter: saturate(0.85) brightness(1.02);
    display: block;
}

/* --- Map Image --- */
.map-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(107, 101, 96, 0.12);
    display: block;
    margin-top: var(--space-8);
}

/* --- Practical Tips List --- */
.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: var(--space-4) 0;
    border-bottom: 1px solid rgba(107, 101, 96, 0.08);
    line-height: 1.65;
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list strong {
    color: var(--sumi-ink);
}

/* --- Scroll Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer --- */
footer {
    background-color: var(--sumi-ink);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-16) 0 var(--space-8);
}

footer h3,
footer h4 {
    color: var(--white);
    margin-bottom: var(--space-4);
}

footer p {
    margin-bottom: var(--space-3);
    font-size: 14px;
    line-height: 1.6;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 200ms ease;
}

footer a:hover {
    color: var(--kinsui-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

.footer-bottom {
    text-align: center;
    color: var(--stone-warm);
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-8);
}

/* --- Utilities --- */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

.text-gold {
    color: var(--kinsui-gold);
}

.text-matcha {
    color: var(--matcha);
}

.text-stone {
    color: var(--stone-warm);
}

.bg-snow {
    background-color: var(--snow);
}

.bg-shironeri {
    background-color: var(--shironeri);
}

/* --- Reduced Motion (Accessibility §12) --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}