/*
Theme Name: K.V.D Regional Preview
Theme URI: https://tan370580.studio.site
Author: Kaori Matsuda
Author URI: https://tan370580.studio.site
Description: K.Vertrautheit Designの地方創生・地域支援ポートフォリオ非公開プレビュー。公開版を複製して作成。
Version: 1.2.0-preview.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kvd
*/

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #FF5035;
  --color-primary-hover: #e6402b;
  --color-text-dark: #111111;
  --color-text: #222222;
  --color-text-light: #333333;
  --color-white: #FFFFFF;
  --color-bg: #FFFFFF;
  --color-bg-light: #fafafa;
  --color-border: #e0e0e0;
  --font-main: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ============================================
   Typography
   ============================================ */
.section-title {
  font-family: var(--font-en);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-text-dark);
  margin-bottom: 2rem;
}

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

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

/* Keep the inactive-theme preview's header visible below the WP admin bar. */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
  body.admin-bar .main-nav { top: 46px; height: calc(100vh - 46px); }
}

.site-header.scrolled {
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.site-logo {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-text-dark);
}

.site-logo a:hover {
  color: var(--color-primary);
}

.main-nav ul {
  display: flex;
  gap: 2.5rem;
}

.main-nav a {
  font-family: var(--font-en);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-text-dark);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero / Concept Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-label {
  font-family: var(--font-en);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  display: block;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

.hero-title em {
  font-style: normal;
  color: var(--color-primary);
  position: relative;
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary .arrow {
  transition: transform 0.3s ease;
}

.btn-primary:hover .arrow {
  transform: translateX(5px);
}

/* ============================================
   Profile Section
   ============================================ */
.profile {
  padding: 8rem 2rem;
  background: var(--color-bg-light);
}

.profile-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.profile-image {
  flex: 0 0 280px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-white);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

.profile-text {
  flex: 1;
}

.profile-name {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
}

.profile-description {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ============================================
   Work Section
   ============================================ */
.work {
  padding: 8rem 2rem;
  background: var(--color-bg);
}

.work-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.work-description {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 0.95rem;
  line-height: 2;
  color: var(--color-text-light);
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.2rem;
  color: var(--color-text-light);
}

.carousel-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  padding: 8rem 2rem;
  background: var(--color-bg-light);
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.contact-form label .required {
  color: var(--color-primary);
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font-main);
  transition: var(--transition);
  background: var(--color-white);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 80, 53, 0.1);
}

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

.contact-form .privacy-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.contact-form .privacy-check input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
}

.contact-form .privacy-check label {
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 0;
}

.contact-form .privacy-check a {
  color: var(--color-primary);
  text-decoration: underline;
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--color-text-dark);
  color: var(--color-white);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

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

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1rem;
}

/* ============================================
   Profile Detail Page (page-profile.php)
   ============================================ */
.profile-detail {
  padding: 10rem 2rem 6rem;
  max-width: 800px;
  margin: 0 auto;
}

.profile-detail-header {
  text-align: center;
  margin-bottom: 3rem;
}

.profile-detail-name {
  font-family: var(--font-en);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
}

.profile-detail-brand {
  font-family: var(--font-en);
  font-size: 1rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
}

