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

:root {
  --bg: #fafbfc;
  --ink: #1a1d21;
  --ink-soft: #4a4f57;
  --ink-faint: #8a9099;
  --line: #e3e6ea;
  --accent: #1a1d21;
  --white: #ffffff;
  --font-en: "Inter", sans-serif;
  --font-ja: "Zen Kaku Gothic New", sans-serif;
  --maxw: 720px;
  --gutter: 24px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  overflow-x: hidden;
  font-family: var(--font-ja);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}

.logo {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.logo span { color: var(--ink-faint); }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-family: var(--font-en);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--white) !important;
  background: var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
}

/* ===== Layout ===== */
main {
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ===== Hero ===== */
.hero { padding: 96px 0 110px; }

.eyebrow {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(1.55rem, 4.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.01em;
  margin-bottom: 26px;
}

.hero-lead {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.75; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); }

/* ===== Sections ===== */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  font-family: var(--font-en);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 36px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.section-title .ja {
  font-family: var(--font-ja);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: none;
}

.section-note {
  margin-top: 28px;
  font-size: 0.86rem;
  color: var(--ink-faint);
  line-height: 2;
}

/* ===== Mini title ===== */
.mini-title {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.mini-title::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  vertical-align: middle;
  margin-right: 12px;
}
.about-text + .mini-title { margin-top: 56px; }

/* ===== Services ===== */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  counter-reset: svc;
}
.service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
  counter-increment: svc;
}
.service::before {
  content: counter(svc, decimal-leading-zero);
  display: block;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.service dt {
  font-weight: 700;
  margin-bottom: 8px;
}
.service dd {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.8;
}

/* ===== Works ===== */
.works-group {
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 36px 0 14px;
}
.works-group:first-of-type { margin-top: 0; }
.works-list { display: grid; gap: 14px; }
.work {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 24px 22px;
}
.work-name { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.work-tech {
  font-family: var(--font-en);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.work-desc { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.8; }

/* ===== Skills ===== */
.skill-rings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 32px 16px;
}
.ring-item { text-align: center; }
.ring {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  transition: transform 0.3s ease;
}
.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle { fill: none; stroke-width: 7; }
.ring-base { stroke: var(--line); }
.ring-line {
  stroke: var(--ink);
  stroke-linecap: round;
  transition: stroke-dasharray 1.4s cubic-bezier(0.3, 0.7, 0.25, 1);
}
.ring .mono {
  position: relative;
  z-index: 1;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.ring-item .name {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.ring-item .years {
  display: block;
  margin-top: 2px;
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ===== About ===== */
.about-text { color: var(--ink-soft); font-size: 0.97rem; }
.about-text + .skill-rings { margin-top: 48px; }

/* ===== Contact ===== */
.contact-lead { color: var(--ink-soft); margin-bottom: 40px; }

.contact-form { display: grid; gap: 22px; max-width: 560px; margin-inline: auto; }
.contact-lead { text-align: center; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 0.85rem;
  font-weight: 500;
}
.field input,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink-soft);
}
.contact-form .btn { justify-self: center; min-width: 220px; }
.form-note { font-size: 0.85rem; color: var(--ink-faint); }

/* 送信結果 */
.form-result {
  max-width: 560px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
}
.form-result.ok { background: #eef7f1; border: 1px solid #b9dcc8; color: #22694a; }
.form-result.ng { background: #fdf0ee; border: 1px solid #eccac4; color: #8c3a2c; }

/* reCAPTCHA の但し書き（バッジは非表示にするため必須） */
.recaptcha-note {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--ink-faint);
  text-align: center;
}
.recaptcha-note a { text-decoration: underline; text-underline-offset: 2px; }
.grecaptcha-badge { visibility: hidden; }

/* ボット避け（人には見えない） */
.field-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== Footer ===== */
.site-footer {
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  font-family: var(--font-en);
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .nav { gap: 14px; }
  .nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 64px 0 80px; }
}

/* ===== Motion ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.service,
.work {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.6s ease;
}
.service:hover,
.work:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(26, 29, 33, 0.07);
  border-color: #ccd2d9;
}
.service::before { transition: transform 0.25s ease; }
.service:hover::before { transform: translateX(6px); }

.caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  background: var(--ink);
  margin-left: 5px;
  vertical-align: -0.12em;
  animation: caret-blink 1.1s steps(2, start) infinite;
}
@keyframes caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 海の背景 */
.sea {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  transform: translateY(var(--py, 0));
}
.blob::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: blob-drift 20s ease-in-out infinite alternate;
}
.b1 { width: 560px; height: 560px; top: -160px; right: -140px; }
.b1::after { background: radial-gradient(circle at 35% 35%, #c9ecf4, transparent 70%); }
.b2 { width: 480px; height: 480px; top: 45%; left: -180px; }
.b2::after { background: radial-gradient(circle at 60% 40%, #d7f1ea, transparent 70%); animation-delay: -7s; }
.b3 { width: 420px; height: 420px; bottom: -140px; right: 12%; }
.b3::after { background: radial-gradient(circle at 40% 60%, #cfe9f5, transparent 70%); animation-delay: -13s; }
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -30px) scale(1.08); }
}

/* 本文の帯（中央約720px）の上では泡をほぼ消す */
.bubbles {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(
    to right,
    #000,
    #000 calc(50% - 430px),
    rgba(0, 0, 0, 0.08) calc(50% - 350px),
    rgba(0, 0, 0, 0.08) calc(50% + 350px),
    #000 calc(50% + 430px),
    #000
  );
  mask-image: linear-gradient(
    to right,
    #000,
    #000 calc(50% - 430px),
    rgba(0, 0, 0, 0.08) calc(50% - 350px),
    rgba(0, 0, 0, 0.08) calc(50% + 350px),
    #000 calc(50% + 430px),
    #000
  );
}
.bubble {
  position: absolute;
  bottom: -50px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 160, 185, 0.55);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95), rgba(210, 238, 246, 0.35) 60%, rgba(170, 215, 230, 0.25));
  box-shadow: inset -2px -3px 4px rgba(120, 180, 200, 0.25);
  animation: bubble-rise ease-in infinite;
}
.bubble:nth-child(1) { left: 3%;  width: 30px; height: 30px; animation-duration: 10s; animation-delay: 0s; }
.bubble:nth-child(2) { left: 8%;  width: 12px; height: 12px; animation-duration: 18s; animation-delay: -6s; }
.bubble:nth-child(3) { left: 14%; width: 22px; height: 22px; animation-duration: 12s; animation-delay: -9s; }
.bubble:nth-child(4) { left: 24%; width: 8px;  height: 8px;  animation-duration: 20s; animation-delay: -3s; }
.bubble:nth-child(5) { left: 36%; width: 14px; height: 14px; animation-duration: 15s; animation-delay: -12s; }
.bubble:nth-child(6) { left: 50%; width: 10px; height: 10px; animation-duration: 17s; animation-delay: -8s; }
.bubble:nth-child(7) { left: 63%; width: 16px; height: 16px; animation-duration: 13s; animation-delay: -5s; }
.bubble:nth-child(8) { left: 74%; width: 9px;  height: 9px;  animation-duration: 19s; animation-delay: -15s; }
.bubble:nth-child(9) { left: 82%; width: 24px; height: 24px; animation-duration: 11s; animation-delay: -2s; }
.bubble:nth-child(10){ left: 88%; width: 7px;  height: 7px;  animation-duration: 22s; animation-delay: -10s; }
.bubble:nth-child(11){ left: 93%; width: 34px; height: 34px; animation-duration: 9s;  animation-delay: -4s; }
.bubble:nth-child(12){ left: 97%; width: 13px; height: 13px; animation-duration: 16s; animation-delay: -7s; }
.bubble:nth-child(13){ left: 6%;  width: 6px;  height: 6px;  animation-duration: 24s; animation-delay: -17s; }
.bubble:nth-child(14){ left: 90%; width: 18px; height: 18px; animation-duration: 14s; animation-delay: -13s; }
@keyframes bubble-rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  6%   { opacity: 1; }
  25%  { transform: translateY(-27vh) translateX(-12px); }
  50%  { transform: translateY(-54vh) translateX(14px); }
  75%  { transform: translateY(-81vh) translateX(-10px); }
  92%  { opacity: 0.8; }
  100% { transform: translateY(-110vh) translateX(10px); opacity: 0; }
}

/* スクロール進捗バー */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ink);
  z-index: 50;
}

/* ロゴのドットがぽよんと跳ねる */
.logo span {
  display: inline-block;
  animation: dot-drop 0.9s cubic-bezier(0.3, 1.6, 0.4, 1) 0.4s both;
}
@keyframes dot-drop {
  0% { transform: translateY(-16px); opacity: 0; }
  60% { transform: translateY(3px); opacity: 1; }
  100% { transform: translateY(0); }
}
.logo:hover span { animation: dot-hop 0.5s ease; }
@keyframes dot-hop {
  40% { transform: translateY(-7px); }
  100% { transform: translateY(0); }
}

/* リングhoverでくるっと */
.ring-item:hover .ring { transform: scale(1.08) rotate(-4deg); }

/* 磁石ボタン・チルトの戻りをなめらかに */
.btn, .nav-cta { transition: transform 0.2s ease, opacity 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ring, .ring-line { transition: none; }
  .caret { animation: none; }
  .service, .work, .service::before { transition: none; }
  .service:hover, .work:hover { transform: none; box-shadow: none; }
  .logo span { animation: none; }
  .ring-item:hover .ring { transform: none; }
  .scroll-progress { display: none; }
  .bubble { animation: none; opacity: 0; }
  .blob::after { animation: none; }
}
