:root {
    --ink: #07100c;
    --forest: #10281f;
    --moss: #5d7f4f;
    --amber: #f6c35b;
    --coral: #ef735d;
    --cyan: #6ad7d2;
    --paper: #f4f1e8;
    --muted: #aab6a8;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.08);
    --line: rgba(255, 255, 255, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --transition: 260ms cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--white);
    background:
        radial-gradient(circle at 12% 8%, rgba(106, 215, 210, 0.16), transparent 28rem),
        radial-gradient(circle at 82% 12%, rgba(239, 115, 93, 0.14), transparent 25rem),
        linear-gradient(140deg, #07100c 0%, #13251d 45%, #080b0a 100%);
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.site-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 72%);
}

.cursor-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    left: var(--cursor-x, 50%);
    top: var(--cursor-y, 20%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 195, 91, 0.12), transparent 62%);
    pointer-events: none;
    z-index: -1;
}

.navbar {
    padding: 14px 0;
    background: rgba(7, 16, 12, 0.72) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(18px);
}

.brand-logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 900;
    letter-spacing: 0;
}

.brand-logo span,
.text-accent {
    color: var(--amber);
}

.nav-link {
    position: relative;
    margin-left: 1.4rem;
    color: rgba(255,255,255,0.72) !important;
    font-weight: 700;
    letter-spacing: 0;
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--amber), var(--coral));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.hero-section {
    position: relative;
    min-height: 88vh;
    overflow: hidden;
}

.carousel-item img {
    height: 88vh;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05) brightness(0.56);
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(7,16,12,0.92), rgba(7,16,12,0.46) 48%, rgba(7,16,12,0.82)),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 5px);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 780px);
    gap: 28px;
    align-items: center;
    padding-top: 80px;
}

.eyebrow,
.section-label,
.console-label,
.panel-label {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero-title,
.section-title,
.gallery-main-title {
    margin: 0;
    font-family: 'Playfair Display', 'Noto Sans JP', serif;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-title {
    max-width: 760px;
    font-size: clamp(3rem, 6vw, 5.8rem);
    line-height: 1.05;
    text-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

.hero-subtitle,
.gallery-subtitle,
.lead {
    color: rgba(255,255,255,0.76);
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 1.85;
    overflow-wrap: anywhere;
}

.hero-subtitle {
    max-width: 640px;
    margin: 20px 0 26px;
}

.hero-actions,
.gallery-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-main,
.btn-ghost,
.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 13px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 900;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-main {
    background: linear-gradient(135deg, var(--amber), var(--coral));
    color: #07100c;
    box-shadow: 0 18px 42px rgba(246,195,91,0.24);
}

.btn-ghost,
.btn-home {
    border: 1px solid rgba(255,255,255,0.22);
    color: var(--white);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
}

.btn-main:hover,
.btn-ghost:hover,
.btn-home:hover {
    transform: translateY(-3px);
    color: #07100c;
    background: var(--amber);
    box-shadow: 0 18px 46px rgba(0,0,0,0.24);
}

.hero-panel,
.analysis-card,
.link-card,
.news-card,
.timeline-content,
.video-wrapper,
.data-console {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel {
    min-height: 340px;
    padding: 24px;
    border-radius: 8px;
    overflow: hidden;
    min-width: 0;
}

.hero-copy {
    min-width: 0;
}

.panel-scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(106,215,210,0.18), transparent);
    animation: scan 4.8s linear infinite;
}

.metric-list {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.metric-list div {
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
}

.metric-list span {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--amber);
}

.metric-list small {
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    text-align: right;
}

.mini-map {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mini-map span {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(135deg, rgba(106,215,210,0.2), rgba(246,195,91,0.12));
}

section,
.gallery-main-section,
.links-page {
    position: relative;
    padding: 68px 0;
}

.section-head {
    max-width: 820px;
    margin: 0 auto 30px;
    text-align: center;
}

.compact-head {
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(2.1rem, 4vw, 4.6rem);
    line-height: 1.05;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.analysis-card {
    min-height: 210px;
    padding: 24px;
    border-radius: 8px;
}

.analysis-card i,
.link-card i {
    color: var(--amber);
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.analysis-card h3,
.bento-content h3,
.timeline-content h3,
.link-card span,
.gallery-toolbar h2 {
    margin: 0 0 12px;
    font-weight: 900;
}

.analysis-card p,
.news-card p,
.about-section p,
.bento-content p,
.data-console p,
.timeline-content p,
.footer p {
    color: rgba(255,255,255,0.72);
    line-height: 1.85;
}

.news-section {
    padding: 42px 0 12px;
}

.news-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.news-card:hover {
    color: var(--white);
    border-color: rgba(246,195,91,0.55);
    background: linear-gradient(145deg, rgba(246,195,91,0.14), rgba(255,255,255,0.045));
}

.news-card h2 {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 900;
}

.news-card p {
    margin: 0;
}

.news-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: #07100c;
    background: var(--amber);
}

.about-section {
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.04), transparent);
}

.specimen-frame {
    position: relative;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    box-shadow: var(--shadow);
}

.specimen-frame img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.frame-corners::before,
.frame-corners::after {
    content: '';
    position: absolute;
    width: 84px;
    height: 84px;
    border-color: var(--amber);
    border-style: solid;
}

.frame-corners::before {
    top: -10px;
    left: -10px;
    border-width: 2px 0 0 2px;
}

.frame-corners::after {
    right: -10px;
    bottom: -10px;
    border-width: 0 2px 2px 0;
}

.text-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--amber);
    font-weight: 900;
    text-decoration: none;
}

