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

:root {
    --navy-dark: #0d1b2a;
    --navy: #1b263b;
    --navy-mid: #2d4057;
    --blue-grey: #3d5a73;
    --accent-light: #1a7ca1;
    --accent: #219ebc;
    --white: #ffffff;
    --section-bg: #203353;
    --news-bg: #5a7b8e;
    --services-bg: #3f4a5e;
    --message-bg: #5a7b8e;
}

body {
    font-family: "LINE Seed JP", sans-serif;
    background: var(--navy-dark);
    color: var(--white);
    line-height: 1.8;
}

/* 波紋エフェクト用 */
.ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--accent-light);
    opacity: 0;
    pointer-events: none;
    animation: rippleEffect 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes rippleEffect {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(20);
        opacity: 0;
    }
}

/* ========== ヘッダー ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 3rem;
    padding-top: 80px;
    background: transparent;
    transition: background 0.3s;
}

header.scrolled {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 3rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
    text-decoration: none;
    line-height: 0;
}

.logo img {
    display: block;
    height: 2rem;
    width: auto;
}

header.scrolled .logo img {
    height: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.3s, opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s, transform 0.2s;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--accent-light);
    color: var(--white);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


/* ========== ヒーロー ========== */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 4rem 6rem;
    background-image: url("images/hero.webp");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-color: var(--navy);
}

.hero-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
}

/* 呼吸するオーバーレイ */
.breathing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(ellipse at center, var(--navy-mid) 0%, transparent 70%);
    animation: breathingPulse 19s ease-in-out infinite;
    pointer-events: none;
}

@keyframes breathingPulse {
    0% {
        opacity: 0.3;
    }

    21% {
        opacity: 0.6;
    }

    58% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.3;
    }
}

/* 星空（コンテンツの上に透明で重ねる） */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--white);
    border-radius: 50%;
    opacity: 0.6;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.9;
    }
}


/* 波のアニメーション */
.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: 1;
    overflow: hidden;
}

.waves svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min-content;
    /* h1 の横幅に合わせるための指定（PC時） */
}

.hero-content h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    /* 改行を禁止し、min-content の基準幅をこのテキストに固定する */
}

.hero-content p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--white);
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    display: inline-block;
    padding: 1em 2em;
    border-radius: 68px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s, transform 0.2s;
}

/* ========== セクション共通 ========== */
section {
    padding: 5rem 2rem;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(1.35rem, 3vw, 1rem);
    font-weight: 700;
    color: var(--white);
    text-align: center;
    margin-bottom: 2.0rem;
    letter-spacing: 0.05em;
}

/* ========== NEWS ========== */
.news {
    background: var(--news-bg);
    padding: 0rem 2rem 5rem;
}

.news .section-inner {
    max-width: 600px;
    padding: 0rem 2rem 0rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem 3rem;
    align-items: start;
}

.news .news-title {
    margin: 0;
}

.news-list {
    min-width: 0;
    max-width: 700px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.news-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.news-date {
    font-size: 0.9rem;
    color: var(--white);
    min-width: 100px;
}

.news-content {
    color: var(--white);
    font-size: 0.95rem;
}

/* ========== ABOUT ========== */
.about {
    position: relative;
    overflow: hidden;
}

.about .section-inner {
    max-width: 600px;
}

.about-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url("images/aboutbg.webp") no-repeat top center;
    background-size: cover;
    opacity: 0.32;
    filter: blur(8px);
    pointer-events: none;
}

.about-content {
    position: relative;
    z-index: 1;
}

.about-content p {
    color: var(--white);
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ========== Message ========== */
.message {
    background: var(--navy-dark);
}

.message .section-inner {
    max-width: 1000px;
}

.message-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.message-info {
    width: 100%;
    text-align: left;
    min-width: 0;
}

.message-info p {
    color: var(--white);
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 1.5rem;
}

.message-info p:last-child {
    margin-bottom: 0;
}

.message-signature-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: flex-end;
}

.message-signature {
    margin: 0;
    color: var(--white);
    font-size: 0.95rem;
    order: 1;
}

.message-photo {
    margin: 0;
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    order: 2;
}

.message-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== Services ========== */
.services {
    background: var(--services-bg);
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: service;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    counter-increment: service;
}

.service-item.visible {
    opacity: 1;
}

.service-item:nth-child(odd) {
    transform: translateX(-80px);
}

.service-item:nth-child(odd).visible {
    transform: translateX(0);
}

.service-item:nth-child(even) {
    transform: translateX(80px);
}

.service-item:nth-child(even).visible {
    transform: translateX(0);
}

.service-item:nth-child(even) {
    direction: rtl;
    transform: translateX(80px);
}

.service-item:nth-child(even)>* {
    direction: ltr;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); */
}

