/**
 * AAMS Brand Theme - Base CSS
 * 
 * 全ブランド共通のレイアウト・コンポーネント
 * 
 * @version 4.2.0
 */

/* ==========================================================================
   CSS Variables (ブランドで上書き可能)
   ========================================================================== */

:root {
    --aams-primary: #E2C98C;
    --aams-secondary: #F8F5F0;
    --aams-accent: #D4AF37;
    --aams-text: #333333;
    --aams-text-light: #666666;
    --aams-border: #e0e0e0;
    --aams-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --aams-radius: 8px;
    --aams-transition: 0.3s ease;
}

/* ==========================================================================
   Cast Card Component
   ========================================================================== */

.cast-card {
    background: #fff;
    border-radius: var(--aams-radius);
    box-shadow: var(--aams-shadow);
    overflow: hidden;
    transition: transform var(--aams-transition), box-shadow var(--aams-transition);
}

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

/* Thumbnail */
.cast-card__thumb {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.cast-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--aams-transition);
}

.cast-card:hover .cast-card__image {
    transform: scale(1.05);
}

.cast-card__no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--aams-secondary);
    color: var(--aams-text-light);
}

/* Badges */
.cast-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge--new {
    background: #ff6b6b;
    color: #fff;
}

.badge--type {
    background: var(--aams-primary);
    color: #fff;
}

.badge--type-ss {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
}

.badge--type-s {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
}

.badge--drip {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

/* Card Body */
.cast-card__body {
    padding: 15px;
}

.cast-card__name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: bold;
}

.cast-card__name a {
    color: var(--aams-text);
    text-decoration: none;
}

.cast-card__name a:hover {
    color: var(--aams-primary);
}

.cast-card__meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--aams-text-light);
}

.cast-card__size {
    font-size: 13px;
    color: var(--aams-text-light);
    margin-bottom: 8px;
}

.cast-card__size--secret {
    font-style: italic;
    color: #999;
}

.cast-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    background: var(--aams-secondary);
    border-radius: 4px;
    font-size: 12px;
    color: var(--aams-text);
}

.cast-card__intro {
    font-size: 13px;
    color: var(--aams-text-light);
    line-height: 1.5;
    margin-bottom: 12px;
}

.cast-card__cta {
    text-align: center;
}

/* ==========================================================================
   Drip Stage Classes（UI演出のみ - 秘匿処理はDB母艦側で完結）
   
   【重要】
   - 画像のblur処理はDB母艦側で生成済み（CSS filterでのblur禁止）
   - ここでのスタイルは視覚的演出（オーバーレイ等）のみ
   - 秘匿すべき情報はAPIレスポンス時点で除外されている
   ========================================================================== */

/**
 * Stage 1: 予感（Day 1-2）
 * - DB母艦から Heavy Blur 画像が返却される
 * - UI演出: グラデーションオーバーレイ
 */
.drip-stage-1 .cast-card__thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
}

.drip-stage-1 .cast-card__image {
    filter: grayscale(30%);
}

/**
 * Stage 2: 想像（Day 3-6）
 * - DB母艦から Light Blur 画像が返却される
 * - UI演出: 軽いグラデーションオーバーレイ
 */
.drip-stage-2 .cast-card__thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/**
 * Stage 3: 完成（Day 7+）
 * - DB母艦からクリア画像が返却される
 * - UI演出なし（通常表示）
 */
.drip-stage-3 .cast-card__thumb::after {
    display: none;
}

/* ==========================================================================
   NEW Badge Animation
   ========================================================================== */

.is-new .badge--new {
    animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
    }
}

/* ==========================================================================
   Button Component
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--aams-radius);
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all var(--aams-transition);
}

.btn--primary {
    background: var(--aams-primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--aams-accent);
    transform: translateY(-2px);
}

.btn--secondary {
    background: transparent;
    border: 2px solid var(--aams-primary);
    color: var(--aams-primary);
}

.btn--secondary:hover {
    background: var(--aams-primary);
    color: #fff;
}

/* ==========================================================================
   Grid System
   ========================================================================== */

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0;
    list-style: none;
}

@media (max-width: 768px) {
    .cast-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .cast-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--aams-text);
    margin: 0;
}

.section-more {
    font-size: 14px;
    color: var(--aams-primary);
    text-decoration: none;
}

.section-more:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--aams-secondary);
    border-top-color: var(--aams-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Error State
   ========================================================================== */

.error-message {
    padding: 20px;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: var(--aams-radius);
    color: #c62828;
    text-align: center;
}

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--aams-border);
    transition: all var(--aams-transition);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
}

.site-header__brand {
    flex-shrink: 0;
}

.site-header__logo {
    text-decoration: none;
}

.site-header__logo-text {
    font-family: "Cormorant Garamond", "Noto Serif JP", serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--aams-text);
    text-transform: uppercase;
}

.site-header__nav {
    display: none;
}

@media (min-width: 1024px) {
    .site-header__nav {
        display: block;
    }
}

