:root {
    --color-black: #111111;
    --color-gray: #f4f4f4;
    --color-dark-gray: #333333;
    --color-white: #ffffff;
    --color-accent: #004085;
    /* Deep Medical Blue */
    --color-border: #111111;

    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;

    --spacing-layout: 120px;
    --spacing-md: 40px;
}

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

body {
    background-color: var(--color-white);
    color: var(--color-black);
    font-family: var(--font-sans);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
}

/* Layout Container */
.lab-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

/* Header */
.lab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
}

.lab-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.logo-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
}

.lab-nav {
    display: flex;
    gap: 30px;
    font-size: 0.9rem;
    font-weight: 500;
}

.lab-nav a:hover {
    color: var(--color-accent);
}

.nav-accent {
    color: var(--color-accent);
    font-weight: 600;
}

.nav-contact {
    border-bottom: 1px solid var(--color-black);
}

/* Hero */
.lab-hero {
    border-bottom: 1px solid var(--color-border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 60vh;
}

.hero-left {
    padding: 80px 40px;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-jp {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-en {
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: #666;
}

.hero-right {
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-gray);
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-family: var(--font-serif);
}

.hero-image-strip {
    height: 300px;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
}

.hero-image-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons */
.btn-lab-primary {
    display: inline-block;
    background: var(--color-black);
    color: var(--color-white);
    padding: 15px 40px;
    font-family: var(--font-serif);
    font-size: 1rem;
    letter-spacing: 0.05em;
}

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

.btn-lab-primary.large {
    padding: 20px 60px;
    font-size: 1.2rem;
}

/* Sections */
.lab-section {
    border-bottom: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: 100px 1fr;
    min-height: 400px;
}

.lab-section.no-border {
    border-bottom: none;
}

.section-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    border-right: 1px solid var(--color-border);
    background: #fcfcfc;
    color: #999;
}

.lab-grid {
    display: grid;
    grid-template-columns: 35% 65%;
}

.grid-title {
    padding: 60px 40px;
    border-right: 1px solid var(--color-border);
}

.grid-title h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.grid-title .jp-sub {
    font-size: 1rem;
    color: #666;
    font-family: var(--font-sans);
}

.grid-content {
    padding: 60px 40px;
}

.lead-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-family: var(--font-serif);
}

/* Pain List */
.lab-dl {
    margin-bottom: 2rem;
}

.lab-dl dt {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--color-black);
    padding-left: 10px;
}

.lab-dl dd {
    padding-left: 14px;
    color: #555;
}

/* Solution Cards */
.solution-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.lab-card {
    border: 1px solid var(--color-border);
    padding: 20px;
    transition: transform 0.2s;
}

.lab-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.card-head {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.lab-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.lab-card p {
    font-size: 0.9rem;
    color: #555;
}

/* Value Table */
.value-row {
    display: flex;
    border-bottom: 1px solid #ccc;
    padding: 30px 0;
}

.value-row:last-child {
    border-bottom: none;
}

.value-head {
    width: 30%;
    font-weight: 900;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.value-body {
    width: 70%;
}

.value-body li {
    margin-bottom: 5px;
    list-style-position: inside;
}

/* Security (Contrast) */
.bg-contrast {
    background: var(--color-black);
    color: var(--color-white);
}

.section-label.text-white {
    background: #222;
    border-color: #444;
    color: #888;
}

.lab-grid.text-white .grid-title {
    border-color: #444;
}

.text-white {
    color: white;
}

.text-gray {
    color: #aaa;
}

.security-diagram {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.sec-point h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    display: inline-block;
}

.sec-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 10px;
}

/* Deployment Table */
.deployment-table-wrapper {
    overflow-x: auto;
}

.lab-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
}

.lab-table th,
.lab-table td {
    padding: 15px;
    border: 1px solid var(--color-border);
    text-align: left;
    font-size: 0.9rem;
    vertical-align: top;
}

.lab-table th {
    background: #f0f0f0;
    font-family: var(--font-serif);
}

.row-head {
    font-weight: bold;
    background: #fafafa;
    width: 15%;
}

.table-note {
    font-size: 0.8rem;
    margin-top: 10px;
    color: #666;
    text-align: right;
}

/* Image Layouts */
.content-split-img {
    display: flex;
    gap: 40px;
    align-items: center;
}

.text-side {
    flex: 1;
}

.img-side {
    flex: 1;
    height: 300px;
}

.img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 1s ease-out 0.5s;
}

.img-side.animate-on-scroll.visible img {
    filter: grayscale(0%);
}