.service-card-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 3;
    /* 高さの固定（従来の padding-bottom: 60% と同じ比率） */
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 画像をはみ出させずに綺麗にトリミング */
    object-position: center;
    display: block;
}

.service-card-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.service-card-01 {
    background: linear-gradient(135deg, #2d4057 0%, #3d5a73 100%);
}

.service-card-02 {
    background: linear-gradient(135deg, #1b263b 0%, #2d4057 100%);
}

.service-card-03 {
    background: linear-gradient(135deg, #3d5a73 0%, #1b263b 100%);
}

.service-text {
    padding: 0.5rem 0;
}

/* 擬似要素でナンバリング（01, 02, 03） */
.service-text::before {
    content: counter(service, decimal-leading-zero);
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--accent-light);
    letter-spacing: 0.1em;
}

.service-text h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.service-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.9;
}

/* ========== Company ========== */
.company {
    background: var(--section-bg);
}

.company-info {
    max-width: 500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
}

.company-info dt,
.company-info dd {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    color: var(--white);
}

.company-info dt {
    font-weight: 700;
}

.company-info dd {
    opacity: 0.95;
}

/* 最後の行の罫線を消す */
.company-info dt:nth-last-child(2),
.company-info dd:last-child {
    border-bottom: none;
}

/* ========== Contact ========== */
.contact {
    background: var(--navy-mid);
}

.contact-text {
    color: var(--white);
    font-size: 1rem;
    line-height: 2;
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-form {
    max-width: 560px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 700;
}

.required {
    background-color: #ff4d4d;
    color: #fff;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: 400;
}

.optional {
    background-color: #999;
    color: #fff;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    color: var(--navy-dark);
}

.form-group textarea {
    min-height: 160px;
    resize: vertical;
}

.submit-btn {
    display: block;
    width: 100%;
    /* max-width: 320px; */
    margin: 2rem auto 1rem;
    padding: 1rem 2rem;
    background: var(--accent-light);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
}

.submit-btn:hover {
    background: #333;
    opacity: 0.95;
}

.privacy-link {
    text-align: center;
    margin-top: 1rem;
}

.privacy-link a {
    color: var(--white);
    font-size: 0.9rem;
    text-decoration: underline;
    opacity: 0.9;
}

.privacy-link a:hover {
    opacity: 1;
}

.contact-success .section-inner,
.contact-success .section-inner h2,
.contact-success .section-inner p {
    text-align: center;
}

.contact-success .btn {
    margin-top: 1rem;
}


/* ========== フッター ========== */
footer {
    background: var(--navy-dark);
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: block;
    text-decoration: none;
    line-height: 0;
}

.footer-logo img {
    display: block;
    height: 1.75rem;
    width: auto;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 700;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== 紙芝居（スタッキング）エフェクト ========== */
.about,
.services,
.message,
.company {
    position: sticky;
    top: 0;
    z-index: 10;
    /* box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.4); */
    will-change: transform;

    /* 画面より短い場合でも空白ができないよう高さを確保＆中央配置 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;

    /* スクロール時にすぐ次のセクションが被さらないための内側の「タメ（余白）」 */
    padding-bottom: 25vh;
}

.contact {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 25vh;
}

/* フッターは紙芝居の動き（被さる動作）を解除し、通常通り下に続くように */
footer {
    position: relative;
    z-index: 10;
}

/* .aboutの透過防止 */
.about {
    background-color: var(--navy-dark);
}

/* ========== レスポンシブ ========== */
/* ========== ハンバーガーメニュー ========== */
.burger-menu {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    position: absolute;
    transition: all 0.3s ease;
}

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

.burger-menu span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

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

.burger-menu.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

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

.burger-menu.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ========== アニメーション ========== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ========== レスポンシブ ========== */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    .hero {
        padding: 6rem 1.5rem 4rem;
        /* 767px以下でセンター寄せ */
        text-align: center;
        /* background-position: left center; */
    }

    .hero-inner {
        justify-content: center;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        text-align: center;
        /* 767px以下でセンター寄せ */
    }

    .hero-content h1 {
        white-space: normal;
        /* スマホ時は改行を許可 */
    }

    .hero-buttons {
        justify-content: center;
        /* 767px以下でセンター寄せ */
    }

    .news .section-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .news .news-title {
        text-align: center;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .service-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        direction: ltr;
    }

    .service-item:nth-child(even) {
        direction: ltr;
    }

    .company-info {
        grid-template-columns: 1fr;
        gap: 0 0.5rem;
    }

    /* 最後の行の罫線を消す */
    .company-info dt:nth-last-child(2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .message-signature-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .message-photo {
        width: 80px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .burger-menu {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(13, 27, 42, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease;
        padding: 2rem;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}