/* ===============================
   konae corporate site
   =============================== */

:root {
  --color-bg: #ffffff;
  --color-ink: #1f2823;
  --color-deep: #24382c;
  --color-accent: #4a7a5c;
  --color-muted: #7d857e;
  --color-line: #e0ded6;
  --font-ja: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-en: "Montserrat", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* ぬるっと止まる berg風イージング */
}

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

[hidden] { display: none !important; }

::selection {
  background: var(--color-deep);
  color: #fff;
}


:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ja);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.9;
  letter-spacing: 0.04em;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.pc-only { display: inline; }
.sp-only { display: none; }
@media (max-width: 768px) {
  .pc-only { display: none; }
  .sp-only { display: inline; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}
.header-logo img {
  height: 44px;
  width: auto;
  transition: filter 0.4s ease;
}
.header-nav {
  display: flex;
  gap: 36px;
}
.header-nav a {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.08em;
  position: relative;
  transition: color 0.4s ease;
}
.header-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.header-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* スクロール後のヘッダー（下層ページは常時 .is-solid） */
.site-header.is-solid,
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-line);
}
.site-header.is-solid .header-logo img,
.site-header.is-scrolled .header-logo img { filter: invert(1); }
.site-header.is-solid .header-nav a,
.site-header.is-scrolled .header-nav a { color: var(--color-ink); }
.site-header.is-solid .nav-toggle span { background: var(--color-ink); }

/* ハンバーガー（SP） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 1.5px;
  background: #fff;
  margin: 8px auto;
  transition: transform 0.3s ease, background 0.4s ease;
}
.site-header.is-scrolled .nav-toggle span { background: var(--color-ink); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .header-nav {
    position: fixed;
    inset: 0;
    background: var(--color-deep);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .header-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  .header-nav.is-open a { color: #fff; font-size: 16px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span { background: #fff; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
}

/* ---------- Hero（余白＋大きな角丸の額装） ---------- */
.hero {
  position: relative;
  height: calc(100svh - 108px);
  min-height: 520px;
  margin: 88px 20px 0;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .hero { margin: 76px 12px 0; height: calc(100svh - 88px); border-radius: 20px; }
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 25, 18, 0.45) 0%, rgba(15, 25, 18, 0.35) 60%, rgba(15, 25, 18, 0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px 110px;
  text-align: center;
}
.hero-copy {
  color: #fff;
  writing-mode: vertical-rl; /* 縦書きキャッチ */
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 2.1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
/* 2列縦書き：右列→左列の順に段差をつけて時間差リビール */
.hero-copy span {
  display: block;
  clip-path: inset(0 0 100% 0);
  animation: heroReveal 1.2s var(--ease-out) forwards;
}
.hero-copy span:nth-child(1) { animation-delay: 0.6s; }
.hero-copy span:nth-child(2) {
  margin-top: 2.6em;
  margin-right: 0.9em;
  animation-delay: 0.85s;
}
@keyframes heroReveal {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0% 0); }
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.hero-scroll-line {
  display: block;
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  position: relative;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60%, 100% { top: 100%; }
}
.hero-scroll-text {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.3em;
}

/* ---------- Sections 共通 ---------- */
.section { padding: 120px 0; }
@media (max-width: 768px) { .section { padding: 80px 0; } }

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 56px;
}
.section-label {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  writing-mode: vertical-lr; /* berg風の縦書きラベル */
  padding-top: 6px;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-deep);
  position: relative;
  padding-bottom: 18px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 2px;
  background: var(--color-accent);
}
@media (max-width: 768px) {
  .section-head { flex-direction: column; gap: 8px; }
  .section-label { writing-mode: horizontal-tb; padding-top: 0; }
}

/* スクロールで浮かび上がる */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Service ---------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 768px) {
  .service-grid { grid-template-columns: 1fr; }
}
.service-card {
  background: #fff;
  border: 1px solid var(--color-line); /* 白背景でもカードの輪郭が立つように */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(31, 40, 35, 0.06);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(31, 40, 35, 0.1);
}
.service-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.service-card:hover .service-card-img img { transform: scale(1.04); }
.service-card-body { padding: 32px; }
.service-card-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-deep);
  margin-bottom: 12px;
}
.service-card-text {
  font-size: 14.5px;
  color: var(--color-ink);
  margin-bottom: 24px;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 12px 36px;
  border: 1px solid var(--color-deep);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--color-deep);
  transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover {
  background: var(--color-deep);
  color: #fff;
}
.btn-solid {
  background: var(--color-deep);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-ja);
  padding: 14px 56px;
  font-size: 15px;
}
.btn-solid:hover {
  background: var(--color-accent);
}

