/* ================================================================
   KaleidoFuture v4 — Premium Light Portfolio
   Elliott Mangham-inspired: restraint, typography, confidence.
   ================================================================ */

/* ---------------------------------------------------------------
   Custom Properties
   --------------------------------------------------------------- */
:root {
  --kf-bg:          #ffffff;
  --kf-bg-elevated: #f7f8fa;
  --kf-bg-subtle:   #eef0f4;

  --kf-text:        #0e1117;
  --kf-text-muted:  #5a6270;
  --kf-text-faint:  #9ca3af;

  --kf-accent:      #0d9488;
  --kf-accent-dim:  rgba(13, 148, 136, 0.1);
  --kf-gradient:    linear-gradient(135deg, #0ea5e9, #2dd4bf, #10b981);

  --kf-border:      rgba(0, 0, 0, 0.08);

  --kf-text-xs:   clamp(0.6875rem, 0.625rem + 0.2vw, 0.8125rem);
  --kf-text-sm:   clamp(0.8125rem, 0.75rem + 0.2vw, 0.9375rem);
  --kf-text-base: clamp(0.9375rem, 0.875rem + 0.2vw, 1.0625rem);
  --kf-text-lg:   clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  --kf-text-xl:   clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
  --kf-text-2xl:  clamp(2rem, 1.5rem + 1.5vw, 3rem);
  --kf-text-3xl:  clamp(3rem, 2rem + 3vw, 5.5rem);

  --kf-ease: cubic-bezier(0.39, 0.575, 0.565, 1);
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--kf-bg);
  color: var(--kf-text-muted);
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: var(--kf-text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-menu-open {
  overflow: hidden;
}

::selection {
  background: var(--kf-accent-dim);
  color: var(--kf-text);
}

/* ---------------------------------------------------------------
   Utilities
   --------------------------------------------------------------- */
.u-mono {
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kf-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.kf-container--wide {
  max-width: 1400px;
}

/* Section label + gradient accent line */
.kf-section-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kf-accent);
  margin-bottom: clamp(2rem, 4vh, 3rem);
  padding-bottom: 1rem;
  position: relative;
}

.kf-section-label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 2px;
  background: var(--kf-gradient);
  border-radius: 1px;
}

/* Divider */
.kf-divider {
  height: 1px;
  background: var(--kf-border);
  border: none;
  margin: 0;
}

/* GSAP reveal */
[data-reveal],
[data-reveal-stagger] > * {
  opacity: 0;
}
.no-js [data-reveal],
.no-js [data-reveal-stagger] > * {
  opacity: 1;
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.kf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  transition: background 0.3s var(--kf-ease), backdrop-filter 0.3s var(--kf-ease);
}

.kf-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--kf-border);
}

.kf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.kf-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.kf-header__logo-img {
  height: 70px;
  width: auto;
}

.kf-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.kf-header__nav-list {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.kf-header__nav-list a {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-text-muted);
  text-decoration: none;
  transition: color 0.3s var(--kf-ease);
}

.kf-header__nav-list a:hover {
  color: var(--kf-text);
}

.kf-header__cta-btn {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-accent);
  border: 1px solid var(--kf-accent);
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: background 0.3s var(--kf-ease), color 0.3s var(--kf-ease);
}

.kf-header__cta-btn:hover {
  background: var(--kf-accent);
  color: var(--kf-bg);
}

/* Hamburger */
.kf-header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 1002;
}

.kf-header__hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--kf-text);
  transition: transform 0.3s var(--kf-ease), opacity 0.3s var(--kf-ease);
}

.kf-header__hamburger.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.kf-header__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.kf-header__hamburger.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile menu */
.kf-header__mobile-menu {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--kf-ease);
}

.kf-header__mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.kf-header__mobile-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.kf-header__mobile-list li {
  margin-bottom: 1.5rem;
}

.kf-header__mobile-list a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-xl);
  font-weight: 500;
  color: var(--kf-text);
  text-decoration: none;
  transition: opacity 0.3s var(--kf-ease);
}

.kf-header__mobile-list a:hover {
  opacity: 0.7;
}

.kf-header__mobile-info {
  margin-top: 3rem;
}

.kf-header__mobile-info a {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.kf-hero {
  position: sticky;
  top: 0;
  z-index: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(4rem, 10vh, 8rem);
  background: var(--kf-bg);
  overflow: hidden;
}

.kf-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.kf-hero__bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.kf-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.kf-hero__brand {
  margin: 0 0 clamp(0.5rem, 1vh, 1rem);
}

.kf-hero__brand-name {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--kf-text);
}

