/* ========================================
   Mina-chan Landing Page Styles
   ======================================== */

/* CSS Custom Properties */
:root {
    --color-primary: #F5A0B8;
    --color-secondary: #8B5E3C;
    --color-accent: #4A90D9;
    --color-background: #FFF8F0;
    --color-text: #2D2D2D;
    --color-card: #FFFFFF;
    --color-yuzu: #F5A623;
    --color-airi: #9B59B6;

    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-signature: 'Caveat', cursive;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--color-secondary);
}

/* ========================================
   Sakura Petals Animation
   ======================================== */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, var(--color-primary), #FFD4E0);
    border-radius: 150% 0 150% 0;
    opacity: 0.7;
    animation: fall linear infinite;
}

.petal:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; }
.petal:nth-child(2) { left: 25%; animation-duration: 14s; animation-delay: 2s; }
.petal:nth-child(3) { left: 40%; animation-duration: 11s; animation-delay: 4s; }
.petal:nth-child(4) { left: 55%; animation-duration: 15s; animation-delay: 1s; }
.petal:nth-child(5) { left: 70%; animation-duration: 13s; animation-delay: 3s; }
.petal:nth-child(6) { left: 85%; animation-duration: 10s; animation-delay: 5s; }
.petal:nth-child(7) { left: 15%; animation-duration: 16s; animation-delay: 6s; }
.petal:nth-child(8) { left: 75%; animation-duration: 12s; animation-delay: 7s; }

@keyframes fall {
    0% {
        top: -5%;
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        top: 105%;
        transform: translateX(100px) rotate(720deg);
        opacity: 0;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sakura-container {
        display: none;
    }

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

    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Taller hero on larger screens */
@media (min-width: 768px) {
    .hero {
        min-height: 70vh;
    }
}

@media (min-width: 1024px) {
    .hero {
        min-height: 85vh;
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center; /* Show right side where face is on mobile */
}

@media (min-width: 768px) {
    .hero-bg img {
        object-position: center center;
    }
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 248, 240, 0.3) 0%,
        rgba(255, 248, 240, 0.6) 50%,
        rgba(255, 248, 240, 0.95) 100%
    );
}

/* Placeholder for missing hero image */
.hero-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary), #FFD4E0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-family: var(--font-heading);
}

.hero-bg img:not([src=""]):not([src$="undefined"]) + .hero-placeholder {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 1rem 1.5rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 2rem;
    }
}

.hero h1 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .hero h1 {
        margin-bottom: 1rem;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--color-text);
    font-style: italic;
    opacity: 0.9;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
}

@media (min-width: 768px) {
    .scroll-indicator {
        bottom: 2rem;
    }
}

.chevron {
    width: 24px;
    height: 24px;
    border-right: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

.chevron:nth-child(2) {
    animation-delay: 0.2s;
    opacity: 0.6;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(8px);
    }
    60% {
        transform: rotate(45deg) translateY(4px);
    }
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: 5rem 0;
    position: relative;
    z-index: 2;
    background: var(--color-background);
}

