@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
    --ms-bg: #050505;
    --ms-panel: #111111;
    --ms-border: #333333;
    --ms-cyan: #00F0FF;
    --ms-text: #E0E0E0;
    --ms-text-mute: #888888;
    --ms-font: 'Noto Sans JP', sans-serif;
    --ms-grid-gap: 1px; /* Ultra tight gap for borders */
}

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

body {
    background-color: var(--ms-bg);
    color: var(--ms-text);
    font-family: var(--ms-font);
    line-height: 1.6;
    font-size: 14px; /* Compact text */
    /* Tech Grid Background Pattern */
    background-image: 
        linear-gradient(var(--ms-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--ms-border) 1px, transparent 1px);
    background-size: 40px 40px;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
img { width: 100%; display: block; object-fit: cover; }
ul { list-style: none; }

.ms-ai-wrap {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--ms-bg);
    border-left: 1px solid var(--ms-border);
    border-right: 1px solid var(--ms-border);
    min-height: 100vh;
}

/* HEADER */
.ms-ai-head {
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--ms-border);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.ms-ai-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--ms-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ms-ai-logo img { width: 30px; height: 30px; }

/* Desktop Nav (Hidden on Mobile) */
.ms-ai-desk-nav {
    display: flex;
    gap: 1px;
    background: var(--ms-border); /* Border effect */
    border: 1px solid var(--ms-border);
}
.ms-ai-desk-link {
    background: var(--ms-bg);
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ms-text);
}
.ms-ai-desk-link:hover { color: var(--ms-cyan); background: var(--ms-panel); }

/* Hamburger */
.ms-ai-burger {
    display: none; /* Visible on mobile via media query */
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
    border: 1px solid var(--ms-border);
}
.ms-ai-line { width: 24px; height: 2px; background: var(--ms-cyan); }

/* Mobile Menu */
.ms-ai-mob-menu {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: calc(100vh - 60px);
    background: var(--ms-panel);
    border-left: 1px solid var(--ms-cyan);
    transition: 0.3s ease;
    z-index: 999;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ms-ai-mob-menu.active { right: 0; }
.ms-ai-mob-link {
    padding: 15px;
    border: 1px solid var(--ms-border);
    background: var(--ms-bg);
    font-weight: 700;
    text-transform: uppercase;
}
.ms-ai-mob-link:hover { border-color: var(--ms-cyan); color: var(--ms-cyan); }

/* HERO */
.ms-ai-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    border-bottom: 1px solid var(--ms-border);
}
.ms-ai-hero-txt {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ms-ai-badge {
    background: var(--ms-cyan);
    color: #000;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 8px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 20px;
}
.ms-ai-h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: -1px;
}
.ms-ai-lead {
    font-size: 1rem;
    color: var(--ms-text-mute);
    margin-bottom: 30px;
}
.ms-ai-cta {
    background: var(--ms-border);
    color: var(--ms-cyan);
    padding: 15px 30px;
    border: 1px solid var(--ms-cyan);
    font-weight: 700;
    text-align: center;
    display: inline-block;
    transition: 0.3s;
}
.ms-ai-cta:hover { background: var(--ms-cyan); color: #000; box-shadow: 0 0 15px var(--ms-cyan); }

.ms-ai-hero-img {
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    border-left: 1px solid var(--ms-border);
    filter: grayscale(100%) contrast(120%);
    transition: 0.5s;
}
.ms-ai-hero-img:hover { filter: grayscale(0%) contrast(100%); }

/* BENTO GRID (Services) */
.ms-ai-sect { padding: 40px; border-bottom: 1px solid var(--ms-border); }
.ms-ai-h2 { font-size: 1.8rem; margin-bottom: 30px; padding-left: 10px; border-left: 4px solid var(--ms-cyan); font-weight: 900; }

.ms-ai-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--ms-border);
    border: 1px solid var(--ms-border);
}
.ms-ai-card {
    background: var(--ms-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}
.ms-ai-card:hover { background: var(--ms-panel); }
.ms-ai-card-img {
    height: 140px;
    border: 1px solid var(--ms-border);
    margin-bottom: 15px;
    filter: grayscale(100%);
    transition: 0.3s;
}
.ms-ai-card:hover .ms-ai-card-img { filter: grayscale(0%); border-color: var(--ms-cyan); }
.ms-ai-h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--ms-cyan); }
.ms-ai-p { font-size: 0.85rem; color: var(--ms-text-mute); }

/* ABOUT BLOCK (Dense) */
.ms-ai-about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1px;
    background: var(--ms-border);
    border: 1px solid var(--ms-border);
}
.ms-ai-stat-box {
    background: var(--ms-panel);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.ms-ai-stat-num { font-size: 3rem; font-weight: 900; color: var(--ms-cyan); line-height: 1; }
.ms-ai-stat-lbl { font-size: 0.8rem; color: var(--ms-text-mute); margin-top: 5px; }
.ms-ai-about-txt { background: var(--ms-bg); padding: 30px; }

/* FORM */
.ms-ai-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--ms-border);
    border: 1px solid var(--ms-border);
}
.ms-ai-form-info { background: var(--ms-panel); padding: 40px; }
.ms-ai-form-inputs { background: var(--ms-bg); padding: 40px; }

.ms-ai-label { display: block; margin-bottom: 5px; font-size: 0.8rem; font-weight: 700; color: var(--ms-cyan); }
.ms-ai-inp {
    width: 100%;
    background: #000;
    border: 1px solid var(--ms-border);
    color: #fff;
    padding: 12px;
    margin-bottom: 20px;
    font-family: var(--ms-font);
}
.ms-ai-inp:focus { border-color: var(--ms-cyan); outline: none; }

/* FOOTER */
.ms-ai-foot { background: var(--ms-panel); padding: 40px; border-top: 1px solid var(--ms-border); }
.ms-ai-ft-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.ms-ai-ft-h { font-weight: 700; color: #fff; margin-bottom: 15px; font-size: 0.9rem; }
.ms-ai-ft-l { display: block; color: var(--ms-text-mute); margin-bottom: 8px; font-size: 0.8rem; }
.ms-ai-ft-l:hover { color: var(--ms-cyan); }

@media (max-width: 768px) {
    .ms-ai-desk-nav { display: none; }
    .ms-ai-burger { display: flex; }
    .ms-ai-hero { grid-template-columns: 1fr; }
    .ms-ai-hero-img { border-left: none; border-top: 1px solid var(--ms-border); height: 250px; }
    .ms-ai-bento { grid-template-columns: 1fr; }
    .ms-ai-about-grid { grid-template-columns: 1fr; }
    .ms-ai-form-grid { grid-template-columns: 1fr; }
    .ms-ai-sect { padding: 20px; }
    .ms-ai-h1 { font-size: 2.2rem; }
}