.kf-hero__progress {
  width: 200px;
  height: 1px;
  background: var(--kf-accent);
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  transform-origin: left center;
}

.kf-hero__concept {
  font-family: 'Noto Sans JP', 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-xl);
  font-weight: 400;
  color: var(--kf-text-muted);
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-bottom: clamp(1.5rem, 3vh, 2rem);
}

.kf-hero__stats {
  display: flex;
  gap: 0.75rem;
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-text-muted);
  margin-bottom: clamp(2rem, 4vh, 3rem);
  flex-wrap: wrap;
}

.kf-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-accent);
  border: 1px solid var(--kf-accent);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: background 0.3s var(--kf-ease), color 0.3s var(--kf-ease);
}

.kf-hero__cta:hover {
  background: var(--kf-accent);
  color: var(--kf-bg);
}

.kf-hero__cta svg {
  width: 14px;
  height: 14px;
}

/* --- Sections scroll over the sticky hero ---
   Semi-transparent white + blur lets kaleidoscope bleed through readably */
.kf-works,
.kf-news,
.kf-about,
.kf-footer {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ---------------------------------------------------------------
   Credentials
   --------------------------------------------------------------- */
.kf-credentials {
  padding: clamp(6rem, 12vh, 10rem) 0 clamp(4rem, 8vh, 7rem);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.06);
}

.kf-credentials__numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: clamp(3rem, 6vh, 5rem);
}

.kf-credentials__stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-2xl);
  font-weight: 700;
  color: var(--kf-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.kf-credentials__stat-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-text-muted);
  line-height: 1.4;
}

.kf-credentials__disclosures {
  border-top: 1px solid var(--kf-border);
}

.kf-disclosure {
  border-bottom: 1px solid var(--kf-border);
}

.kf-disclosure__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 2vh, 1.5rem) 0;
  cursor: pointer;
  list-style: none;
}

.kf-disclosure__header::-webkit-details-marker {
  display: none;
}

.kf-disclosure__title {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kf-text-muted);
}

.kf-disclosure__toggle {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
  transition: transform 0.3s var(--kf-ease);
}

.kf-disclosure[open] .kf-disclosure__toggle {
  transform: rotate(45deg);
}

.kf-disclosure__body {
  padding-bottom: clamp(1rem, 2vh, 1.5rem);
  color: var(--kf-text-muted);
  font-size: var(--kf-text-sm);
  line-height: 1.8;
}

.kf-disclosure__body p {
  margin: 0 0 0.5rem;
}

/* ---------------------------------------------------------------
   Services
   --------------------------------------------------------------- */
.kf-services {
  padding: clamp(6rem, 12vh, 10rem) 0 clamp(4rem, 8vh, 7rem);
}

.kf-services__list {
  border-top: 1px solid var(--kf-border);
}

.kf-services__row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  align-items: center;
  padding: clamp(1.25rem, 2.5vh, 2rem) 0;
  border-bottom: 1px solid var(--kf-border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s var(--kf-ease);
}

.kf-services__row:hover {
  opacity: 0.6;
}

.kf-services__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-lg);
  font-weight: 500;
  color: var(--kf-text);
  letter-spacing: -0.01em;
}

.kf-services__desc {
  font-size: var(--kf-text-sm);
  color: var(--kf-text-muted);
}

.kf-services__arrow {
  font-size: var(--kf-text-lg);
  color: var(--kf-text-faint);
  transition: transform 0.3s var(--kf-ease);
  line-height: 1;
}

.kf-services__row:hover .kf-services__arrow {
  transform: translate(3px, -3px);
}

/* ---------------------------------------------------------------
   Works
   --------------------------------------------------------------- */
.kf-works {
  padding: clamp(6rem, 12vh, 10rem) 0 clamp(6rem, 10vh, 9rem);
}

