:root {
    --main-black: #1f1f1f;
    --light-gray: #f7f7f5;
    --text-gray: #5a5a5a;
    --ko-primary: #27445C;
    --ko-accent: #E4572E;
    --ko-gold: #C9A227;
    --ko-border: #e6e2dc;
}

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    color: var(--main-black);
    line-height: 1.85;
    background: white;
    letter-spacing: 0.02em;
    padding-top: 64px;
}

h1, h2, .section-title-jp {
    font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Hiragino Mincho', serif;
}

/* Buttons */
.btn-primary-ko {
    background: var(--ko-accent);
    border-color: var(--ko-accent);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.btn-primary-ko::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.5s;
}
.btn-primary-ko:hover::before {
    left: 100%;
}
.btn-primary-ko:hover,
.btn-primary-ko:focus {
    background: #d14525;
    border-color: #d14525;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(228, 87, 46, 0.35);
}
.btn-outline-ko {
    color: var(--ko-primary);
    border-color: var(--ko-primary);
    border-width: 2px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
}
.btn-outline-ko::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--ko-primary);
    transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
    transform: translate(-50%, -50%);
    z-index: -1;
}
.btn-outline-ko:hover::before {
    width: 300%;
    height: 300%;
}
.btn-outline-ko:hover,
.btn-outline-ko:focus {
    color: #fff;
    background: var(--ko-primary);
    border-color: var(--ko-primary);
}

/* Skip link */
.skip-link{
    position:absolute;
    left:-9999px;
    top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{left:16px; top:76px; width:auto; height:auto; z-index:1100; background:#fff; padding:8px 12px; border:2px solid var(--ko-primary); border-radius:6px;}

/* Hero Section - 和風デザイン */
.hero-section {
    min-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #fafaf8 0%, #ffffff 100%);
    padding: 80px 20px;
}

.hero-brush-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-width: 500px;
    height: auto;
    z-index: 0;
    opacity: 0;
    animation: brushAppear 2s ease-out 0.3s forwards;
}

.brush-image {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply;
    filter: contrast(1.2);
    animation: brushFloat 8s ease-in-out infinite;
}

@keyframes brushAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
    }
    100% {
        opacity: 0.08;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes brushFloat {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
}

@keyframes brush-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-vertical-text {
    writing-mode: vertical-rl;
    font-family: 'Noto Serif JP', serif;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--ko-primary);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.vertical-char {
    display: inline-block;
    animation: charFade 0.6s ease-out forwards;
    opacity: 0;
}

.vertical-char:nth-child(1) { animation-delay: 0.7s; }
.vertical-char:nth-child(2) { animation-delay: 0.85s; }
.vertical-char:nth-child(3) { animation-delay: 1s; }
.vertical-char:nth-child(4) { animation-delay: 1.15s; }
.vertical-char:nth-child(5) { animation-delay: 1.3s; }

@keyframes charFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.hero-main-content {
    flex: 1;
    max-width: 700px;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.4;
}

.hero-section .subtitle {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 60px;
    letter-spacing: 1px;
}

.hero-section .description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 2;
}

.hero-seal {
    position: absolute;
    bottom: -20px;
    right: 60px;
    opacity: 0;
    animation: sealAppear 1s ease-out 1.8s forwards;
}

.hero-seal svg {
    filter: drop-shadow(0 4px 12px rgba(228, 87, 46, 0.2));
}

.hero-seal circle,
.hero-seal text {
    animation: sealPulse 3s ease-in-out infinite;
}

@keyframes sealAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes sealPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Section Common */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

section {
    padding: 100px 0;
    position: relative;
    scroll-margin-top: 80px;
}

.footer {
    scroll-margin-top: 80px;
}

/* Reveal on scroll */
.reveal{opacity:0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease;}
.reveal.is-visible{opacity:1; transform: translateY(0);}

.section-bg-text {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8rem;
    font-weight: 700;
    color: #f8f8f8;
    z-index: 0;
    pointer-events: none;
}