.solution-hero-img {
    width: 100%;
    height: 250px;
    margin-bottom: 40px;
    overflow: hidden;
}

.solution-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 1s ease-out 0.5s;
}

.solution-hero-img.animate-on-scroll.visible img {
    filter: grayscale(0%);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Roadmap Steps */
.step-list {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.step-item {
    border-top: 2px solid var(--color-black);
    padding-top: 10px;
    flex: 1;
}

.step-num {
    font-size: 3rem;
    font-weight: 900;
    color: #ddd;
    font-family: var(--font-serif);
    line-height: 1;
}

.step-detail h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    margin-top: -10px;
}

.step-detail p {
    font-size: 0.85rem;
    color: #666;
}

/* Footer */
.lab-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-black);
    color: var(--color-white);
    padding: 80px 0;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
}

.footer-main {
    width: 50%;
    padding-right: 40px;
}

.footer-main h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.footer-main p {
    margin-bottom: 40px;
    color: #aaa;
}

.footer-info {
    width: 50%;
    display: flex;
    gap: 40px;
    border-left: 1px solid #444;
    padding-left: 40px;
}

.footer-col h4 {
    color: #666;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.footer-col p,
.footer-col a {
    color: #fff;
    font-size: 0.9rem;
}

.copyright {
    margin-top: auto;
    color: #444;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-left,
    .hero-right {
        border-right: none;
        padding: 40px 20px;
    }

    .hero-jp {
        font-size: 3rem;
    }

    .lab-section {
        grid-template-columns: 1fr;
    }

    .section-label {
        writing-mode: horizontal-tb;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 10px 20px;
        text-align: left;
    }

    .lab-grid {
        grid-template-columns: 1fr;
    }

    .grid-title {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 40px 20px;
    }

    .grid-content {
        padding: 40px 20px;
    }

    .solution-cards {
        grid-template-columns: 1fr;
    }

    .security-diagram {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        gap: 40px;
    }

    .footer-main,
    .footer-info {
        width: 100%;
        border-left: none;
        padding-left: 0;
    }

    /* Image Specific Response */
    .content-split-img {
        flex-direction: column;
    }

    .img-side {
        width: 100%;
        margin-top: 20px;
    }
}

/* ------------------------------------------------------------------
   Organic Design System (Apple / Zenn Like)
   ------------------------------------------------------------------ */

.organic-body {
    background-color: #f5f5f7;
    /* Apple-like light gray background */
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.organic-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.organic-container {
    max-width: 640px;
    /* Narrower for focus */
    margin: 60px auto 100px;
    padding: 0 20px;
}

.organic-header {
    text-align: center;
    margin-bottom: 50px;
}

.organic-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.organic-header p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #86868b;
}

.organic-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d1d1f;
}

.form-group label .required {
    color: #0071e3;
    /* Apple Blue */
    margin-left: 4px;
}

.organic-input,
.organic-select,
.organic-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    /* Apple rounded corners */
    background-color: #fff;
    color: #1d1d1f;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    /* Remove default browser styles */
}

/* Custom Select Arrow */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: #86868b;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    pointer-events: none;
}

.organic-textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}

.organic-input:focus,
.organic-select:focus,
.organic-textarea:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    /* Soft blue ring */
}

.organic-input::placeholder,
.organic-textarea::placeholder {
    color: #86868b;
}

.btn-organic-submit {
    display: block;
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background-color: #0071e3;
    /* Apple Blue */
    border: none;
    border-radius: 999px;
    /* Pill shape */
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 32px;
}

.btn-organic-submit:hover {
    background-color: #0077ed;
}

.btn-organic-submit:active {
    transform: scale(0.98);
}

.organic-footer {
    text-align: center;
    margin-top: 60px;
    color: #86868b;
    font-size: 0.8rem;
}

.organic-footer a {
    color: #0071e3;
    text-decoration: none;
}

.organic-footer a:hover {
    text-decoration: underline;
}

/* ===============================================
   MedLocal LP Enhancement Styles
   =============================================== */

/* Context Callout Box */
.context-callout {
    background: #f8f9fa;
    border-left: 4px solid var(--color-accent);
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 0 8px 8px 0;
}

.context-callout h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.context-callout p {
    font-size: 1rem;
    color: #444;
    line-height: 1.8;
}