.kf-works__carousel {
  display: flex;
  justify-content: safe center;
  gap: clamp(1rem, 2vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.kf-works__carousel::-webkit-scrollbar {
  display: none;
}

.kf-works__card {
  flex: 0 0 clamp(260px, 28vw, 360px);
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.kf-works__card-image {
  aspect-ratio: 4 / 3;
  background: var(--kf-bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: opacity 0.3s var(--kf-ease);
}

.kf-works__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.kf-works__card:hover .kf-works__card-image {
  opacity: 0.7;
}

.kf-works__card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kf-works__card-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.15;
  color: var(--kf-text-faint);
}

.kf-works__card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-base);
  font-weight: 500;
  color: var(--kf-text);
  margin-bottom: 0.25rem;
}

.kf-works__card-type {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------
   About / Profile
   --------------------------------------------------------------- */
/* --- Section watermark numbers --- */
.kf-about,
.kf-works,
.kf-news {
  overflow: hidden;
}

/* Watermark numbers — left-aligned */
.kf-about::before,
.kf-works::before,
.kf-news::before {
  position: absolute;
  left: clamp(0.5rem, 2vw, 2rem);
  top: clamp(1.5rem, 4vh, 3rem);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(8rem, 20vw, 20rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  background: var(--kf-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.05;
}

.kf-about::before  { content: '01'; }
.kf-works::before  { content: '02'; }
.kf-news::before   { content: '03'; }

/* --- Section divider — organic breathing waves --- */
.kf-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(40px, 6vw, 64px);
  pointer-events: none;
}

.kf-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Wave path animations use SMIL <animate> in SVG for Safari compatibility */

/* --- Droplets rising from the wave --- */
.kf-droplet {
  position: absolute;
  bottom: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(45, 212, 191, 0.7), rgba(14, 165, 233, 0.3));
  animation: kf-droplet-rise 6s ease-in-out infinite;
  pointer-events: none;
}

.kf-droplet--sm {
  width: 4px;
  height: 4px;
  animation-duration: 5s;
}

.kf-droplet--xs {
  width: 3px;
  height: 3px;
  animation-duration: 7s;
}

@keyframes kf-droplet-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  15% {
    opacity: 0.8;
    transform: translateY(-4px) scale(1);
  }
  40% {
    opacity: 0.6;
    transform: translateY(-18px) scale(0.9);
  }
  70% {
    opacity: 0.3;
    transform: translateY(-32px) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translateY(-44px) scale(0.3);
  }
}

.kf-about {
  padding: clamp(6rem, 12vh, 10rem) 0 clamp(6rem, 10vh, 9rem);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.06);
}

.kf-about__text {
  font-size: var(--kf-text-lg);
  color: var(--kf-text-muted);
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: clamp(3rem, 6vh, 4rem);
}

.kf-about__text p {
  margin: 0 0 1.25rem;
}

.kf-about__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--kf-border);
  padding-top: clamp(1.5rem, 3vh, 2.5rem);
}

.kf-about__meta-title {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kf-accent);
  margin-bottom: 0.5rem;
}

.kf-about__meta-value {
  font-size: var(--kf-text-sm);
  color: var(--kf-text-muted);
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   News / Blog
   --------------------------------------------------------------- */
.kf-news {
  padding: clamp(6rem, 12vh, 10rem) 0 clamp(4rem, 8vh, 7rem);
}

.kf-news__list {
  border-top: 1px solid var(--kf-border);
}

.kf-news__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: baseline;
  padding: clamp(1rem, 2vh, 1.5rem) 0;
  border-bottom: 1px solid var(--kf-border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s var(--kf-ease);
}

.kf-news__item:hover {
  opacity: 0.6;
}

.kf-news__date {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
  white-space: nowrap;
}

.kf-news__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--kf-text-base);
  font-weight: 500;
  color: var(--kf-text);
  margin: 0;
}

/* ---------------------------------------------------------------
   Footer (with CTA)
   --------------------------------------------------------------- */
.kf-footer {
  padding: clamp(2rem, 4vh, 3rem) clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--kf-border);
}

.kf-footer__inner {
  max-width: 900px;
  margin: 0 auto;
}

.kf-footer__cta {
  margin-bottom: clamp(4rem, 8vh, 6rem);
}

.kf-footer__cta-heading {
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: var(--kf-text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--kf-text);
  margin: 0 0 1rem;
  line-height: 1.15;
}

.kf-footer__cta-text {
  font-size: var(--kf-text-base);
  color: var(--kf-text-muted);
  max-width: 480px;
  margin: 0 0 2rem;
}

.kf-footer__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-accent);
  border: 1px solid var(--kf-accent);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: background 0.3s var(--kf-ease), color 0.3s var(--kf-ease);
}

.kf-footer__cta-btn:hover {
  background: var(--kf-accent);
  color: var(--kf-bg);
}

.kf-footer__cta-btn svg {
  width: 14px;
  height: 14px;
}

