:root {
    --color-primary: #000000;
    --color-secondary: #ffffff;
    --color-accent: #333333;
    --color-text: #ffffff;
    --color-text-light: #cccccc;
    --color-bg-dark: #000000;
    --color-white: #ffffff;
    --font-serif: 'Shippori Mincho', serif;
    --font-sans: 'Outfit', 'Noto Sans JP', sans-serif;
    --header-height: 80px;
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s var(--ease-out-expo);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    filter: grayscale(1) contrast(1.2);
    transition: 0.5s;
}

img:hover {
    filter: grayscale(0.2) contrast(1.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* --- Brutalist Components --- */
.btn {
    display: inline-block;
    padding: 16px 40px;
    border: 2px solid var(--color-secondary);
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: 0.3s var(--ease-out-expo);
    text-align: center;
    background: transparent;
    color: var(--color-secondary);
    border-radius: 0;
    /* Sharp corners */
}

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

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.btn-outline {
    border: 2px solid var(--color-secondary);
}

.section-tag {
    display: block;
    color: var(--color-secondary);
    font-weight: 800;
    letter-spacing: 0.3em;
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 60px;
    line-height: 1.2;
    border-left: 8px solid var(--color-secondary);
    padding-left: 30px;
}

/* --- Header & Nav --- */
.header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--color-secondary);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 900;
    color: var(--color-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-list {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-list a {
    font-size: 15px;
    font-weight: 700;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: 0.3s;
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.badge {
    background: #ff0000;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    font-weight: 900;
    margin-left: 8px;
}

/* Mobile Menu */
.menu-trigger {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 30px;
    position: relative;
    cursor: pointer;
}

.menu-trigger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-secondary);
    position: absolute;
    transition: 0.3s;
}

.menu-trigger span:nth-child(1) {
    top: 0;
}

.menu-trigger span:nth-child(2) {
    top: 13px;
}

.menu-trigger span:nth-child(3) {
    bottom: 0;
}

.menu-trigger.is-active span:nth-child(1) {
    transform: rotate(45deg);
    top: 13px;
}

.menu-trigger.is-active span:nth-child(2) {
    opacity: 0;
}

.menu-trigger.is-active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 14px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.mobile-menu.is-open {
    display: flex;
}

.mobile-nav-list {
    text-align: center;
}

.mobile-nav-list li {
    margin-bottom: 30px;
}

.mobile-nav-list a {
    font-size: 32px;
    font-weight: 900;
}

@media (max-width: 991px) {
    .nav {
        display: none;
    }

    .menu-trigger {
        display: block;
    }
}

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) grayscale(1);
    transform: scale(1.1);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero-main {
    font-family: var(--font-serif);
    font-size: 84px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
    text-shadow: 10px 10px 0px rgba(0, 0, 0, 0.5);
}

.hero-sub {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 40px;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .hero-main {
        font-size: 48px;
    }

    .hero-sub {
        font-size: 18px;
    }
}

/* --- Sections --- */
section {
    padding: 140px 0;
}

.bg-dark {
    background: #000000;
}

.bg-deep {
    background: #0a0a0a;
}

/* Stats (Counter) */
.stats {
    border-top: 1px solid var(--color-accent);
    border-bottom: 1px solid var(--color-accent);
}

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

.stats-item {
    text-align: center;
    padding: 40px 0;
}

.stats-num {
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    display: block;
    margin-bottom: 10px;
}

.stats-label {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.2em;
    font-size: 14px;
    color: var(--color-text-light);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stats-num {
        font-size: 60px;
    }
}

/* Activities Grid */
.services-detail-grid {
    display: grid;
    gap: 120px;
}

.service-detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.service-detail-card:nth-child(even) .service-detail-content {
    order: -1;
}

.service-detail-img {
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--color-accent);
}

.service-detail-title {
    font-family: var(--font-serif);
    font-size: 36px;
    margin-bottom: 25px;
}

.service-detail-desc {
    font-size: 18px;
    color: var(--color-text-light);
}

@media (max-width: 820px) {
    .service-detail-card {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-detail-card:nth-child(even) .service-detail-content {
        order: 0;
    }
}

/* Strength Items */
.strength-item {
    display: flex;
    gap: 60px;
    padding: 80px 0;
    border-bottom: 1px solid var(--color-accent);
}

.strength-num {
    font-size: 120px;
    font-weight: 900;
    color: #111;
    line-height: 0.8;
}

.strength-title {
    font-family: var(--font-serif);
    font-size: 32px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .strength-item {
        flex-direction: column;
        gap: 20px;
    }

    .strength-num {
        font-size: 80px;
    }
}

/* Philosophy */
.phil-main-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 100px;
    align-items: center;
}

.phil-visual {
    position: relative;
}

.phil-visual::after {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px solid var(--color-secondary);
    z-index: -1;
}

.phil-title {
    font-family: var(--font-serif);
    font-size: 44px;
    margin-bottom: 40px;
}

.phil-message {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 40px;
    white-space: pre-wrap;
}

@media (max-width: 991px) {
    .phil-main-content {
        grid-template-columns: 1fr;
    }
}

/* SNS Cards */
.sns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.sns-card {
    border: 2px solid var(--color-accent);
    padding: 60px 40px;
    text-align: center;
    transition: 0.4s;
}

.sns-card:hover {
    border-color: var(--color-secondary);
    background: #050505;
}

.sns-name {
    font-family: var(--font-serif);
    font-size: 28px;
    margin-bottom: 20px;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-line {
    width: 200px;
    height: 2px;
    background: #333;
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    animation: load 1.5s infinite;
}

@keyframes load {
    100% {
        left: 100%;
    }
}

.footer {
    padding: 100px 0;
    border-top: 1px solid var(--color-accent);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.footer-address {
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 10px;
}

.copyright {
    text-align: center;
    font-size: 12px;
    color: #444;
}

/* --- Grain Overlay --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grain-y.com/assets/images/grain.png');
    opacity: 0.03;
    pointer-events: none;
    z-index: 10000;
}

/* --- Values Section --- */
.values-section {
    margin-top: 100px;
}

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

.value-card {
    padding: 30px;
    border: 1px solid var(--color-accent);
}

.value-name {
    font-family: var(--font-serif);
    font-size: 24px;
    margin-bottom: 15px;
}

.value-desc {
    color: var(--color-text-light);
    line-height: 1.8;
}

@media (max-width: 768px) {
    }
}

/* Blog Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.blog-card-img {
    height: 200px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-date {
    font-size: 0.875rem;
    color: #888;
    margin-right: 1rem;
}

.blog-card-category {
    font-size: 0.75rem;
    background: #000;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    vertical-align: text-bottom;
}

.blog-card-title {
    font-size: 1.25rem;
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
    color: #000;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    animation: modalSlideUp 0.4s ease forwards;
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.8);
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 0;
}

.modal-text {
    padding: 2rem;
}

.blog-title-large {
    font-size: 1.8rem;
    margin: 1rem 0 1.5rem;
    color: #000;
}

.blog-text-body {
    line-height: 1.8;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .modal-img {
        height: 200px;
    }
    .blog-title-large {
        font-size: 1.5rem;
    }
}