.header-nav__list {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav__list li a {
    font-family: "Cormorant Garamond", serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--aams-text);
    text-decoration: none;
    text-transform: uppercase;
    transition: color var(--aams-transition);
}

.header-nav__list li a:hover {
    color: var(--aams-primary);
}

/* Menu Toggle */
.site-header__menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .site-header__menu-toggle {
        display: none;
    }
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--aams-text);
    transition: all var(--aams-transition);
}

.site-header__menu-toggle.is-active .menu-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translateY(5px);
}

.site-header__menu-toggle.is-active .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.site-header__menu-toggle.is-active .menu-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-5px);
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

.mobile-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 40px 24px;
    overflow-y: auto;
}

.mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav__list li {
    border-bottom: 1px solid var(--aams-border);
}

.mobile-nav__list li a {
    display: block;
    padding: 20px 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    letter-spacing: 0.15em;
    color: var(--aams-text);
    text-decoration: none;
    text-transform: uppercase;
}

.mobile-nav__contact {
    text-align: center;
    padding-top: 40px;
}

.mobile-nav__tel {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    letter-spacing: 0.1em;
    color: var(--aams-primary);
    text-decoration: none;
    margin-bottom: 8px;
}

.mobile-nav__hours {
    font-size: 13px;
    color: var(--aams-text-light);
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    background: #fafafa;
    border-top: 1px solid var(--aams-border);
    padding: 80px 0 40px;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-footer__top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .site-footer__top {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 40px;
    }
}

/* Footer Brand */
.site-footer__brand {
    text-align: center;
}

@media (min-width: 768px) {
    .site-footer__brand {
        text-align: left;
    }
}

.site-footer__logo {
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--aams-text);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.site-footer__tagline {
    font-size: 12px;
    color: var(--aams-text-light);
    letter-spacing: 0.05em;
}

/* Footer Navigation */
.site-footer__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

.footer-nav-group__title {
    font-family: "Cormorant Garamond", serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--aams-text);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-nav-group__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav-group__list li {
    margin-bottom: 10px;
}

.footer-nav-group__list li a {
    font-size: 13px;
    color: var(--aams-text-light);
    text-decoration: none;
    transition: color var(--aams-transition);
}

.footer-nav-group__list li a:hover {
    color: var(--aams-primary);
}

/* Footer Contact */
.site-footer__contact {
    text-align: center;
}

@media (min-width: 768px) {
    .site-footer__contact {
        text-align: right;
    }
}

.footer-contact__title {
    font-family: "Cormorant Garamond", serif;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-contact__tel {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    letter-spacing: 0.05em;
    color: var(--aams-primary);
    text-decoration: none;
    margin-bottom: 4px;
}

.footer-contact__hours {
    font-size: 12px;
    color: var(--aams-text-light);
    margin-bottom: 16px;
}

.footer-contact__btn {
    display: inline-block;
    padding: 12px 32px;
    border: 1px solid var(--aams-primary);
    border-radius: var(--aams-radius-sm);
    font-size: 13px;
    color: var(--aams-primary);
    text-decoration: none;
    transition: all var(--aams-transition);
}

.footer-contact__btn:hover {
    background: var(--aams-primary);
    color: #fff;
}

/* Footer Bottom */
.site-footer__bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--aams-border);
}

.site-footer__copyright {
    font-size: 12px;
    color: var(--aams-text-light);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.site-footer__note {
    font-size: 11px;
    color: #999;
}

/* ==========================================================================
   Page Content Offset (for fixed header)
   ========================================================================== */

.site-content {
    padding-top: 72px;
}

/* Hide header on auth page */
.page-auth .site-header,
.page-auth .site-footer {
    display: none;
}

.page-auth .site-content {
    padding-top: 0;
}

/* ==========================================================================
   Scroll Fade Up Animation
   ========================================================================== */

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 順番に表示させるための遅延（カードグリッド用） */
.cast-grid .cast-card:nth-child(2) { transition-delay: 0.1s; }
.cast-grid .cast-card:nth-child(3) { transition-delay: 0.2s; }
.cast-grid .cast-card:nth-child(4) { transition-delay: 0.3s; }
.cast-grid .cast-card:nth-child(5) { transition-delay: 0.4s; }
.cast-grid .cast-card:nth-child(6) { transition-delay: 0.5s; }

/* ==========================================================================
   Mobile Sticky CTA
   ========================================================================== */

.mobile-sticky-cta {
    display: none; /* PCでは非表示 */
}

@media (max-width: 767px) {
    body {
        padding-bottom: 70px; /* フッターが隠れないように余白確保 */
    }

    .mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        z-index: 9999;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        height: 60px;
    }

    .sticky-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-family: "Noto Serif JP", serif;
        font-size: 15px;
        font-weight: bold;
        color: #fff;
        text-decoration: none;
        transition: opacity 0.3s;
    }

    .sticky-btn:active {
        opacity: 0.8;
    }

    .sticky-tel {
        background: #333333; /* Dark Gray */
    }

    .sticky-line {
        background: #06c755; /* LINE Green */
    }
    
    .sticky-icon {
        font-size: 18px;
    }
}
