:root {
    --bg-color: #000;
    --bg-alt: #0a0a0a;
    --text-main: #e8e8e8;
    --text-dim: #999;
    --text-accent: #fff;
    --border-color: #222;
    --primary-font: 'Noto Sans JP', sans-serif;
    --display-font: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--primary-font);
    overflow-x: hidden;
    line-height: 1.8;
}

/* ========================================
   ACCESS GATE
   ======================================== */
.gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

.gate-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.gate-content {
    text-align: center;
    font-family: var(--display-font);
    padding: 1rem;
}

.gate-logo img {
    width: 120px;
    margin-bottom: 1.5rem;
}

.gate-message {
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-family: var(--primary-font);
}

#gate-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: #fff;
    font-family: var(--display-font);
    font-size: 1rem;
    letter-spacing: 0.15rem;
    padding: 0.75rem;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
    width: 200px;
    max-width: 80vw;
}

#gate-input:focus {
    border-bottom-color: #fff;
}

.gate-submit {
    display: block;
    margin: 1.5rem auto 0;
    background: transparent;
    border: 1px solid #333;
    color: var(--text-dim);
    padding: 0.6rem 2rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--display-font);
    letter-spacing: 0.15rem;
}

.gate-submit:hover {
    border-color: #fff;
    color: #fff;
}

#gate-error {
    color: #ff4444;
    font-size: 0.7rem;
    margin-top: 1.5rem;
    letter-spacing: 0.1rem;
}

.hidden {
    display: none !important;
}

.hidden-ritual {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Blur Effect */
.blurred {
    filter: blur(15px);
    opacity: 0.3;
    transition: filter 1s ease, opacity 1s ease;
    pointer-events: none;
}

/* ========================================
   LAYOUT
   ======================================== */
.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2.5rem;
    align-items: center;
}

.btn-secondary {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid #333;
    padding: 1rem 2rem;
    font-family: var(--primary-font);
    font-size: 0.8rem;
    letter-spacing: 0.15rem;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    width: 240px;
    box-sizing: border-box;
    text-align: center;
}

@media (min-width: 768px) {
    .btn-secondary {
        width: auto;
        min-width: 200px;
    }
}

.btn-secondary:hover {
    color: var(--text-main);
    border-color: #555;
    background: rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
    /* Desktop specific adjustments if needed */
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1,
h2,
h3 {
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-accent);
}

h2 {
    font-size: 1.5rem;
    font-family: var(--primary-font);
}

strong {
    font-weight: 500;
    color: var(--text-accent);
}

/* ========================================
   HERO SECTION (Mobile First)
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/hero_bg.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
    filter: brightness(0.55) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-color) 0%, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
    z-index: -1;
}

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

.hero-flow {
    display: grid;
    place-items: center;
    min-height: 5rem;
    /* Ensure enough space for 2 lines */
    transition: opacity 0.6s ease;
}

.hero-flow.fade-out {
    opacity: 0;
}

.hero-line {
    grid-area: 1 / 1;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-main);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    text-align: center;
    width: 100%;
}

.hero-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-line.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* Last line emphasis */
.hero-line.emphasis {
    font-size: 1.3rem;
    color: var(--text-accent);
}

.hero-logo-reveal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-logo-reveal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hero-final-logo {
    width: 150px;
    max-width: 60vw;
}

.hero-logo-text {
    font-family: var(--display-font);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.2rem;
    color: var(--text-accent);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    z-index: 10;
}

.scroll-indicator span {
    font-size: 0.6rem;
    letter-spacing: 0.2rem;
    font-family: var(--display-font);
    color: var(--text-main);
}

.scroll-indicator .line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #fff, transparent);
}

/* ========================================
   ANTI-SNS SECTION (Mobile First)
   ======================================== */