.species-section {
    padding-top: 62px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 16px;
}

.bento-item {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    transform-style: preserve-3d;
    transition: transform var(--transition), border-color var(--transition);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.04) brightness(0.78);
    transition: transform 520ms ease, filter var(--transition);
}

.bento-item:hover {
    border-color: rgba(246,195,91,0.55);
}

.bento-item:hover img {
    transform: scale(1.07);
    filter: saturate(1.18) contrast(1.08) brightness(0.92);
}

.bento-content {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    background: linear-gradient(to top, rgba(7,16,12,0.95), rgba(7,16,12,0.18), transparent);
}

.bento-content span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 900;
}

.item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.item-wide {
    grid-column: span 2;
    display: flex;
    align-items: end;
    padding: 24px;
    overflow: hidden;
}

.item-wide::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent, rgba(246,195,91,0.16), transparent),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 14px);
    pointer-events: none;
}

.breed-section {
    background: rgba(0,0,0,0.18);
}

.breed-timeline {
    position: relative;
    display: grid;
    gap: 18px;
    max-width: 980px;
    margin: 0 auto;
}

.breed-timeline::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(var(--cyan), var(--amber), var(--coral));
}

.timeline-item {
    position: relative;
    padding-left: 70px;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 26px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: #07100c;
    background: var(--amber);
    font-weight: 900;
    box-shadow: 0 0 0 8px rgba(246,195,91,0.12);
}

.timeline-content {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 8px;
}

.timeline-content img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.youtube-section {
    padding-bottom: 78px;
}

.video-wrapper {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px;
    border-radius: 8px;
}

.video-wrapper iframe {
    border-radius: 6px;
}

.gallery-header {
    min-height: 48vh;
    display: flex;
    align-items: end;
    padding: 130px 0 54px;
    background:
        linear-gradient(90deg, rgba(7,16,12,0.9), rgba(7,16,12,0.46)),
        url('img/caruosel1.jpg') center / cover;
}

.gallery-main-title {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.95;
}

.gallery-subtitle {
    max-width: 780px;
    margin: 14px 0 18px;
}

.gallery-controls span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    font-weight: 800;
}

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 22px;
}

.masonry-grid {
    column-count: 4;
    column-gap: 18px;
}

.gallery-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 0 0 18px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    box-shadow: 0 16px 48px rgba(0,0,0,0.22);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.18), transparent 65%);
    transform: translateX(-140%);
    transition: transform 700ms ease;
}

.gallery-item:hover::after {
    transform: translateX(140%);
}

.gallery-item img {
    width: 100%;
    display: block;
    filter: saturate(0.92) contrast(1.05);
    transition: transform 520ms ease, filter var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: saturate(1.18) contrast(1.08);
}

.gallery-item figcaption {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 6px;
    color: #07100c;
    background: var(--amber);
    font-weight: 900;
    font-size: 0.78rem;
}

.links-page {
    min-height: calc(100vh - 160px);
    padding-top: 130px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.link-card {
    min-height: 180px;
    padding: 24px;
    border-radius: 8px;
    text-decoration: none;
}

.link-card span {
    display: block;
    font-size: 1.55rem;
}

.link-card small {
    color: var(--muted);
}

.footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.26);
}

.footer-logo {
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 900;
}

.page-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: #07100c;
    background: var(--amber);
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 620ms ease, transform 620ms ease;
    transition-delay: var(--delay, 0ms);
}

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

@keyframes scan {
    from { transform: translateY(-100%); }
    to { transform: translateY(100%); }
}

@media (max-width: 1200px) {
    .masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .hero-layout,
    .analysis-grid,
    .link-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: auto;
    }

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

    .item-large,
    .item-wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-link {
        margin-left: 0;
    }

    .hero-section,
    .carousel-item img {
        min-height: 760px;
    }

    .hero-overlay {
        align-items: flex-start;
    }

    .hero-layout {
        padding-top: 104px;
        padding-bottom: 44px;
    }

    section,
    .gallery-main-section,
    .links-page {
        padding: 56px 0;
    }

    .gallery-header {
        min-height: 460px;
        padding-top: 120px;
    }

    .bento-grid {
        display: block;
    }

    .bento-item {
        margin-bottom: 18px;
    }

    .timeline-item {
        padding-left: 0;
        padding-top: 60px;
    }

    .breed-timeline::before {
        left: 24px;
    }

    .timeline-content {
        grid-template-columns: 1fr;
    }

    .gallery-toolbar {
        display: grid;
    }

    .news-card {
        display: grid;
    }

    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 520px) {
    .hero-title {
        font-size: clamp(2.65rem, 12vw, 3.25rem);
    }

    .hero-subtitle {
        max-width: 94vw;
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .masonry-grid {
        column-count: 1;
    }

    .hero-actions,
    .gallery-controls {
        display: grid;
    }

    .btn-main,
    .btn-ghost,
    .btn-home {
        width: 100%;
    }

    .hero-panel {
        padding: 24px;
    }

    .metric-list div {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .metric-list small {
        font-size: 0.68rem;
        text-align: left;
    }
}