.profile-detail-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 3rem;
  border: 4px solid var(--color-bg-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.profile-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-detail-content {
  line-height: 2.2;
  font-size: 0.95rem;
  color: var(--color-text-light);
  border-top: 3px solid var(--color-primary);
  padding-top: 2rem;
}

.profile-detail-content p {
  margin-bottom: 1.5rem;
}

.profile-detail-cta {
  text-align: center;
  margin-top: 3rem;
}

/* ============================================
   Scroll Animation
   ============================================ */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-loaded .fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.js-loaded .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Work Grid & Browser Cards === */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 2rem;
}
a.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
a.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.work-card-browser { background: #fff; }
.work-card-browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}
.browser-dot { width: 10px; height: 10px; border-radius: 50%; }
.browser-dot.red { background: #ff5f56; }
.browser-dot.yellow { background: #ffbd2e; }
.browser-dot.green { background: #27c93f; }
.work-card-scroll {
    height: 500px;
    overflow: hidden;
    position: relative;
}
.work-card-scroll iframe {
    width: 300%;
    height: 1500px;
    border: none;
    transform: scale(0.3333);
    transform-origin: top left;
    pointer-events: none;
}
.work-card-info { padding: 16px 20px; border-top: 1px solid #eee; }
.work-card-info h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}
.work-card-info p { font-size: 0.78rem; color: #666; line-height: 1.7; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .work-grid { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; }
    .work-card-scroll { height: 400px; }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .main-nav a {
    font-size: 1.1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .profile-inner {
    flex-direction: column;
    text-align: center;
  }

  .profile-image {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .profile-detail {
    padding: 7rem 1.5rem 4rem;
  }

  .profile-detail-name {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }


/* LIVE badge */
.work-card-live {
    margin-left: auto;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #27c93f;
    text-transform: uppercase;
}

/* Site type — screenshot thumbnail */
.work-card--site .work-card-scroll img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

  .carousel-track {
    transition: none;
  }
}



/* LIVE badge */
.work-card-live {
    margin-left: auto;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #27c93f;
    text-transform: uppercase;
}

/* Site type — screenshot thumbnail */
.work-card--site .work-card-scroll img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Regional mission preview: scoped additions to the current published theme. */
:root {
  --preview-ink: #20272a;
  --preview-muted: #526065;
  --preview-line: #dbe1df;
  --preview-warm: #f6f7f4;
  --preview-accent: #bd4b35;
}

section[id] { scroll-margin-top: 92px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
textarea:focus-visible { outline: 3px solid #bd4b35; outline-offset: 4px; }
.section-inner { width: min(1120px, 100%); margin: 0 auto; }
.section-kicker { display: block; margin-bottom: 12px; color: var(--preview-accent); font: 600 .78rem var(--font-main); letter-spacing: .16em; }
.section-intro { max-width: 700px; margin: 0 0 42px; color: var(--preview-muted); font-size: .98rem; }
.text-link { display: inline-flex; align-items: center; gap: .6rem; color: #a43d29; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.text-link:hover { color: #772916; }
.desktop-break { display: inline; }

.hero { min-height: min(800px, 95vh); padding: 110px 24px 80px; }
.hero { background: linear-gradient(145deg, #f3f0e9 0%, #edf2ed 52%, #f8f5ee 100%); }
.hero-bg img { opacity: .09; }
.hero-content { max-width: 900px; }
.hero-label { margin-bottom: 24px; }
.hero-title { margin-bottom: 24px; color: var(--preview-ink); font-size: clamp(2.2rem, 4.2vw, 3.7rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.42; text-wrap: balance; }
.hero-subtitle { color: var(--preview-muted); font-size: clamp(1rem, 1.3vw, 1.17rem); font-weight: 400; line-height: 1.95; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 34px; }
.hero-actions a { min-height: 48px; justify-content: center; }
.hero-actions .btn-outline { background: rgba(255,255,255,.85); }

.profile { padding: 100px 24px; }
.profile-inner { max-width: 1080px; gap: clamp(40px, 7vw, 90px); }
.profile-inner--text-only { max-width: 760px; justify-content: center; }
.profile-inner--text-only .profile-text { max-width: 760px; }
.profile-image { flex-basis: 260px; width: 260px; height: 260px; }
.profile-text { max-width: 640px; }
.profile-text .section-title { font-family: var(--font-main); font-size: clamp(1.65rem, 2.4vw, 2.25rem); font-weight: 600; letter-spacing: .02em; line-height: 1.5; }
.profile-description { margin-bottom: 1rem; color: var(--preview-muted); line-height: 2; }
.profile-text .text-link { margin-top: 12px; }

.services-section, .cases-section, .process-section { padding: 100px 24px; }
.services-section { background: #fff; }
.services-section .section-title, .cases-section .section-title, .process-section .section-title,
.partners-section .section-title { font-family: var(--font-main); font-size: clamp(1.7rem, 2.5vw, 2.35rem); font-weight: 600; letter-spacing: .025em; line-height: 1.5; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-card { display: flex; flex-direction: column; padding: 30px 27px 25px; border: 1px solid var(--preview-line); border-radius: 12px; background: #fff; min-width: 0; }
.service-number { color: var(--preview-accent); font: 500 1.55rem var(--font-en); letter-spacing: .06em; }
.service-card h3 { margin: 10px 0 17px; color: var(--preview-ink); font-size: 1.13rem; line-height: 1.55; }
.service-card p { color: var(--preview-muted); font-size: .88rem; line-height: 1.86; }
.service-card .service-audience { color: #39474b; font-size: .79rem; font-weight: 600; }
.service-card .service-output { margin-top: auto; padding-top: 20px; color: #a43d29; font-size: .78rem; font-weight: 600; }
.services-note { margin-top: 23px; color: var(--preview-muted); font-size: .85rem; }

.work { padding: 100px 24px; background: var(--preview-warm); }
.work .section-kicker { text-align: center; }
.work .section-title { margin-bottom: 14px; }
.work-description { margin-bottom: 12px; }
.work-legend { max-width: 900px; margin: 0 auto 38px; text-align: center; color: var(--preview-muted); font-size: .75rem; line-height: 1.9; }
.work-legend strong { color: #39474b; font-size: .72rem; letter-spacing: .03em; }
.work-grid { gap: 21px; }
.work-grid--safe { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 800px; margin-inline: auto; }
.work-card-scroll { height: 300px; }
.work-card--diagram .work-card-scroll { height: 300px; padding: 25px; background: #edf1ed; }
.work-card-diagram { display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-height: 100%; color: #263b3b; }
.work-card-diagram-label { margin-bottom: 3px; font-family: var(--font-main); font-size: 1.2rem; font-weight: 700; }
.work-card-diagram-step { padding: 9px 13px; border: 1px solid #c8d6cf; border-radius: 7px; background: #fff; font-size: .8rem; }
.work-card-diagram small { margin-top: auto; color: #53635d; font-size: .65rem; }
.work-card-browser-bar { padding: 9px 13px; }
.work-card-type { margin-left: auto; color: #46545a; font-size: .65rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.work-card-info { min-height: 155px; padding: 19px 21px 24px; }
.work-kind { display: block; margin-bottom: 6px; color: #8d3a2a; font-size: .71rem; font-weight: 600; }
.work-card-info h3 { font-size: 1rem; }
.work-card-info p { color: var(--preview-muted); font-size: .8rem; }
a.work-card:focus-visible { outline-offset: 5px; }

.cases-section { background: #fff; }
.case-list { display: grid; gap: 16px; }
.case-card { border: 1px solid var(--preview-line); border-radius: 12px; background: #fff; overflow: hidden; }
.case-card[open] { border-color: #c8d1ce; box-shadow: 0 12px 30px rgba(23,39,40,.06); }
.case-card summary { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 22px; padding: 24px 30px; cursor: pointer; list-style: none; }
.case-card summary::-webkit-details-marker { display: none; }
.case-no { align-self: start; color: var(--preview-accent); font: 500 2.2rem var(--font-en); line-height: 1; }
.case-heading { display: grid; gap: 3px; min-width: 0; }
.case-label { color: #a43d29; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.case-heading strong { color: var(--preview-ink); font-size: 1.2rem; }
.case-heading > span:last-of-type { color: var(--preview-muted); font-size: .86rem; }
.case-heading small { color: #5a6264; font-size: .74rem; }
.case-more { color: #a43d29; font-size: .77rem; font-weight: 600; white-space: nowrap; }
.case-more span { margin-left: 6px; font-size: 1.4rem; vertical-align: middle; }
.case-card[open] .case-more span { display: inline-block; transform: rotate(45deg); }
.case-body { margin: 0 30px 26px 116px; padding-top: 21px; border-top: 1px solid var(--preview-line); }
.case-body > p { max-width: 790px; margin-bottom: 21px; color: var(--preview-muted); font-size: .91rem; }
.case-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 28px; margin-bottom: 22px; }
.case-facts div { min-width: 0; }
.case-facts dt { margin-bottom: 3px; color: var(--preview-ink); font-size: .79rem; font-weight: 700; }
.case-facts dd { color: var(--preview-muted); font-size: .82rem; line-height: 1.8; }

.process-section { background: var(--preview-warm); }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 34px 29px; counter-reset: process; }
.process-grid li { padding: 18px 0 0; border-top: 1px solid #cfd8d4; }
.process-grid li > span { color: var(--preview-accent); font: 500 1.4rem var(--font-en); }
.process-grid h3 { margin: 7px 0 4px; color: var(--preview-ink); font-size: 1rem; }
.process-grid p { color: var(--preview-muted); font-size: .83rem; line-height: 1.8; }
.process-link { margin-top: 35px; }

.partners-section { padding: 74px 24px; background: #e8eee9; }
.partners-inner { width: min(1120px, 100%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 45px; }
.partners-inner > div { max-width: 740px; }
.partners-section .section-title { margin-bottom: 14px; font-size: clamp(1.55rem, 2.2vw, 2.05rem); }
.partners-section p { color: #3e4e51; font-size: .89rem; line-height: 1.95; }
.partners-section .btn-outline { flex: 0 0 auto; background: #fff; min-height: 48px; }

.contact { padding: 100px 24px; }
.contact .section-title { font-family: var(--font-main); font-size: clamp(1.75rem, 2.5vw, 2.35rem); font-weight: 600; letter-spacing: .02em; }
.contact-intro { margin: 0 0 36px; color: var(--preview-muted); font-size: .9rem; line-height: 1.9; text-align: center; }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; gap: 12px; }
  .service-card { padding: 25px 27px; }
  .work-grid { max-width: 650px; }
  .work-grid--safe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-card-scroll { height: 320px; }
  .process-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .partners-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
}
@media (max-width: 768px) {
  .desktop-break { display: none; }
  .hero { min-height: 0; padding: 128px 24px 86px; }
  .hero-content { padding: 0; }
  .hero-title { font-size: clamp(1.75rem, 7.2vw, 2.25rem); line-height: 1.55; }
  .hero-subtitle { font-size: .94rem; line-height: 1.9; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 310px; margin: 29px auto 0; }
  .hero-actions a { width: 100%; }
  .profile, .services-section, .work, .cases-section, .process-section, .contact { padding: 72px 22px; }
  .profile-inner { gap: 30px; }
  .profile-image { flex: 0 0 160px; width: 160px; height: 160px; }
  .profile-text .section-title { font-size: 1.65rem; }
  .profile-description { text-align: left; }
  .services-section .section-title, .cases-section .section-title, .process-section .section-title { font-size: 1.75rem; }
  .section-intro { margin-bottom: 27px; }
  .service-card h3 { font-size: 1.08rem; }
  .work-description { text-align: left; }
  .work-legend { text-align: left; }
  .work-card-scroll { height: min(70vw, 300px); }
  .work-grid--safe { grid-template-columns: 1fr; max-width: 480px; }
  .work-card-info { min-height: 0; }
  .case-card summary { grid-template-columns: 39px minmax(0,1fr); gap: 12px; padding: 20px 17px; }
  .case-no { font-size: 1.65rem; }
  .case-heading strong { font-size: 1.08rem; }
  .case-more { grid-column: 2; }
  .case-body { margin: 0 17px 22px 68px; }
  .case-facts { grid-template-columns: 1fr; gap: 13px; }
  .process-grid { grid-template-columns: 1fr; gap: 18px; }
  .process-grid li { display: grid; grid-template-columns: 35px 1fr; gap: 1px 9px; padding-top: 12px; }
  .process-grid li > span { grid-row: span 2; }
  .process-grid h3 { margin: 0; }
  .process-grid p { grid-column: 2; }
  .partners-section { padding: 65px 22px; }
  .partners-section .btn-outline { width: 100%; justify-content: center; text-align: center; }
  .contact .section-title { font-size: 1.75rem; }
  .contact-intro { text-align: left; }
}
@media (max-width: 420px) {
  .site-logo { font-size: 1.3rem; }
  .hero { padding-inline: 20px; }
  .hero-title { font-size: 1.85rem; }
  .hero-subtitle { font-size: .88rem; }
  .service-card { padding: 22px 20px; }
  .work-grid { gap: 16px; }
  .work-card-type { font-size: .62rem; }
.case-body { margin-left: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-more span { transition: none; }
}

/* Individual cases: text and self-made structure diagrams only. */
.case-detail { padding: 130px 24px 100px; background: #f7f8f5; color: #243638; }
.case-detail-inner { width: min(960px, 100%); margin: 0 auto; }
.case-breadcrumb { margin-bottom: 38px; color: #637173; font-size: .79rem; }
.case-breadcrumb a { color: #a43d29; text-decoration: underline; text-underline-offset: 3px; }
.case-detail-header { max-width: 790px; margin-bottom: 42px; }
.case-detail-header .section-kicker { display: block; margin-bottom: 12px; }
.case-detail-label { display: inline-block; padding: 5px 10px; border: 1px solid #bd6e5b; border-radius: 3px; color: #8f341f; font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.case-detail h1 { margin: 15px 0 12px; font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.3; letter-spacing: .02em; }
.case-detail-lead { max-width: 700px; color: #394b4d; font-size: 1.04rem; line-height: 1.9; }
.case-detail-notice { margin-top: 20px; padding: 13px 17px; border-left: 3px solid #a43d29; background: #fff; color: #3f4d4f; font-size: .86rem; line-height: 1.8; }
.case-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 32px; }
.case-detail-item { padding: 21px 0 24px; border-top: 1px solid #d9e0db; }
.case-detail h2 { margin-bottom: 9px; color: #284743; font-family: var(--font-main); font-size: .91rem; font-weight: 600; letter-spacing: .02em; }
.case-detail-item p, .case-detail-outcome p { color: #4b5a5c; font-size: .88rem; line-height: 1.85; }
.case-flow { margin: 27px 0 37px; padding: 23px 25px; border-radius: 11px; background: #e8eee9; }
.case-flow figcaption { margin-bottom: 16px; color: #284743; font-size: .88rem; font-weight: 700; }
.case-flow ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.case-flow li { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 5px; background: #fff; color: #304648; font-size: .8rem; }
.case-flow li:not(:last-child)::after { content: '→'; color: #a43d29; padding-left: 8px; }
.case-flow p { margin-top: 13px; color: #627072; font-size: .72rem; }
.case-detail-outcome { margin-top: 6px; padding: 23px 25px; border-left: 3px solid #86a497; background: #fff; }
.case-detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 34px; }
.case-detail-actions .btn-primary { min-height: 48px; padding: 11px 19px; }
@media (max-width: 620px) {
  .case-detail { padding: 105px 20px 75px; }
  .case-breadcrumb { margin-bottom: 23px; }
  .case-detail-header { margin-bottom: 27px; }
  .case-detail h1 { font-size: 2rem; }
  .case-detail-lead { font-size: .95rem; }
  .case-detail-grid { grid-template-columns: 1fr; gap: 0; }
  .case-detail-item { padding: 15px 0 18px; }
  .case-flow { margin: 18px 0 27px; padding: 20px 18px; }
  .case-flow ol { display: grid; grid-template-columns: 1fr; }
  .case-flow li { justify-content: space-between; }
  .case-flow li:not(:last-child)::after { content: '↓'; }
  .case-detail-actions { display: grid; gap: 14px; }
  .case-detail-actions .btn-primary { width: 100%; justify-content: center; text-align: center; }
}

/* P0: evidence and career additions; existing K.V.D palette/layout retained. */
.p0-caption { display: block; margin-top: 12px; color: #526363; font-size: .78rem; line-height: 1.8; }
.work-card--evidence .work-card-scroll { padding: 0; overflow: hidden; background: #edf1ed; }
.work-card--evidence .work-card-scroll img { display: block; width: 100%; height: auto; transform: none; }
.p0-status { display: inline-block; margin: 0 0 12px; padding: 4px 10px; border: 1px solid #7b9588; border-radius: 3px; color: #284743; font-size: .75rem; font-weight: 600; }
.p0-status--review { border-color: #bd6e5b; color: #8f341f; }
.p0-evidence-section { padding: 32px 0; border-top: 1px solid #d9e0db; }
.p0-case .p0-evidence-section h2 { font-size: 1.2rem; }
.p0-evidence-section p { margin: 12px 0 20px; color: #4b5a5c; font-size: .9rem; line-height: 1.9; }
.p0-evidence-section figure { margin: 0; min-width: 0; }
.p0-evidence-section img { display: block; width: 100%; height: auto; }
.p0-evidence-section figcaption { margin: 10px 0 20px; color: #526363; font-size: .75rem; line-height: 1.8; }
.p0-site-evidence { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; margin: 24px 0; align-items: start; }
.p0-site-evidence figure > a { display: block; max-height: 440px; overflow: hidden; border: 1px solid #d9e0db; }
.p0-image-evidence { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 32px; margin-top: 20px; }
.p0-image-evidence h3 { color: #284743; font-size: 1rem; line-height: 1.8; }
.p0-case .p0-proposal { max-width: 580px; margin: 24px auto; }
.p0-profile .profile-detail-content { max-width: 760px; }
.p0-profile-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid #d9e0db; }
.p0-profile-section h2 { color: #284743; font-size: 1.2rem; margin-bottom: 22px; }
.p0-career { margin: 0 0 24px; }
.p0-career > div { margin-bottom: 24px; }
.p0-career dt { font-size: .95rem; font-weight: 600; color: #284743; margin-bottom: 6px; }
.p0-career dd { margin: 0; line-height: 1.9; }
.p0-profile .profile-detail-cta { padding: 0 20px; }
.p0-profile .profile-detail-cta a { max-width: 100%; }
.p0-case a:focus-visible, .p0-profile a:focus-visible, .hero-actions a:focus-visible { outline: 3px solid #284743; outline-offset: 5px; }
@media(max-width:620px) {
  .p0-site-evidence { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 12px; }
  .p0-site-evidence figure > a { max-height: 260px; }
  .p0-image-evidence { grid-template-columns: 1fr; gap: 10px; }
  .p0-evidence-section { padding: 25px 0; }
  .p0-profile .profile-detail-name { font-size: clamp(1.5rem, 7vw, 2rem); }
}

@media(max-width:620px) { .hero .desktop-break { display: block; } .profile-text #mission-title { font-size: clamp(1.3rem, 5.5vw, 1.65rem); } }
/* Keep closed mobile navigation out of the keyboard focus order. */
@media(max-width:768px) { .main-nav:not(.open) { visibility: hidden; } .main-nav.open { visibility: visible; } }