.anti-sns {
    padding: 4rem 0;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.anti-sns-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.anti-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.anti-icon {
    font-size: 1.2rem;
    color: #ff5555;
}

.anti-icon-check {
    color: #4488ff;
}

.anti-text {
    font-family: var(--display-font);
    font-size: 1rem;
    letter-spacing: 0.1rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.anti-sub {
    font-family: var(--body-font);
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    color: var(--text-muted);
    font-weight: 300;
}

.anti-message {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 2.2;
    font-weight: 400;
}

/* ========================================
   FEATURES SECTION (Mobile First)
   ======================================== */
.features {
    padding: 4rem 0;
    background: var(--bg-alt);
}

.section-header {
    margin-bottom: 3rem;
}

.section-header.center {
    text-align: center;
}

.label {
    display: block;
    font-size: 0.7rem;
    font-family: var(--display-font);
    color: var(--text-dim);
    letter-spacing: 0.25rem;
    margin-bottom: 0.8rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    text-align: center;
}

.feature-card:hover {
    border-color: #444;
    background: #111;
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: var(--display-font);
    font-size: 1rem;
    letter-spacing: 0.1rem;
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 2;
}

/* ========================================
   HOW IT WORKS SECTION (Mobile First)
   ======================================== */
.how-it-works {
    padding: 4rem 0;
    background: var(--bg-color);
}

.steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.step {
    text-align: center;
    padding: 1.5rem;
    max-width: 280px;
}

.step-number {
    font-family: var(--display-font);
    font-size: 2.5rem;
    font-weight: 200;
    color: #333;
    margin-bottom: 0.8rem;
}

.step-content h3 {
    font-family: var(--display-font);
    font-size: 1.1rem;
    letter-spacing: 0.2rem;
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.step-divider {
    width: 60px;
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ========================================
   SHORE FOCUS SECTION (Mobile First)
   ======================================== */
.shore-focus {
    padding: 4rem 0;
    background: var(--bg-alt);
    text-align: center;
}

.shore-content p {
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-top: 1.2rem;
    line-height: 2;
}

/* ========================================
   CTA SECTION (Mobile First)
   ======================================== */
.cta {
    padding: 5rem 0;
    background: radial-gradient(circle at center, #151515 0%, #000 70%);
    text-align: center;
    position: relative;
}

.cta::before,
.cta::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
}

.cta::before {
    width: 100%;
    height: 1px;
    top: 50%;
}

.cta::after {
    height: 100%;
    width: 1px;
    left: 50%;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid #444;
    color: #fff;
    text-decoration: none;
    font-family: var(--primary-font);
    letter-spacing: 0.15rem;
    font-size: 0.8rem;
    transition: all 0.3s;
    width: 240px;
    box-sizing: border-box;
    text-align: center;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fff;
}

/* ========================================
   FOOTER (Mobile First)
   ======================================== */
footer {
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: #555;
}

.footer-logo {
    font-family: var(--display-font);
    font-weight: 600;
    letter-spacing: 0.2rem;
    margin-bottom: 0.8rem;
    color: #666;
}

.copyright {
    font-size: 0.7rem;
}

/* ========================================
   PWA Modal (Integrated)
   ======================================== */
.pwa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.pwa-modal-content {
    background: #000;
    padding: 3rem 1.5rem;
    border: 1px solid #222;
    border-radius: 4px;
    max-width: 400px;
    width: 85%;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 10, 30, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ritual-icon {
    font-size: 3rem;
    margin-bottom: 2rem;
    display: block;
    width: 100%;
    text-align: center;
}

.gate-message {
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-family: var(--primary-font);
    text-align: center;
    width: 100%;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

.ritual-title {
    font-family: var(--primary-font);
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.15rem;
    line-height: 1.5;
    text-align: center;
    width: 100%;
}

.ritual-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 2;
    margin-bottom: 2.5rem;
    text-align: center;
    width: 100%;
}

.ritual-actions {
    margin-bottom: 1.5rem;
}

.ritual-btn-primary {
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--primary-font);
    font-size: 0.8rem;
    letter-spacing: 0.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    width: 100%;
}

.ritual-btn-primary:active {
    transform: scale(0.98);
}

.ritual-btn-skip {
    background: transparent;
    border: none;
    color: #444;
    font-family: var(--primary-font);
    font-size: 0.65rem;
    letter-spacing: 0.15rem;
    cursor: pointer;
    transition: color 0.3s;
}

.ritual-btn-skip:hover {
    color: var(--text-dim);
}

.ios-guide {
    background: #0a0c10;
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid #1a1c20;
    text-align: left;
}

.ios-guide p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
}

.warning-note {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444 !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    margin-bottom: 1.2rem !important;
    border: 1px solid rgba(255, 0, 0, 0.2);
    padding: 0.8rem;
    border-radius: 4px;
    line-height: 1.4;
}

.ios-guide p:last-child {
    margin-bottom: 0;
}

.ios-icon {
    display: inline-block;
    background: #1a1c20;
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 4px;
    line-height: 18px;
    text-align: center;
    font-weight: bold;
}

/* ========================================
   TABLET+ (min-width: 768px)
   ======================================== */
@media (min-width: 768px) {
    .container {
        padding: 0;
    }

    /* Gate */
    .gate-logo img {
        width: 150px;
        margin-bottom: 2rem;
    }

    .gate-message {
        font-size: 0.75rem;
        letter-spacing: 0.3rem;
        margin-bottom: 2rem;
    }

    #gate-input {
        width: 220px;
    }

    .gate-submit {
        margin: 2rem auto 0;
        padding: 0.6rem 2.5rem;
    }

    /* Hero */
    .hero-content {
        padding: 2rem;
    }

    .hero-flow {
        gap: 0.8rem;
    }

    .hero-line {
        font-size: 1.2rem;
    }

    .hero-line.emphasis {
        font-size: 1.5rem;
    }

    .hero-logo-reveal {
        gap: 1.5rem;
    }

    .hero-final-logo {
        width: 200px;
    }

    .hero-logo-text {
        font-size: 2rem;
        letter-spacing: 0.3rem;
    }

    .scroll-indicator {
        bottom: 40px;
        gap: 10px;
    }

    .scroll-indicator span {
        font-size: 0.65rem;
        letter-spacing: 0.25rem;
    }

    .scroll-indicator .line {
        height: 50px;
    }

    /* Anti-SNS */
    .anti-sns {
        padding: 5rem 0;
    }

    .anti-sns-grid {
        flex-direction: row;
        justify-content: center;
        gap: 3rem;
        margin-bottom: 2.5rem;
    }

    .anti-message {
        font-size: 1rem;
    }

    /* Features */
    .features {
        padding: 6rem 0;
    }

    .section-header {
        margin-bottom: 4rem;
    }

    .label {
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 2rem;
    }

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

    .feature-card {
        padding: 2rem;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .feature-card h3 {
        margin-bottom: 1rem;
    }

    /* How It Works */
    .how-it-works {
        padding: 6rem 0;
    }

    .steps {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
    }

    .step {
        flex: 1;
        min-width: 200px;
        max-width: 280px;
        padding: 2rem;
    }

    .step-number {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .step-content h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .step-divider {
        width: 1px;
        height: auto;
        margin: 0;
        align-self: stretch;
    }

    /* Shore Focus */
    .shore-focus {
        padding: 6rem 0;
    }

    .shore-content p {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    /* CTA */
    .cta {
        padding: 8rem 0;
    }

    .cta-content p {
        margin-bottom: 2rem;
    }

    .btn-primary {
        width: auto;
        min-width: 200px;
        padding: 1rem 3rem;
        letter-spacing: 0.2rem;
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        padding: 3rem 0;
    }

    .footer-logo {
        margin-bottom: 1rem;
    }

    .copyright {
        font-size: 0.75rem;
    }
}

/* ========================================
   DESKTOP (min-width: 1024px)
   ======================================== */
@media (min-width: 1024px) {
    h2 {
        font-size: 2.5rem;
    }

    .hero-line {
        font-size: 1.2rem;
    }

    .hero-line.emphasis {
        font-size: 1.5rem;
    }

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