/* =====================================================
   Shinji Komiya — Portfolio (Redesign)
   Modern developer-portfolio design system
   ===================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --bg:           #0B0B0D;
  --bg-soft:      #111114;
  --surface:      #16161A;
  --surface-2:    #1C1C22;
  --border:       rgba(255,255,255,0.08);
  --border-mid:   rgba(255,255,255,0.14);
  --text:         #ECECEE;
  --text-dim:     #A0A0A8;
  --text-mute:    #6A6A73;
  --accent:       #F5B942;
  --accent-soft:  rgba(245,185,66,0.12);
  --accent-line:  rgba(245,185,66,0.35);

  --font-sans: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', ui-monospace, monospace;

  --max: 1160px;
  --gut: 28px;
  --radius: 14px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* 微細なグリッド背景（開発者風） */
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

::selection { background: var(--accent); color: #111; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(72px, 12vw, 140px); }
.section--tight { padding-block: clamp(56px, 9vw, 96px); }

/* ---------- Section label (// 001 — works) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent-line);
}

.heading {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.heading--center { text-align: center; }

.lead {
  color: var(--text-dim);
  font-size: clamp(15px, 1.6vw, 17px);
  max-width: 60ch;
}

/* =====================================================
   日本語の読みやすい改行（文節で折り返す / 行頭の孤立語を防ぐ）
   ※未対応ブラウザでは従来の折り返しに自動フォールバック
   ===================================================== */
.heading, .hero__title, .cta__title, .page-hero__title,
.step__title, .feature__title, .about-name {
  text-wrap: balance;
}
.hero__desc, .lead, .about-bio, .step__text, .feature__text,
.cta__text, .card__desc, .field__label, .checkrow label,
.footer__tag, .about-bio + ul li {
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: pretty;
}

/* 改行の出し分け（スマホでは余計な改行を隠す） */
@media (max-width: 600px) {
  .hidden-sp { display: none; }
}

/* =====================================================
   Reveal animation
   ===================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-vis { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================
   Header
   ===================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 68px;
  display: flex;
  align-items: center;
  background: rgba(11,11,13,0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(11,11,13,0.82);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gut);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 15px;
}
.nav__brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; background: #fff; padding: 4px; box-shadow: 0 0 0 1px var(--border); }
.nav__brand .dot { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  position: relative;
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.25s, background 0.25s;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.is-active { color: var(--accent); }
.nav__link .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-right: 6px;
}

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav__burger span {
  width: 16px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 800px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px var(--gut);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu__close {
  position: absolute;
  top: 18px; right: var(--gut);
  width: 40px; height: 40px;
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 18px;
}
.menu__list { display: flex; flex-direction: column; gap: 8px; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.menu__link .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.menu__link:hover { color: var(--accent); }

/* =====================================================
   Hero (index)
   ===================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 68px;
  overflow: hidden;
}
/* glow */
.hero::before {
  content: '';
  position: absolute;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  right: -10%; top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(245,185,66,0.10) 0%, transparent 65%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gut);
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
}
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero__status .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #43d17a;
  box-shadow: 0 0 0 0 rgba(67,209,122,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67,209,122,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(67,209,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,209,122,0); }
}
.hero__title {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero__title .accent {
  background: linear-gradient(120deg, var(--accent), #ffd98a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__title .small {
  display: block;
  font-size: clamp(15px, 2.4vw, 22px);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.hero__desc {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 46ch;
  margin-bottom: 36px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__visual {
  position: relative;
  justify-self: center;
}
.hero__card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero__card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}
.hero__card-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.hero__card-bar i:nth-child(1){ background:#ff5f57; }
.hero__card-bar i:nth-child(2){ background:#febc2e; }
.hero__card-bar i:nth-child(3){ background:#28c840; }
.hero__card-bar span { margin-left: auto; }
.hero__card-img { background: #0e0e10; }
.hero__card-img img { width: 100%; filter: contrast(0.95); }

/* ---- slideshow (本人画像) ---- */
.slideshow {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f3efe6;
  overflow: hidden;
}
.slideshow__slide {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s var(--ease), transform 6s linear;
}
.slideshow__slide.is-active { opacity: 1; transform: scale(1); }
.slideshow__dots {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.slideshow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  transition: width 0.3s var(--ease), background 0.3s;
}
.slideshow__dot.is-active { width: 22px; border-radius: 4px; background: var(--accent); }
.hero__code {
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-dim);
}
.hero__code .k { color: #c792ea; }
.hero__code .s { color: var(--accent); }
.hero__code .p { color: #82aaff; }

.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero__scroll::after {
  content: '';
  width: 28px; height: 1px;
  background: var(--text-mute);
  animation: scrollx 1.8s var(--ease) infinite;
  transform-origin: left;
}
@keyframes scrollx { 0%,100%{transform:scaleX(0.3);opacity:.4;} 50%{transform:scaleX(1);opacity:1;} }

@media (max-width: 800px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; width: 100%; }
  .hero__card { max-width: 320px; margin: 0 auto; }
  .hero__scroll { display: none; }
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { background: var(--accent); color: #1a1408; }
.btn--primary:hover { background: #ffc659; }
.btn--ghost { border-color: var(--border-mid); color: var(--text); }
.btn--ghost:hover { background: var(--surface); border-color: var(--text-dim); }

/* =====================================================
   Marquee
   ===================================================== */
.marquee {
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: inline-flex; animation: marquee 26s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-dim);
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  gap: 30px;
}
.marquee__item::after { content: '✦'; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =====================================================
   Philosophy / steps
   ===================================================== */
.steps { display: grid; gap: 0; margin-top: 56px; }
.step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 44px 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--border); }
.step__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  padding-top: 6px;
}
.step__title { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.step__text { color: var(--text-dim); max-width: 60ch; }
@media (max-width: 640px) {
  .step { grid-template-columns: 1fr; gap: 10px; padding: 32px 0; }
}

/* =====================================================
   Works grid
   ===================================================== */
.works-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.works-count {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-mute);
  align-self: flex-end;
}
.works-count__cur { color: var(--accent); }
.works-count__sep { margin: 0 4px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

/* もっとあるよ導線 */
.works-more {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding: 22px 26px;
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.works-more:hover {
  border-color: var(--accent-line);
  border-style: solid;
  background: var(--surface-2);
  transform: translateY(-2px);
}
.works-more__thumbs { display: flex; align-items: center; flex-shrink: 0; }
.works-more__thumbs img,
.works-more__plus {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--surface);
  margin-left: -14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.works-more__thumbs img:first-child { margin-left: 0; }
.works-more:hover .works-more__thumbs img,
.works-more:hover .works-more__plus { border-color: var(--surface-2); }
.works-more__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #1a1408;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}
.works-more__body { flex: 1; min-width: 0; }
.works-more__title { display: block; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.works-more__sub { font-size: 13px; color: var(--text-mute); }
.works-more__arrow {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  display: grid; place-items: center;
  color: var(--accent);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.works-more:hover .works-more__arrow { transform: translateX(4px); background: var(--accent-soft); }

@media (max-width: 600px) {
  .works-more { flex-wrap: wrap; gap: 16px; padding: 18px; }
  .works-more__thumbs { order: 1; }
  .works-more__thumbs img, .works-more__plus { width: 44px; height: 44px; }
  .works-more__arrow { order: 2; margin-left: auto; }
  .works-more__body { order: 3; flex: 1 1 100%; }
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.card:hover { border-color: var(--border-mid); transform: translateY(-4px); }
.card__media {
  position: relative;
  aspect-ratio: 5/4;
  overflow: hidden;
  background: #0e0e10;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.05); }
.card__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11,11,13,0.55));
}
.card__badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(11,11,13,0.7);
  border: 1px solid var(--accent-line);
  padding: 5px 10px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.card__body { padding: 18px 20px 22px; }
.card__title {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-right: 26px; /* 右上の矢印用の余白 */
}
.card__title .ext {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--text-mute);
  transition: color 0.25s, transform 0.25s var(--ease);
}
.card:hover .card__title .ext { color: var(--accent); transform: translate(2px,-2px); }
/* タイトル末尾の「（サンプル）」を下の行に小さく表示 */
.card__sample {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mute);
}
.card__desc { font-size: 13px; color: var(--text-mute); }

/* =====================================================
   About
   ===================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
.about-photo {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.about-photo img { width: 100%; filter: grayscale(30%); }
.about-photo__tag {
  position: absolute;
  left: 14px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(11,11,13,0.7);
  border: 1px solid var(--accent-line);
  padding: 6px 12px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.about-name-en {
  font-family: var(--font-mono);
  color: var(--text-mute);
  letter-spacing: 0.2em;
  font-size: 13px;
  margin-bottom: 8px;
}
.about-name { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 24px; }
.about-bio { color: var(--text-dim); margin-bottom: 28px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 100px;
  transition: color 0.25s, border-color 0.25s;
}
.chip:hover { color: var(--accent); border-color: var(--accent-line); }

/* spec list */
.spec { display: grid; gap: 0; margin-top: 8px; }
.spec__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.spec__row:last-child { border-bottom: 1px solid var(--border); }
.spec__key { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.spec__val { color: var(--text); }
@media (max-width: 640px) {
  .spec__row { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
}

/* strength cards */
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.feature:hover { border-color: var(--border-mid); transform: translateY(-4px); }
.feature__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 18px;
}
.feature__title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.feature__text { font-size: 14px; color: var(--text-dim); }

/* =====================================================
   CTA band
   ===================================================== */
.cta {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 20%, rgba(245,185,66,0.1), transparent 55%),
    var(--surface);
  padding: clamp(40px, 7vw, 80px);
  text-align: center;
  overflow: hidden;
}
.cta__title { font-size: clamp(28px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.cta__text { color: var(--text-dim); margin-bottom: 32px; }

/* =====================================================
   Contact form
   ===================================================== */
.form { max-width: 720px; margin: 0 auto; }
.field { margin-bottom: 22px; }
.field__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.field__req {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 2px 7px;
  border-radius: 5px;
}
.field__opt { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.input, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  transition: border-color 0.25s, background 0.25s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:hover, .textarea:hover { border-color: var(--border-mid); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-soft); }
.textarea { min-height: 160px; resize: vertical; }
.error-message { color: #ff6b6b; font-size: 12.5px; margin-top: 6px; min-height: 1em; }

/* スパム対策：ハニーポット（画面外に隠す。display:noneより検知されにくい） */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

.checkrow { display: flex; align-items: flex-start; gap: 12px; margin: 32px 0; }
.checkrow input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.checkrow label { font-size: 14px; color: var(--text-dim); cursor: pointer; }
.checkrow a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.submit {
  width: 100%;
  background: var(--surface-2);
  color: var(--text-mute);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.25s, color 0.25s, transform 0.2s;
  cursor: pointer;
}
.submit:hover { color: var(--text); }
.submit.is-ready { background: var(--accent); color: #1a1408; cursor: pointer; }
.submit.is-ready:hover { transform: translateY(-2px); background: #ffc659; }

.form-status {
  display: none;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  text-align: center;
}
.form-status.is-error { display: block; background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.3); color: #ff8f8f; }
.form-status.is-success { display: block; background: rgba(67,209,122,0.1); border: 1px solid rgba(67,209,122,0.35); color: #7fe3a6; }

/* privacy overlay */
.overlay {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  padding: 24px;
  overflow-y: auto;
}
.overlay.is-open { display: grid; place-items: start center; }
.overlay__box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  margin: 48px 0;
  padding: 36px;
}
.overlay__box h3 { font-size: 22px; margin-bottom: 8px; }
.overlay__box h4 { font-size: 15px; color: var(--accent); margin-top: 22px; margin-bottom: 8px; }
.overlay__box p { color: var(--text-dim); font-size: 14px; margin-bottom: 10px; }
.overlay__box ul { color: var(--text-dim); font-size: 14px; padding-left: 20px; margin-bottom: 10px; }
.overlay__box ul li { list-style: disc; margin-bottom: 4px; }
.overlay__close {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  padding: 10px 18px;
  border-radius: 100px;
}

/* =====================================================
   Page hero (subpages)
   ===================================================== */
.page-hero { padding: 130px 0 56px; border-bottom: 1px solid var(--border); }
.page-hero__title { font-size: clamp(34px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em; }
.page-hero__crumb {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mute);
  margin-top: 16px;
}
.page-hero__crumb a:hover { color: var(--accent); }
.page-hero__crumb .sep { color: var(--accent); margin: 0 8px; }

/* =====================================================
   Footer
   ===================================================== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 56px 0 36px;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 320px; }
.footer__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 700; }
.footer__logo img { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; background: #fff; padding: 4px; box-shadow: 0 0 0 1px var(--border); }
.footer__tag { color: var(--text-mute); font-size: 14px; }
.footer__nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer__col h5 { font-family: var(--font-mono); font-size: 12px; color: var(--text-mute); letter-spacing: 0.1em; margin-bottom: 14px; text-transform: uppercase; }
.footer__col a { display: block; color: var(--text-dim); font-size: 14px; padding: 5px 0; transition: color 0.25s; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

/* =====================================================
   Page-top button
   ===================================================== */
.totop {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 80;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: #1a1408;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease);
}
.totop.is-show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { transform: translateY(-3px); }

/* =====================================================
   Cursor
   ===================================================== */
.cursor {
  position: fixed;
  left: 0; top: 0;
  width: 34px; height: 34px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  /* left/top をJSで動かし、translateで常に中心を合わせる（サイズが変わってもズレない） */
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              background 0.25s, border-color 0.25s, opacity 0.3s;
  opacity: 0;
  display: none;
}
/* 中心の小さなドット */
.cursor::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: opacity 0.25s;
}
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor.is-ready { opacity: 1; }

/* クリックできる要素にホバー中：大きく広がって塗りつぶしに変化 */
.cursor.is-hover {
  width: 60px; height: 60px;
  background: var(--accent);
  border-color: var(--accent);
  opacity: 0.4;
}
.cursor.is-hover::after { opacity: 0; }

/* =====================================================
   Responsive refinements
   ===================================================== */

/* タブレット */
@media (max-width: 1024px) {
  :root { --gut: 24px; }
  .hero__inner { gap: 36px; }
  .footer__top { gap: 28px; }
}

/* ヒーローが2カラムで最も窮屈な幅帯だけ、コードを少し小さくして1行に収める
   （この範囲以外には影響しない） */
@media (min-width: 801px) and (max-width: 900px) {
  .hero__code { font-size: 11px; line-height: 1.8; }
}

/* 〜横並びが厳しくなる手前 */
@media (max-width: 800px) {
  .hero { min-height: auto; padding-top: 104px; padding-bottom: 64px; }
  .hero__title { font-size: clamp(40px, 11vw, 64px); }
  .hero__card { max-width: 340px; }
}

/* スマホ */
@media (max-width: 600px) {
  :root { --gut: 20px; }
  .section { padding-block: 64px; }
  .section--tight { padding-block: 48px; }
  .page-hero { padding: 100px 0 40px; }

  .hero { padding-top: 96px; }
  .hero__status { font-size: 11.5px; padding: 6px 12px; }
  .hero__desc { font-size: 15px; }

  .marquee { padding: 14px 0; }
  .marquee__item { font-size: 13px; padding: 0 20px; gap: 20px; }

  .works-head { gap: 14px; }
  .grid { gap: 16px; }

  .btn { padding: 13px 22px; font-size: 13.5px; }
  .cta { padding: 36px 22px; border-radius: 18px; }

  .feature { padding: 24px 22px; }
  .overlay__box { padding: 26px 20px; margin: 24px 0; }
  .overlay { padding: 16px; }

  .footer { padding: 44px 0 28px; }
  .footer__top { flex-direction: column; gap: 32px; }
  .footer__nav { gap: 36px; }
  .footer__bottom { flex-direction: column; gap: 6px; }

  .totop { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* 極小スマホ */
@media (max-width: 380px) {
  .hero__title { font-size: 38px; }
  .heading { font-size: 28px; }
  .nav__inner { padding-inline: 16px; }
  .chip { font-size: 11.5px; padding: 6px 11px; }
}

/* 横向き・低い画面でヒーローを詰めすぎない */
@media (max-height: 560px) and (min-width: 801px) {
  .hero { min-height: auto; padding-block: 110px 60px; }
}