/* ---------- Works ---------- */
.works-list {
  display: flex;
  flex-direction: column;
}
.works-item {
  display: grid;
  grid-template-columns: 140px 260px 1fr;
  align-items: start;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--color-line);
}
.works-item:last-child { border-bottom: 1px solid var(--color-line); }
.works-item-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}
.works-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ロゴ画像は切り抜かず、余白付きのロゴカードとして見せる */
.works-item-thumb--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f6f2;
  border: 1px solid var(--color-line);
}
.works-item-thumb--logo img {
  width: 62%;
  height: auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .works-item { grid-template-columns: 1fr; gap: 14px; }
  .works-item-thumb { max-width: 420px; }
}
.works-item-date {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}
.works-item-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-deep);
  margin-bottom: 8px;
}
.works-item-text {
  font-size: 14.5px;
  margin-bottom: 12px;
}
.works-item-link {
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.works-item-link:hover { opacity: 0.7; }

/* ---------- News（berg風：日付＋タイトル＋右端の「+」） ---------- */
.news-list {
  border-top: 1px solid var(--color-line);
}
.news-item { border-bottom: 1px solid var(--color-line); }
.news-item-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-ja);
  color: var(--color-ink);
  text-align: left;
  letter-spacing: 0.04em;
  transition: background 0.3s ease;
}
.news-item-head:hover { background: rgba(74, 122, 92, 0.05); }
.news-item-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.news-item time {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}
.news-item-title { font-size: 15.5px; line-height: 1.9; }
.news-item-plus {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-deep);
  flex-shrink: 0;
  transition: transform 0.5s var(--ease-out);
}
.news-item.is-open .news-item-plus { transform: rotate(45deg); }

/* その場で開くパネル */
.news-item-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-out);
}
.news-item.is-open .news-item-panel { grid-template-rows: 1fr; }
.news-item-panel-inner {
  overflow: hidden;
  min-height: 0;
}
.news-item-panel-inner p {
  font-size: 14.5px;
  color: var(--color-ink);
  padding: 0 8px 24px;
  max-width: 760px;
}
.news-item-panel-inner a {
  color: var(--color-accent);
  border-bottom: 1px solid currentColor;
}
.news-item-panel-inner img {
  max-width: 340px;
  border-radius: 12px;
  margin: 0 8px 28px;
}

/* ---------- Company ---------- */
.company-table {
  max-width: 720px;
  border-top: 1px solid var(--color-line);
}
.company-row {
  display: grid;
  grid-template-columns: 176px 1fr;
  padding: 24px 8px;
  border-bottom: 1px solid var(--color-line);
}
@media (max-width: 768px) {
  .company-row { grid-template-columns: 1fr; gap: 4px; }
}
.company-row dt {
  font-weight: 700;
  color: var(--color-deep);
  letter-spacing: 0.08em;
}
.company-row dd { font-size: 15px; }

/* ---------- Contact ---------- */
.contact-form {
  max-width: 640px;
}
.form-field { margin-bottom: 32px; }
.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-deep);
  margin-bottom: 10px;
}
.required {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: var(--color-accent);
  border-radius: 3px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: 2px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  background: #fff;
  padding: 14px 16px;
  font-family: var(--font-ja);
  font-size: 15px;
  color: var(--color-ink);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(74, 122, 92, 0.12);
}
.form-submit { text-align: center; margin-top: 40px; }
.form-status {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14.5px;
  text-align: center;
  background: rgba(74, 122, 92, 0.1);
  color: var(--color-deep);
}
.form-status.is-error {
  background: rgba(180, 60, 60, 0.08);
  color: #a04040;
}

/* ---------- 下層ページ ---------- */
.subpage {
  padding-top: 72px; /* 固定ヘッダー分 */
  min-height: 60vh;
}
.article-container { max-width: 760px; }
.article-head { margin-bottom: 40px; }
.article-title {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-deep);
  line-height: 1.6;
  margin: 8px 0 16px;
}
.article-date {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}
.article-eyecatch {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(31, 40, 35, 0.08);
}
.article-body p { margin-bottom: 1.4em; font-size: 15.5px; }
.article-body a {
  color: var(--color-accent);
  border-bottom: 1px solid currentColor;
}
.article-back { margin-top: 56px; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-deep);
  color: #d8d9d2;
  padding: 64px 0 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.footer-logo { height: 28px; width: auto; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
}
.footer-nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.footer-nav a:hover { opacity: 1; }
.footer-copy {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

/* アニメーション無効設定の環境ではすべて即時表示（カスケードで勝つよう最後尾に置く） */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy span { animation: none; clip-path: none; }
  .hero-scroll-line::after { animation: none; }
  html { scroll-behavior: auto; }
}