.section-title-jp {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

/* Pick Up */
.pickup-grid{
    display:grid; grid-template-columns: repeat(3,1fr); gap: 28px;
}
.pickup-card{background:#fff; border:1px solid var(--ko-border); border-radius:10px; overflow:hidden; box-shadow:0 4px 16px rgba(0,0,0,.04);}
.pickup-card img{width:100%; height:220px; object-fit:cover; display:block;}
.pickup-body{padding:16px 18px 20px;}
.pickup-title{font-size:1.1rem; margin:0 0 8px;}
.pickup-excerpt{color:var(--text-gray); font-size:.95rem; margin-bottom:12px;}

/* Floating CTA */
.floating-cta{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:1080;
    animation: floatingBounce 3s ease-in-out infinite;
}
.floating-cta .btn{
    box-shadow: 0 12px 35px rgba(228, 87, 46, 0.4);
    padding: 16px 32px 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--ko-accent) 0%, #d14525 100%);
    border: none;
    position: relative;
    overflow: visible;
}

/*.floating-cta .btn::before {*/
/*    content: '✉';*/
/*    position: absolute;*/
/*    left: -35px;*/
/*    top: 50%;*/
/*    transform: translateY(-50%);*/
/*    font-size: 2rem;*/
/*    opacity: 0.95;*/
/*    background: linear-gradient(135deg, var(--ko-accent) 0%, #d14525 100%);*/
/*    width: 50px;*/
/*    height: 50px;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    border-radius: 50%;*/
/*    box-shadow: 0 8px 20px rgba(228, 87, 46, 0.3);*/
/*}*/
.floating-cta .btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 16px 45px rgba(228, 87, 46, 0.5);
}

@keyframes floatingBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Service Cards */
.service-item {
    margin-bottom: 80px;
}

.service-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.service-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.service-number {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.service-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.service-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    padding: 0;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.service-features li {
    padding: 5px 0;
}

.service-features li::before {
    content: '・';
    margin-right: 5px;
}

/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.work-item {
    text-decoration: none;
    color: inherit;
}

.work-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: opacity 0.3s;
}

.work-item:hover img {
    opacity: 0.8;
}

.work-title {
    font-size: 0.9rem;
    text-align: center;
    color: var(--main-black);
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.blog-card {
    text-decoration: none;
    color: inherit;
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.6;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.blog-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--main-black);
    text-decoration: underline;
}

/* Button */
.btn-more {
    display: inline-block;
    padding: 12px 40px;
    background: var(--main-black);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.btn-more:hover {
    opacity: 0.8;
    color: white;
}

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

/* Footer */
.footer {
    background: #2c2c2c;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Hiragino Mincho', serif;
}

.footer p {
    font-size: 0.85rem;
    line-height: 2;
    color: #ccc;
}

.footer-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #444;
    text-align: center;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.85rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.8rem;
    color: #999;
}

/* Navigation */
.navbar {
    background: #fff;
    font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Hiragino Mincho', serif;
}

.navbar .navbar-brand {
    color: var(--main-black);
    font-size: 1.3rem;
    font-weight: 700;
}

.navbar .nav-link {
    color: var(--main-black);
    font-weight: 500;
    margin-left: 12px;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
    color: var(--ko-primary);
}

/* ヘッダーの無料相談ボタン */
.navbar .nav-link.btn-primary-ko {
    margin-left: 20px;
    padding: 8px 20px !important;
    border-radius: 25px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 991px){
    .pickup-grid{grid-template-columns:1fr 1fr;}
    .pickup-card img{height:200px;}
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        gap: 30px;
    }

    .hero-vertical-text {
        font-size: 2rem;
        writing-mode: horizontal-tb;
        letter-spacing: 0.5em;
    }

    .hero-seal {
        position: static;
        margin-top: 30px;
    }

    .hero-seal svg {
        width: 80px;
        height: 80px;
    }

    .section-bg-text {
        font-size: 3rem;
    }

    .works-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .service-images {
        grid-template-columns: 1fr;
    }

    .floating-cta .btn::before {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        left: -30px;
    }

    .floating-cta .btn {
        padding: 14px 28px 14px 18px;
        font-size: 1rem;
    }
}

@media (max-width: 575px){
    .pickup-grid{grid-template-columns:1fr;}
}


.hero-cta {
    margin-top: 50px;
}