.about-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-text h2 {
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

.about-text blockquote {
    font-size: 1.125rem;
    color: var(--color-text);
}

.about-text blockquote p {
    margin-bottom: 1rem;
}

.about-text blockquote p:last-child {
    margin-bottom: 0;
}

.about-portrait {
    position: relative;
}

.about-portrait img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.portrait-placeholder {
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.about-portrait img:not([src=""]):not([src$="undefined"]) + .portrait-placeholder {
    display: none;
}

/* Character Card */
.character-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

.character-card h3 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.character-stats {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .character-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat dt {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat dd {
    color: var(--color-text);
}

/* ========================================
   Friends Section
   ======================================== */
.friends {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--color-background) 0%, #FFF0F5 100%);
    position: relative;
    z-index: 2;
}

.friends-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .friends-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.friend-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.friend-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

/* Character accent colors */
.friend-card--haruko {
    border-top: 4px solid #9B2D86;
}

.friend-card--yuzuki {
    border-top: 4px solid #F5A623;
}

.friend-card--ayame {
    border-top: 4px solid #7B3FA0;
}

.friend-card--mio {
    border-top: 4px solid #E06B8F;
}

.friend-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

@media (min-width: 768px) {
    .friend-image {
        aspect-ratio: 4/5;
    }
}

.friend-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.friend-card--haruko .friend-placeholder {
    background: linear-gradient(135deg, #9B2D86, #D4619C);
}

.friend-card--yuzuki .friend-placeholder {
    background: linear-gradient(135deg, #F5A623, #FFCC80);
}

.friend-card--ayame .friend-placeholder {
    background: linear-gradient(135deg, #7B3FA0, #A855C7);
}

.friend-card--mio .friend-placeholder {
    background: linear-gradient(135deg, #E06B8F, #F8A5B8);
}

.friend-image img:not([src=""]):not([src$="undefined"]) + .friend-placeholder {
    display: none;
}

.friend-info {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .friend-info {
        padding: 1.5rem;
    }
}

.friend-info h3 {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.friend-card--haruko .friend-info h3 { color: #9B2D86; }
.friend-card--yuzuki .friend-info h3 { color: #F5A623; }
.friend-card--ayame .friend-info h3 { color: #7B3FA0; }
.friend-card--mio .friend-info h3 { color: #E06B8F; }

.friend-emoji {
    font-size: 1.25rem;
}

.friend-nickname {
    display: block;
    font-size: 0.875rem;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.friend-relationship {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--color-background);
    color: var(--color-text);
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.friend-info p {
    color: var(--color-text);
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery {
    padding: 5rem 0;
    background: var(--color-background);
    position: relative;
    z-index: 2;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-card);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn:focus {
    background: var(--color-primary);
    color: white;
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
}

/* Character-specific filter colors when active */
.filter-btn--mina.active { background: var(--color-primary); }
.filter-btn--haruko.active { background: #9B2D86; }
.filter-btn--yuzuki.active { background: #F5A623; }
.filter-btn--ayame.active { background: #7B3FA0; }
.filter-btn--mio.active { background: #E06B8F; }

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

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.gallery-item img:not([src=""]):not([src$="undefined"]) + .gallery-placeholder {
    display: none;
}

.gallery-item.hidden {
    display: none;
}

/* ========================================
   Story Section
   ======================================== */
.story {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--color-background) 0%, #FFF0F5 100%);
    position: relative;
    z-index: 2;
}

.story-accordion {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.story-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    cursor: pointer;
    list-style: none;
}

.story-accordion summary::-webkit-details-marker {
    display: none;
}

.story-accordion summary h2 {
    color: var(--color-secondary);
    margin: 0;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform var(--transition-normal);
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: var(--color-primary);
    border-radius: 2px;
}

.accordion-icon::before {
    width: 100%;
    height: 3px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.accordion-icon::after {
    width: 3px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    transition: transform var(--transition-normal);
}

.story-accordion[open] .accordion-icon::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.story-content {
    padding: 0 2rem 2rem;
}

.story-content p {
    margin-bottom: 1rem;
    color: var(--color-text);
    line-height: 1.7;
}

.story-content p:last-child {
    margin-bottom: 0;
}

.story-philosophy {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-style: italic;
    color: var(--color-secondary);
}

/* ========================================
   Links Section (Linktree-style)
   ======================================== */
.links {
    padding: 3rem 0;
    background: var(--color-background);
    position: relative;
    z-index: 2;
}

/* Hero position variant - more compact, centered */
.links--hero {
    padding: 1.5rem 0 2.5rem;
    background: linear-gradient(180deg, rgba(255, 248, 240, 0.95) 0%, var(--color-background) 100%);
}

@media (min-width: 768px) {
    .links--hero {
        padding: 2rem 0 3rem;
    }
}

.links--hero .links-grid {
    gap: 0.75rem;
}

.links-grid {
    display: grid;
    gap: 1rem;
    max-width: 420px;
    margin: 0 auto;
}

/* Explore more link */
.explore-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: var(--color-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
    transition: all var(--transition-normal);
}

.explore-more:hover {
    opacity: 1;
    gap: 0.75rem;
}

.explore-more svg {
    transform: rotate(-90deg);
    transition: transform var(--transition-normal);
}

.explore-more:hover svg {
    transform: rotate(-90deg) translateX(3px);
}

.platform-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: var(--color-card);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
    border-left: 4px solid transparent;
}

.platform-link:hover,
.platform-link:focus {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

/* Larger on desktop */
@media (min-width: 768px) {
    .platform-link {
        padding: 1rem 1.5rem;
    }
}

.platform-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.platform-icon svg {
    width: 100%;
    height: 100%;
}

.platform-name {
    font-weight: 600;
    font-family: var(--font-heading);
    flex-shrink: 0;
}

.platform-desc {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: auto;
    white-space: nowrap;
}

@media (min-width: 480px) {
    .platform-desc {
        font-size: 0.85rem;
    }
}

/* Platform Colors */
.platform-link--instagram {
    border-left-color: #E1306C;
}
.platform-link--instagram .platform-icon {
    color: #E1306C;
}

.platform-link--patreon {
    border-left-color: #FF424D;
}
.platform-link--patreon .platform-icon {
    color: #FF424D;
}

.platform-link--fanvue {
    border-left-color: #6366F1;
}
.platform-link--fanvue .platform-icon {
    color: #6366F1;
}

.platform-link--deviantart {
    border-left-color: #05CC47;
}
.platform-link--deviantart .platform-icon {
    color: #05CC47;
}

.platform-link--kofi {
    border-left-color: #FF5E5B;
}
.platform-link--kofi .platform-icon {
    color: #FF5E5B;
}

.platform-link--redbubble {
    border-left-color: #E41321;
}
.platform-link--redbubble .platform-icon {
    color: #E41321;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 3rem 0;
    background: linear-gradient(180deg, #FFF0F5 0%, var(--color-primary) 100%);
    text-align: center;
    position: relative;
    z-index: 2;
}

.signature {
    font-family: var(--font-signature);
    font-size: 1.75rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-card);
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
}

.footer-social a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    color: var(--color-secondary);
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.lightbox:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========================================
   Focus States
   ======================================== */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}