.kf-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--kf-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.kf-footer__links {
  display: flex;
  gap: 2rem;
}

.kf-footer__links a {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kf-text-faint);
  text-decoration: none;
  transition: color 0.3s var(--kf-ease);
}

.kf-footer__links a:hover {
  color: var(--kf-text);
}

.kf-footer__copyright {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
}

/* ---------------------------------------------------------------
   Single Post
   --------------------------------------------------------------- */
/* --- Single: article wrapper --- */
.kf-single {
  position: relative;
  z-index: 1;
}

/* --- Single: full-page kaleidoscope background --- */
.kf-single__bg {
  position: fixed;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.kf-single__bg canvas {
  width: 100%;
  height: 100%;
}

/* --- Single: hero header --- */
.kf-single__hero {
  position: relative;
  padding: clamp(8rem, 14vh, 12rem) 0 clamp(3rem, 6vh, 4rem);
}

.kf-single__hero-inner {
  position: relative;
  max-width: 760px;
}

.kf-single__hero .wp-block-post-date {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
  margin-bottom: 0.75rem;
}

.kf-single__progress {
  width: 3rem;
  height: 2px;
  background: var(--kf-gradient);
  margin-bottom: 1.25rem;
}

.kf-single__title {
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: var(--kf-text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--kf-text);
  line-height: 1.3;
  margin: 0;
}

/* --- Single: content grid (TOC + body) --- */
.kf-single__content {
  position: relative;
  padding: clamp(3rem, 6vh, 5rem) 0 clamp(4rem, 8vh, 6rem);
}

.kf-single__grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 3rem;
  align-items: start;
}

/* --- Single: TOC sidebar --- */
.kf-single__toc {
  position: sticky;
  top: 6rem;
}

.kf-single__toc-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--kf-text-xs);
  color: var(--kf-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.kf-single__toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.kf-single__toc-list li {
  padding-left: 1rem;
}

.kf-single__toc-list li.is-h3 {
  padding-left: 1.75rem;
}

.kf-single__toc-list a {
  display: block;
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: 0.8125rem;
  color: var(--kf-text-faint);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.3s var(--kf-ease);
  line-height: 1.4;
}

.kf-single__toc-list a:hover,
.kf-single__toc-list a.is-active {
  color: var(--kf-text);
}

.kf-single__toc-list a.is-active {
  border-left: 2px solid var(--kf-accent);
  margin-left: -1px;
  padding-left: 0;
}

/* --- Single: body --- */
.kf-single__body {
  max-width: 760px;
  font-size: var(--kf-text-base);
  color: var(--kf-text-muted);
  line-height: 1.9;
}

.kf-single__body p {
  margin: 0 0 1.5rem;
}

.kf-single__body h2 {
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: var(--kf-text-xl);
  font-weight: 600;
  color: var(--kf-text);
  margin: clamp(2.5rem, 5vh, 3.5rem) 0 1rem;
  letter-spacing: -0.01em;
}

.kf-single__body h3 {
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  font-size: var(--kf-text-lg);
  font-weight: 600;
  color: var(--kf-text);
  margin: 2rem 0 0.75rem;
}

.kf-single__body code {
  font-family: 'Space Mono', monospace;
  font-size: 0.875em;
  background: var(--kf-bg-elevated);
  color: var(--kf-text);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.kf-single__body a {
  color: var(--kf-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s var(--kf-ease);
}

.kf-single__body a:hover {
  opacity: 0.7;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 768px) {
  .kf-header__logo-img {
    height: 40px;
  }

  .kf-header__nav {
    display: none;
  }

  .kf-header__hamburger {
    display: flex;
  }

  .kf-hero {
    padding-bottom: clamp(3rem, 8vh, 5rem);
  }

  .kf-hero__brand-name {
    font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  }

  .kf-hero__concept {
    font-size: var(--kf-text-lg);
  }

  .kf-credentials__numbers {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .kf-works__carousel {
    padding: 0;
    gap: 1rem;
  }

  .kf-works__card {
    flex: 0 0 80vw;
    scroll-snap-align: center;
  }

  .kf-works__card:first-child {
    margin-left: 10vw;
  }

  .kf-works__carousel::after {
    content: '';
    flex: 0 0 10vw;
  }

  .kf-services__row {
    grid-template-columns: 1fr auto;
  }

  .kf-services__desc {
    display: none;
  }

  .kf-news__item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .kf-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .kf-single__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .kf-single__toc {
    display: none;
  }

  .kf-single__title {
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  }
}