.hero-cta .btn {
    padding: 18px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(228, 87, 46, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: 0.05em;
}

.hero-cta .btn-primary-ko {
    background: var(--ko-accent);
    border: 2px solid var(--ko-accent);
}

.hero-cta .btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(228, 87, 46, 0.3);
}

/* Sponsor section (Haisai Tanteidan) */
.sponsor-section {
  background: #fff;
}
.sponsor-section .eyebrow{
  font-size: .85rem;
  letter-spacing: .12em;
  color: var(--ko-primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.sponsor-cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.sponsor-card{
  position: relative;
  border: 1px solid var(--ko-border);
  border-radius: 12px;
  padding: 20px 20px 16px;
  background: linear-gradient(180deg, #fff, #fffefb);
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.sponsor-card-title{
  font-size: 1.15rem;
  margin: .25rem 0 .75rem;
}
.sponsor-card ul{padding-left: 1.1rem; margin-bottom: .75rem;}
.sponsor-card li{margin-bottom: .35rem;}
.sponsor-note{color: var(--text-gray); font-size: .95rem; margin: 0;}
.badge-tier{
  position:absolute;
  top: -12px; right: 16px;
  padding: 6px 10px;
  font-size: .75rem;
  font-weight: 700;
  color:#fff;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.bg-gold{ background: linear-gradient(135deg, #C9A227, #E3C86E); color:#3b2f09; }
.bg-silver{ background: linear-gradient(135deg, #C0C0C0, #E6E6E6); color:#2f2f2f; }
.bg-bronze{ background: linear-gradient(135deg, #CD7F32, #E5A36F); color:#3a2512; }

.sponsor-box{
  border: 1px dashed var(--ko-border);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}
.sponsor-box-title{
  font-size: 1.05rem; margin-bottom: .5rem;
}
.sponsor-cta{ display:flex; align-items:center; flex-wrap:wrap; gap:12px; }

.sponsor-faq summary{
  cursor: pointer;
  font-weight: 700;
  color: var(--main-black);
}
.sponsor-faq{ border-top: 1px solid var(--ko-border); padding-top: 12px; }

@media (max-width: 992px){
  .sponsor-cards{grid-template-columns: 1fr 1fr;}
}
@media (max-width: 575px){
  .sponsor-cards{grid-template-columns: 1fr;}
}



/* Header Estimate button: brand-consistent outline variant (no fill on hover) */
/* Keeps text readable (ko-primary) while using ko-gold as an accent border */
.btn-outline-estimate {
  color: var(--ko-primary);
  border-color: var(--ko-gold);
  border-width: 2px;
  background-color: transparent;
}
.btn-outline-estimate:hover,
.btn-outline-estimate:focus {
  background-color: transparent; /* do not fill on hover */
  color: var(--ko-primary);
  border-color: #b38f1f; /* slightly darker than ko-gold for feedback */
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.20);
}
.btn-outline-estimate:focus-visible {
  outline: 2px solid var(--ko-gold);
  outline-offset: 2px;
}
/* Ensure consistent behavior inside the white navbar */
.navbar .btn.btn-outline-estimate {
  background-color: transparent;
}


/* ----------------------------------------
   Works detail pages (templates/works_*) heading spacing & accent
   Make h2 blocks feel less cramped with extra breathing room and a subtle accent.
   Scoped to the section that follows .kv to avoid affecting other pages. 
---------------------------------------- */
section.kv + section h2 {
    margin-top: 2rem;           /* add space before each section heading */
    margin-bottom: 0.75rem;     /* gentle space below heading */
    line-height: 1.35;          /* slightly taller lines for multi-line headings */
}
@media (min-width: 768px){
    section.kv + section h2 { margin-top: 2.25rem; }
}
/* Decorative accent underline for headings */
section.kv + section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-top: 0.5rem;
    background: linear-gradient(90deg, var(--ko-accent), rgba(228,87,46,0.25));
    border-radius: 2px;
}
/* Improve immediate content spacing after headings */
section.kv + section h2 + p,
section.kv + section h2 + ul,
section.kv + section h2 + .row,
section.kv + section h2 + .accordion {
    margin-top: 0.75rem;
}
/* Sidebar small headings within works pages */
section.kv + section .col-lg-4 h2 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Suppress decorative underline in sidebar small headings */
section.kv + section .col-lg-4 h2::after { display: none; }
