/* =========================================================
   WAVECLOUD JAPAN — site styles
   Dark, precise, bilingual (EN / JA).
   ========================================================= */

:root {
  --bg: #07080a;
  --bg-2: #0c0e11;
  --bg-3: #121519;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f3f4f6;
  --text-2: #a7acb5;
  --text-3: #6e7480;
  --accent: #7fd6f0;
  --accent-soft: rgba(127, 214, 240, 0.14);
  --green: #3fd68f;
  --red: #ff5d5d;

  --font-sans: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 72px;
  --radius: 6px;
  --radius-lg: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[lang="ja"] {
  --font-sans: "Noto Sans JP", "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic UI", Meiryo, system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[lang="ja"] body {
  font-feature-settings: "palt";
  line-height: 1.75;
}

/* Content protection: no selection / drag outside of form controls */
body, img, svg, video {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
input, textarea, select {
  -webkit-user-select: text;
  user-select: text;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, figure, address { margin: 0; }
address { font-style: normal; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 1000;
  background: var(--text);
  color: #000;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.9rem;
}
.skip-link:focus { top: 12px; }

/* Film grain overlay (replaces the old external texture image) */
.noise {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
.site-header.is-scrolled {
  background: rgba(7, 8, 10, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { display: block; height: 30px; width: auto; flex: none; }
.site-footer .brand-logo { height: 26px; }
.top-anchor { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-3);
  padding: 3px 6px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
}

.site-nav ul { display: flex; gap: 28px; }
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.3s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.header-tools { display: flex; align-items: center; gap: 18px; }

.clock {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.clock time { color: var(--text); font-variant-numeric: tabular-nums; }

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63, 214, 143, 0.14);
  flex: none;
}
.dot-blue { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot-live { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.lang-switch {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.lang-switch button {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--text-2);
  transition: background 0.3s, color 0.3s;
}
.lang-switch button[lang="ja"] { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.04em; }
.lang-switch button[aria-pressed="true"] { background: var(--text); color: #000; }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--text); }

.menu-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  margin-right: -8px;
}
.menu-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 23px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 19.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 19.5px; transform: rotate(-45deg); }

@media (max-width: 1023px) {
  .site-nav, .header-tools .btn, .header-tools .clock { display: none; }
  .menu-toggle { display: block; }
  .header-tools { gap: 12px; }
}
@media (max-width: 480px) {
  .brand-sub { display: none; }
  .brand-logo { height: 24px; }
  .header-tools { gap: 6px; }
  .lang-switch button { padding: 5px 9px; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  background: rgba(7, 8, 10, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu ul a {
  display: block;
  padding: 16px 0;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s;
}
html[lang="ja"] .mobile-menu ul a { letter-spacing: 0.02em; font-weight: 700; font-size: 1.7rem; }
.mobile-menu.is-open ul a { transform: none; opacity: 1; }
.mobile-menu.is-open ul li:nth-child(2) a { transition-delay: 0.05s; }
.mobile-menu.is-open ul li:nth-child(3) a { transition-delay: 0.1s; }
.mobile-menu.is-open ul li:nth-child(4) a { transition-delay: 0.15s; }
.mobile-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-2);
}
.mobile-menu-foot .mono { font-size: 0.68rem; text-transform: none; letter-spacing: 0.06em; }
body.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.btn:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.05); }
.btn-primary { background: var(--text); color: #0a0a0a; border-color: var(--text); }
.btn-primary:hover { background: #fff; border-color: #fff; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 0.82rem; }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------- Typography ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[lang="ja"] .eyebrow { letter-spacing: 0.12em; }
.eyebrow .num { color: var(--accent); }
.eyebrow .sep { width: 28px; height: 1px; background: var(--line-2); }

.display {
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}
html[lang="ja"] .display {
  font-size: clamp(2.2rem, 5.6vw, 4.9rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  font-weight: 700;
}

.h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: balance;
}
html[lang="ja"] .h2 {
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
  font-weight: 700;
}
/* Balanced wrapping breaks Japanese phrases mid-word; use normal wrapping instead */
html[lang="ja"] .display,
html[lang="ja"] .h2,
html[lang="ja"] .statement { text-wrap: wrap; }
html[lang="ja"] .contact .h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }

.lead {
  margin-top: 28px;
  max-width: 600px;
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
}
html[lang="ja"] .lead { line-height: 1.8; }

.body {
  margin-top: 20px;
  max-width: 62ch;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.75;
}
html[lang="ja"] .body { line-height: 1.9; max-width: 40em; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--header-h);
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: #000; }
.hero-media img, .hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(0.85) brightness(0.85);
}
.hero-media video { opacity: 0; transition: opacity 1.8s ease; }
.hero-media video.is-ready { opacity: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 72% 38%, rgba(127, 214, 240, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(7, 8, 10, 0.6) 0%, rgba(7, 8, 10, 0.25) 35%, rgba(7, 8, 10, 0.7) 72%, var(--bg) 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 25%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 25%, transparent 100%);
}

.hero-inner {
  padding-block: clamp(48px, 8vh, 96px) clamp(36px, 6vh, 72px);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  width: min(100% - 2 * var(--gutter), var(--container));
}
.hero-inner .eyebrow { color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); flex-wrap: wrap; row-gap: 8px; }
.hero-inner .eyebrow > span:not(.sep) { white-space: nowrap; }
@media (max-width: 480px) { .hero-inner .eyebrow .sep { display: none; } }
.hero-inner .display { text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35); }
.hero-inner .lead { color: rgba(255, 255, 255, 0.78); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.status-strip li { display: flex; align-items: center; gap: 10px; }
html[lang="ja"] .status-strip { letter-spacing: 0.1em; }

.scroll-hint {
  position: relative;
  flex: none;
  width: 22px; height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
}
.scroll-hint span {
  position: absolute;
  left: 50%; top: 7px;
  width: 3px; height: 6px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text-2);
  animation: scrollhint 2.2s ease-in-out infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(88px, 12vw, 160px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head .eyebrow { margin-bottom: 22px; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* About */
.about .lead {
  margin-top: 0;
  max-width: none;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
}
html[lang="ja"] .about .lead { line-height: 1.75; letter-spacing: 0.01em; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.stats li { padding: 28px 24px 0 0; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stats strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
html[lang="ja"] .stats strong { letter-spacing: 0; font-weight: 700; }
.stats span {
  display: block;
  margin-top: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}
html[lang="ja"] .stats span { font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.04em; }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .stats li { padding-right: 0; }
  .stats li + li { margin-top: 24px; padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px solid var(--line); }
}

/* Mission & Vision */
.mission { background: var(--bg-2); }
.directives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%);
}
.directive { position: relative; padding: clamp(32px, 4.5vw, 64px); }
.directive + .directive { border-left: 1px solid var(--line); }
.directive::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 240px at 20% 0%, rgba(127, 214, 240, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}
.directive:hover::before { opacity: 1; }
.directive .label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.statement {
  margin-top: 32px;
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}
html[lang="ja"] .statement { line-height: 1.45; letter-spacing: 0.01em; font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2.1rem); }
.directive .body { margin-top: 22px; max-width: 46ch; font-size: 0.98rem; }
@media (max-width: 860px) {
  .directives { grid-template-columns: 1fr; }
  .directive + .directive { border-left: 0; border-top: 1px solid var(--line); }
}

/* Services */
.services .section-head.row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 56px;
}
.section-intro { color: var(--text-2); line-height: 1.7; max-width: 46ch; }
html[lang="ja"] .section-intro { line-height: 1.9; }
@media (max-width: 860px) { .services .section-head.row { grid-template-columns: 1fr; } }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 1023px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(28px, 3vw, 40px);
  background: var(--bg);
  transition: background 0.4s;
}
.service:hover { background: var(--bg-3); }
.service::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), rgba(127, 214, 240, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.service:hover::after { opacity: 1; }
.service-top { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); }
.service-top .num { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; }
.service-icon { width: 24px; height: 24px; color: var(--text-2); transition: color 0.3s, transform 0.4s var(--ease); }
.service:hover .service-icon { color: var(--accent); transform: translateY(-2px); }
.service h3 {
  margin-top: 56px;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
html[lang="ja"] .service h3 { letter-spacing: 0.02em; font-weight: 700; font-size: 1.1rem; }
.service p { flex: 1; margin-top: 12px; color: var(--text-2); font-size: 0.95rem; line-height: 1.7; }
html[lang="ja"] .service p { line-height: 1.85; font-size: 0.92rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Contact */
.contact { background: var(--bg-2); }
.grid-contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 960px) { .grid-contact { grid-template-columns: 1fr; } }

.contact-details { margin-top: 48px; border-top: 1px solid var(--line); }
.contact-details > div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-details dt {
  padding-top: 4px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
html[lang="ja"] .contact-details dt { font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.06em; }
.contact-details dd { color: var(--text); line-height: 1.65; }
.contact-details dd a { border-bottom: 1px solid var(--line-2); transition: border-color 0.3s; }
.contact-details dd a:hover { border-color: var(--text); }
.contact-details time { font-variant-numeric: tabular-nums; }
.contact-details .note {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ja"] .contact-details .note { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.06em; }
@media (max-width: 480px) {
  .contact-details > div { grid-template-columns: 1fr; gap: 6px; }
}

/* Form */
.contact-form-wrap {
  position: relative;
  padding: clamp(24px, 3.5vw, 48px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 24px;
}
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.field { position: relative; }
.field-full { grid-column: 1 / -1; }
/* Japanese name order: family name first */
html[lang="ja"] .field-last { order: -1; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 24px 0 10px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.3s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 128px; }
.field select { padding-right: 28px; cursor: pointer; }
.field select.is-placeholder { color: var(--text-3); }
.field select option { background: var(--bg-3); color: var(--text); }
.field select option[disabled] { color: var(--text-3); }

.field label {
  position: absolute;
  left: 0;
  top: 24px;
  color: var(--text-3);
  font-size: 1rem;
  line-height: 1.5;
  pointer-events: none;
  transition: top 0.25s var(--ease), font-size 0.25s var(--ease), color 0.25s, letter-spacing 0.25s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field-select label {
  top: 0;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
html[lang="ja"] .field input:focus + label,
html[lang="ja"] .field input:not(:placeholder-shown) + label,
html[lang="ja"] .field textarea:focus + label,
html[lang="ja"] .field textarea:not(:placeholder-shown) + label,
html[lang="ja"] .field-select label {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--text); }
.field.is-valid input, .field.is-valid textarea, .field.is-valid select { border-bottom-color: rgba(63, 214, 143, 0.7); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-bottom-color: var(--red); }

.field-select::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 18px;
  width: 7px; height: 7px;
  border-right: 1px solid var(--text-2);
  border-bottom: 1px solid var(--text-2);
  transform: rotate(45deg);
  pointer-events: none;
}

.field-error {
  display: none;
  margin-top: 8px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}
html[lang="ja"] .field-error { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.02em; }
.field.is-invalid .field-error { display: block; }

.char-count {
  position: absolute;
  right: 0;
  top: 2px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}
.char-count.is-limit { color: var(--red); }

.animate-shake { animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.form-note {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ja"] .form-note { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.04em; }
.form-status {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 93, 93, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 93, 93, 0.06);
  color: var(--red);
  font-size: 0.9rem;
  line-height: 1.6;
}
.form-status.is-visible { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

form[aria-hidden="true"] { visibility: hidden; }

.form-success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.form-success.is-visible { opacity: 1; visibility: visible; }
.success-icon { position: relative; width: 76px; height: 76px; color: var(--green); }
.success-icon::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 214, 143, 0.28), transparent 70%);
  animation: pulse 2.2s ease-in-out infinite;
}
.success-icon svg { position: relative; width: 100%; height: 100%; }
.success-icon path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.form-success.is-visible .success-icon path { animation: draw 0.8s 0.3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 { margin-top: 28px; font-size: 1.5rem; font-weight: 500; letter-spacing: -0.02em; outline: none; }
html[lang="ja"] .form-success h3 { letter-spacing: 0.02em; font-weight: 700; }
.form-success p { margin-top: 12px; max-width: 40ch; color: var(--text-2); line-height: 1.7; }
.form-success .btn { margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 56px 32px; border-top: 1px solid var(--line); background: var(--bg); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-tagline { color: var(--text-3); font-size: 0.9rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav a { color: var(--text-2); font-size: 0.9rem; transition: color 0.3s; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[lang="ja"] .footer-bottom span[data-i18n] { font-family: var(--font-sans); letter-spacing: 0.04em; font-size: 0.74rem; }
.to-top { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); transition: color 0.3s; }
.to-top:hover { color: var(--text); }
.to-top svg { width: 14px; height: 14px; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
html.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.45s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .dot-live, .scroll-hint span, .success-icon::before { animation: none; }
  .btn, .btn svg, .service-icon, .site-nav a::after { transition: none; }
}