/* Badge */
.badge {
    background: var(--color-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-important {
    background: var(--color-accent);
}

/* AI Paradox Diagram */
.paradox-diagram {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin: 30px 0;
}

.paradox-box {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.paradox-box-general {
    background: #e8f4ff;
}

.paradox-box-medical {
    background: #f5f5f5;
}

.paradox-box strong {
    display: block;
    margin-bottom: 8px;
}

.paradox-box span {
    font-size: 0.9rem;
    color: #555;
}

.paradox-divider {
    font-size: 2rem;
    color: #ccc;
}

@media (max-width: 900px) {
    .paradox-diagram {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .paradox-divider {
        display: none;
    }
}

/* Timeline Roadmap */
.timeline-roadmap {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding-top: 40px;
}

.timeline-connector {
    position: absolute;
    top: 70px;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--color-accent) 0%,
        var(--color-accent) 75%,
        #ddd 75%,
        #ddd 100%
    );
    z-index: 1;
}

.roadmap-step {
    position: relative;
    padding: 0 10px;
    text-align: center;
    z-index: 2;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--color-white);
    border: 3px solid var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-accent);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.roadmap-step:hover .step-number {
    background: var(--color-accent);
    color: var(--color-white);
    transform: scale(1.1);
}

.step-duration {
    font-size: 0.75rem;
    color: #888;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 12px;
}

.step-content {
    text-align: left;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    min-height: 180px;
}

.step-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-black);
}

.step-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.step-deliverables {
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-deliverables li {
    font-size: 0.8rem;
    color: #777;
    padding: 4px 0 4px 18px;
    position: relative;
}

.step-deliverables li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* Optional step styling */
.roadmap-optional .step-number {
    border-style: dashed;
    border-color: #bbb;
    color: #888;
}

.roadmap-optional .step-content {
    background: transparent;
    border-style: dashed;
    border-color: #ccc;
}

/* Timeline Mobile */
@media (max-width: 900px) {
    .timeline-roadmap {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-left: 60px;
        padding-top: 0;
    }

    .timeline-connector {
        top: 0;
        bottom: 0;
        left: 30px;
        right: auto;
        width: 3px;
        height: auto;
        background: linear-gradient(
            to bottom,
            var(--color-accent) 0%,
            var(--color-accent) 75%,
            #ddd 75%,
            #ddd 100%
        );
    }

    .roadmap-step {
        text-align: left;
        padding: 0;
    }

    .step-marker {
        position: absolute;
        left: -60px;
        top: 0;
        margin-bottom: 0;
    }

    .step-content {
        min-height: auto;
    }
}

/* Value Cards Enhanced */
.value-card {
    background: #f8fbff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.value-card-mgmt {
    background: #f8f8f8;
}

.value-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
}

.value-item:last-child {
    margin-bottom: 0;
}

.value-tag {
    background: var(--color-accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

.value-tag-mgmt {
    background: #333;
}

.value-item-content strong {
    display: block;
    margin-bottom: 4px;
}

.value-item-content span {
    font-size: 0.9rem;
    color: #666;
}

.value-head-enhanced {
    color: var(--color-accent);
    margin-bottom: 5px;
}

.value-head-subtitle {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-top: 5px;
    font-weight: 400;
}

/* Security Visual Diagram */
.security-visual {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
}

.network-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.network-node {
    flex: 1;
    padding: 20px;
}

.network-node-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
}

.network-node strong {
    display: block;
    color: #fff;
}

.network-node span {
    font-size: 0.8rem;
}

.node-medlocal {
    background: rgba(0, 64, 133, 0.2);
    border: 2px solid var(--color-accent);
    border-radius: 8px;
}

.node-medlocal strong {
    color: var(--color-accent);
}

.node-internet {
    opacity: 0.4;
}

.connection {
    flex: 0 0 100px;
    position: relative;
}

.connection-line {
    border-top: 2px dashed var(--color-accent);
    width: 100%;
}

.connection-label {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.connection-blocked .connection-line {
    border-top: 3px solid #666;
}

.connection-blocked .connection-x {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #888;
    font-size: 1.5rem;
    font-weight: bold;
}

.connection-blocked .connection-label {
    background: #444;
    color: #aaa;
    top: 10px;
}

@media (max-width: 900px) {
    .network-diagram {
        flex-direction: column;
        gap: 20px;
    }

    .connection {
        transform: rotate(90deg);
        flex: 0 0 60px;
    }
}

/* Hero Value List */
.hero-value-list {
    list-style: none;
    margin: 30px 0;
    padding: 0;
}

.hero-value-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.hero-value-list .check {
    color: var(--color-accent);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Enhanced Lab Card Hover */
.lab-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--color-accent);
}

/* Improved Lead Text */
.lead-text-enhanced {
    font-size: 1.3rem;
    margin-bottom: 50px;
    line-height: 1.9;
}