:root {
    --bg: #fff5ef;
    --accent: #f26340;
    --accent-dark: #b54327;
    --text: #31231f;
    --muted: #745b52;
    --card: #ffffff;
    --radius: 1.25rem;
    --max: 1100px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    background: rgba(255, 245, 239, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    animation: fadeInDown 0.8s ease-out;
    transition: all 0.3s ease;
}

.header:hover {
    background: rgba(255, 245, 239, 0.98);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 1.5rem;
    gap: 1.5rem;
}

.header-left {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-right {
    flex: 0 0 auto;
}

.header-logo {
    max-width: 90px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(242, 99, 64, 0.3));
    transition: all 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 16px rgba(242, 99, 64, 0.4));
}

.flag-container {
    display: flex;
    gap: 20px;
    align-items: center;
}

.flag {
    width: 70px;
    height: 44px;
    border-radius: 6px;
    border: 2px solid rgba(242, 99, 64, 0.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.flag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-color: rgba(242, 99, 64, 0.5);
}

.flag-japan {
    background: white;
}

.flag-japan::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c8102e;
    transform: translate(-50%, -50%);
}

.flag-philippines {
    background: linear-gradient(to bottom, #0038a8 0%, #0038a8 50%, #ce1126 50%, #ce1126 100%);
}

.flag-philippines::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 22px 26px 22px 0;
    border-color: #ffffff transparent #ffffff transparent;
}

.flag-philippines::after {
    content: '★';
    position: absolute;
    left: 15%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #ffdd00;
    font-size: 1.4rem;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: transparent;
    color: var(--accent-dark);
    border: 1.5px solid rgba(242, 99, 64, 0.3);
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    white-space: nowrap;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(242, 99, 64, 0.1);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.lang-btn:hover::before {
    width: 100%;
    height: 100%;
    border-radius: 999px;
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8c8c 100%);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(242, 99, 64, 0.3);
}

.lang-btn.active::before {
    display: none;
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at top, #ffb87e 0%, #f26340 40%, #4b1810 100%);
    color: #fff;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 184, 126, 0.1) 0%, transparent 50%);
    animation: shimmer 20s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(10px, 10px);
    }
}

.hero-inner {
    max-width: 600px;
    text-align: left;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-tag {
    text-transform: uppercase;
    letter-spacing: .28em;
    font-size: 0.6rem;
    opacity: .9;
    margin-bottom: 0.8rem;
}

.hero h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0.8rem 0 0.3rem;
    line-height: 1.2;
}

.hero-sub {
    font-weight: 500;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.hero p {
    max-width: 40rem;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.btn-primary {
    display: inline-block;
    margin-top: 1rem;
    background: #fff;
    color: var(--accent);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,.2);
}

/* Video Section */
.video-section {
    max-width: 800px;
    margin: 3rem auto;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 12px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.volume-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.volume-toggle:hover {
    transform: scale(1.1);
}

.volume-icon {
    display: block;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Main */
main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
}

section {
    margin-bottom: 3.2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.1rem;
}

/* Concept Block */
.concept-block {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.8rem 1.7rem 1.9rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.02);
    border: 1px solid rgba(255,255,255,.4);
}

.concept-block small {
    display: inline-block;
    background: rgba(242,99,64,.08);
    padding: .35rem .7rem;
    border-radius: 999px;
    color: var(--accent-dark);
    font-weight: 500;
    margin-bottom: .9rem;
}

/* Story Grid */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}

.card {
    background: var(--card);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.5);
    box-shadow: 0 14px 30px rgba(0,0,0,.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card h3 {
    margin-top: .2rem;
    margin-bottom: .6rem;
    font-size: 1.05rem;
    padding: 0 1.4rem;
}

.card p {
    padding: 0 1.4rem 1.3rem;
}

.badge {
    display: inline-block;
    background: rgba(242,99,64,.12);
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .65rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: .5rem;
    margin-left: 1.4rem;
    margin-top: 1rem;
}

/* Location */
.location {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.4rem 1.4rem 1.4rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.02);
    border: 1px solid rgba(255,255,255,.4);
}

.map-button {
    display: inline-block;
    margin-top: 1rem;
    background: var(--accent);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(242, 99, 64, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.map-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 99, 64, 0.4);
}

/* Footer */
footer {
    background: #2a1b18;
    color: #fff;
    text-align: center;
    padding: 2.5rem 1.5rem 3rem;
}

footer small {
    opacity: .6;
    font-size: .75rem;
}

/* Responsive */
@media (max-width: 900px) {
    .header-container {
        flex-direction: row;
        gap: 1rem;
        padding: 0.4rem 1rem;
    }
    
    .header-left {
        flex: 0 0 auto;
    }
    
    .header-center {
        flex: 1;
        justify-content: center;
    }
    
    .header-right {
        flex: 0 0 auto;
    }
    
    .flag-container {
        gap: 12px;
    }
    
    .flag {
        width: 50px;
        height: 31px;
    }
    
    .flag-japan::after {
        width: 16px;
        height: 16px;
    }
    
    .flag-philippines::before {
        border-width: 15.5px 18px 15.5px 0;
    }
    
    .flag-philippines::after {
        font-size: 1rem;
    }
    
    .header-logo {
        max-width: 70px;
    }
}

@media (max-width: 700px) {
    .hero {
        min-height: 35vh;
        padding: 1.5rem 1rem;
    }
    
    .header-container {
        padding: 0.4rem 0.8rem;
        gap: 0.8rem;
    }
    
    .flag {
        width: 45px;
        height: 28px;
    }
    
    .flag-philippines::after {
        font-size: 0.9rem;
    }
    
    .flag-japan::after {
        width: 14px;
        height: 14px;
    }
    
    .flag-philippines::before {
        border-width: 14px 16px 14px 0;
    }
    
    .header-logo {
        max-width: 60px;
    }
    
    .story-grid {
        grid-template-columns: 1fr;
    }
    
    .lang-btn {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    .language-switcher {
        gap: 5px;
    }
    
    .video-section {
        margin: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.4rem 0.6rem;
        gap: 0.6rem;
    }
    
    .header-logo {
        max-width: 50px;
    }
    
    .flag {
        width: 40px;
        height: 25px;
    }
    
    .flag-container {
        gap: 8px;
    }
    
    .flag-philippines::after {
        font-size: 0.8rem;
    }
    
    .flag-japan::after {
        width: 12px;
        height: 12px;
    }
    
    .flag-philippines::before {
        border-width: 12.5px 14px 12.5px 0;
    }
    
    .lang-btn {
        padding: 3px 6px;
        font-size: 0.6rem;
    }
    
    .language-switcher {
        gap: 4px;
    }
    
    .video-controls {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .volume-slider {
        width: 80px;
    }
}
