/* --- DESIGN SYSTEM TOKENS --- */
:root {
  /* Fonts */
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  /* HSL Colors - Default Dark Mode (Deep Basalt, Spring Teal, Fuji Sky, Taisha Gold) */
  --bg-primary: hsl(224, 40%, 8%);
  --bg-secondary: hsl(224, 40%, 12%);
  --bg-tertiary: hsl(224, 40%, 16%);
  
  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 75%);
  --text-muted: hsl(215, 15%, 55%);
  
  --primary: hsl(188, 90%, 50%); /* Clean Spring Water Cyan */
  --primary-glow: hsla(188, 90%, 50%, 0.15);
  --secondary: hsl(217, 91%, 60%); /* Fuji Indigo */
  --secondary-glow: hsla(217, 91%, 60%, 0.15);
  --accent-gold: hsl(45, 95%, 50%); /* Taisha Shrine Gold */
  --accent-vermilion: hsl(8, 85%, 50%); /* Taisha Shrine Gate vermilion */
  
  /* Borders & Glassmorphism */
  --border-color: hsla(215, 20%, 25%, 0.4);
  --border-glow: hsla(188, 90%, 50%, 0.2);
  --glass-bg: hsla(224, 40%, 8%, 0.7);
  --glass-border: hsla(210, 40%, 98%, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --backdrop-blur: blur(16px);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  --transition-fast: 160ms cubic-bezier(0.2, 0, 0, 1);
  --transition-normal: 260ms cubic-bezier(0.2, 0, 0, 1);

  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 30px;
}

/* --- LIGHT MODE TOKENS --- */
[data-theme="light"] {
  --bg-primary: hsl(210, 40%, 98%);
  --bg-secondary: hsl(0, 0%, 100%);
  --bg-tertiary: hsl(210, 30%, 94%);
  
  --text-primary: hsl(224, 40%, 12%);
  --text-secondary: hsl(224, 20%, 35%);
  --text-muted: hsl(224, 15%, 50%);
  
  --primary: hsl(188, 95%, 30%); /* Darker teal for accessibility */
  --primary-glow: hsla(188, 95%, 30%, 0.1);
  --secondary: hsl(217, 85%, 50%);
  --secondary-glow: hsla(217, 85%, 50%, 0.1);
  --accent-gold: hsl(42, 95%, 30%);
  --accent-vermilion: hsl(8, 85%, 45%);
  
  --border-color: hsla(224, 20%, 85%, 0.8);
  --border-glow: hsla(188, 95%, 40%, 0.15);
  --glass-bg: hsla(0, 0%, 100%, 0.75);
  --glass-border: hsla(224, 20%, 15%, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
}

/* --- RESET & BASIC STYLES --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

[id] {
  scroll-margin-top: 6.5rem;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: visible;
}

a,
code,
kbd,
samp,
pre {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- CORE BACKGROUND EFFECTS --- */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: 
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center;
  opacity: 0.15;
  pointer-events: none;
}

.glow-orb {
  position: fixed;
  width: min(600px, 100vw);
  height: min(600px, 100vw);
  border-radius: 50%;
  z-index: -1;
  filter: blur(150px);
  pointer-events: none;
  opacity: 0.45;
}

.orb-1 {
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.orb-2 {
  bottom: -200px;
  left: -200px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

.fuji-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: auto;
  opacity: 0.08;
  z-index: -1;
  pointer-events: none;
  fill: var(--text-primary);
  transition: opacity var(--transition-normal);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: 0;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); position: relative; margin-bottom: 2.5rem; display: inline-block; }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); margin-bottom: 1rem; }
h4 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--secondary);
}

/* Section Title Highlight */
h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* --- LANGUAGE VISIBILITY --- */
.lang-ja,
.lang-en {
  overflow-wrap: anywhere;
}

.entity-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.25;
}

.hero-entity-title {
  font-size: clamp(2.5rem, 4.8vw, 3.1rem);
}

.hero-company-name {
  overflow-wrap: normal;
  word-break: keep-all;
  line-break: strict;
  text-wrap: balance;
}

.hero-company-name .company-suffix {
  display: inline-block;
}

.proof-link .lang-ja,
.proof-link .lang-en,
.hero-pill .lang-ja,
.hero-pill .lang-en,
.btn .lang-ja,
.btn .lang-en,
.read-more .lang-ja,
.read-more .lang-en {
  max-width: 100%;
  min-width: 0;
}

html:not([lang="en"]) .lang-ja + .lang-en {
  display: none !important;
}

html[lang="en"] .lang-ja:has(+ .lang-en) {
  display: none !important;
}

/* --- CONTAINERS & LAYOUT --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  min-width: 0;
}

.section {
  padding: 8rem 0 6rem 0;
  position: relative;
}

/* --- HEADER & NAVIGATION --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--glass-shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
  gap: 1rem;
  min-width: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1 1 auto;
  min-width: 0;
}

.nav-brand > div {
  min-width: 0;
}

.nav-brand span {
  display: block;
  max-width: 100%;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.nav-brand .brand-jp {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  min-width: 0;
}

.nav-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  min-width: 0;
}

.nav-link .lang-ja,
.nav-link .lang-en {
  overflow-wrap: normal;
  word-break: keep-all;
  line-break: strict;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
  transform: scaleX(1);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
}

/* Control Buttons */
.icon-btn {
  background: none;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-bg);
  color: var(--text-primary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-2px);
}

/* Language Toggle Button */
.lang-btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--glass-border);
  background-color: var(--glass-bg);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  min-height: 40px;
  min-width: 44px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-first-viewport {
  min-height: calc(100svh - 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(20rem, 0.96fr);
  grid-template-areas:
    "identity registry"
    "claim registry"
    "metrics metrics";
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 3vh, 2.25rem) clamp(1.5rem, 4vw, 3rem);
  align-content: center;
  padding: clamp(1.5rem, 4vh, 2.75rem) 0 clamp(1.5rem, 4vh, 3rem);
}

.hero-ledger {
  display: contents;
}

.hero-ledger-copy {
  grid-area: identity;
  align-self: end;
  max-width: 680px;
  min-width: 0;
}

.hero-profile-table {
  grid-area: registry;
  align-self: center;
}

.hero-proof {
  margin: 1.5rem 0 1.25rem 0;
}

.proof-link,
.proof-neighbor a,
.trust-register a {
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  min-height: 2.5rem;
  max-width: 100%;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.proof-neighbor {
  margin-top: 1.5rem;
}

.trust-register {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  align-content: start;
  min-width: 0;
}

.trust-register a {
  align-items: flex-start;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: normal;
  text-align: left;
  word-break: normal;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.proof-strip a {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-claim {
  grid-area: claim;
  align-self: start;
  padding: 0;
  max-width: 760px;
}

.hero-claim-title {
  font-size: clamp(2.1rem, 4.8vw, 4rem);
}

.hero-cta-single {
  margin-top: 0;
}

.hero-content {
  max-width: 800px;
  z-index: 1;
}

.hero-first-viewport .hero-pill {
  margin-bottom: clamp(0.85rem, 2vh, 1.25rem);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
  padding: 0.5rem 1.25rem;
  background-color: var(--glass-bg);
  border: 1px solid var(--primary-glow);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 2rem;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 0 20px var(--primary-glow);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-pill .pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.hero-title {
  margin-bottom: 1.1rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 70%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 100%;
  min-width: 0;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  min-height: 2.75rem;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: hsl(224, 40%, 8%);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.1);
}

/* --- METRICS / QUICK STATS --- */
.hero-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(0.25rem, 2vh, 1.5rem);
  border-top: 1px solid var(--border-color);
  padding-top: clamp(1.25rem, 3vh, 2rem);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- CARDS & GLASSMORPHISM --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 2.5rem;
}

.card {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(6, 182, 212, 0.08), transparent 40%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.08);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(135deg, var(--bg-tertiary), var(--border-color));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.card:hover .card-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: hsl(224, 40%, 8%);
  box-shadow: 0 0 20px var(--primary-glow);
}

.card-title {
  margin-bottom: 1rem;
  font-weight: 700;
}

.card-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- ABOUT & CORPORATE PROFILE --- */
.about-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-info p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  table-layout: fixed;
  max-width: 100%;
}

.profile-table tr {
  border-bottom: 1px solid var(--glass-border);
}

.profile-table tr:last-child {
  border-bottom: none;
}

.profile-table th, .profile-table td {
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 0.95rem;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.profile-table th {
  font-weight: 600;
  color: var(--primary);
  width: 35%;
  border-right: 1px solid var(--glass-border);
  background-color: rgba(6, 182, 212, 0.02);
}

.profile-table td {
  color: var(--text-primary);
  font-weight: 300;
}

/* --- REPORTS INTERACTIVE --- */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 2rem;
}

.report-card {
  cursor: pointer;
}

.report-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--primary);
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
}

.report-card:hover .report-tag {
  background-color: var(--primary);
  color: hsl(224, 40%, 8%);
  border-color: var(--primary);
}

.report-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.report-card .read-more {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.5rem;
  color: var(--primary);
}

.report-card .read-more svg {
  transition: transform var(--transition-fast);
}

.report-card:hover .read-more svg {
  transform: translateX(5px);
}

/* --- KESSAN (PUBLIC NOTICE) LAYOUT --- */
.kessan-header {
  text-align: center;
  padding: 10rem 0 4rem 0;
  background: radial-gradient(circle at top, var(--primary-glow), transparent 60%);
}

.kessan-title {
  margin-bottom: 1rem;
}

.kessan-intro {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.kessan-card {
  max-width: 800px;
  margin: 0 auto 4rem auto;
  border-color: var(--primary-glow);
}

.kessan-card-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kessan-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  background-color: hsla(45, 95%, 50%, 0.1);
  border: 1px solid var(--accent-gold);
  border-radius: 30px;
  color: var(--accent-gold);
  font-weight: 600;
}

.construction-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.construction-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 2rem;
  position: relative;
}

.construction-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--accent-gold);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 15px var(--accent-gold));
}

.construction-icon::after {
  content: '富士';
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.construction-headline {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.construction-text {
  max-width: 500px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.construction-steps {
  width: 100%;
  max-width: 500px;
  text-align: left;
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
}

.step-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.step-bullet {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

.step-item.active .step-bullet {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  color: hsl(224, 40%, 8%);
  box-shadow: 0 0 10px var(--primary-glow);
}

.step-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.step-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- GITHUB INTEGRATION SECTION --- */
.github-section {
  position: relative;
  z-index: 1;
}

.github-card {
  display: flex;
  gap: 3rem;
  align-items: center;
  border-color: var(--secondary-glow);
  padding: 4rem;
}

.github-info {
  flex: 1.2;
  min-width: 0;
}

.github-avatar {
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.avatar-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--secondary);
  box-shadow: 0 0 30px var(--secondary-glow);
  z-index: 1;
  position: relative;
}

.avatar-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px dashed var(--primary);
  opacity: 0.6;
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 3rem 0;
  background-color: var(--bg-secondary);
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-content > *,
.footer-links li,
.footer-links a {
  min-width: 0;
  max-width: 100%;
}

.footer-links a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
}

.footer-links-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- INTERACTIVE MODALS --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 4rem 3rem 3rem 3rem;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-title {
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.modal-meta {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.modal-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.modal-body p {
  margin-bottom: 1.5rem;
}

.modal-body h3 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.modal-body ul, .modal-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

/* --- STATIC REPORT DETAIL --- */
.static-report-detail {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.static-report-detail summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}

.static-report-detail h3 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
}

/* --- FOCUS AND REDUCED MOTION --- */
:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
  .navbar {
    height: 4.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.86rem;
  }
  
  .about-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-first-viewport {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "identity"
      "claim"
      "registry"
      "metrics";
    grid-template-rows: auto;
    align-content: start;
  }

  .hero-ledger-copy,
  .hero-claim,
  .hero-profile-table {
    align-self: start;
    max-width: 100%;
  }
  
  .github-card {
    flex-direction: column-reverse;
    text-align: center;
    padding: 3rem 2rem;
  }
  
  .github-avatar {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 820px) {
  [id] {
    scroll-margin-top: 11rem;
  }

  .header .container {
    padding-inline: 1.25rem;
  }

  .navbar {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.75rem;
    padding-block: 0.65rem 0.75rem;
  }

  .nav-brand {
    flex: 1 1 calc(100% - 7rem);
    max-width: calc(100% - 7rem);
  }

  .navbar > nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
  }

  .nav-links li {
    display: flex;
    flex: 1 1 clamp(5.6rem, 30%, 8rem);
    min-width: 0;
  }

  .nav-link {
    width: 100%;
    min-height: 44px;
    padding: 0.45rem 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    background-color: var(--glass-bg);
    font-size: 0.78rem;
    line-height: 1.2;
    text-align: center;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .lang-btn {
    min-height: 44px;
  }

  .hero {
    padding-top: 11rem;
  }

  .hero-first-viewport {
    min-height: calc(100svh - 11rem);
  }

  .kessan-header,
  .section.agent-hero {
    padding-top: 12rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 6rem 0 4rem 0;
  }

  .card-grid,
  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-link,
  .btn,
  .hero-pill,
  .report-card .read-more {
    max-width: 100%;
  }

  .btn svg,
  .read-more svg {
    flex: 0 0 auto;
  }
  
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
    margin-top: 3rem;
  }

  .profile-table,
  .profile-table tbody,
  .profile-table tr,
  .profile-table th,
  .profile-table td {
    display: block;
    width: 100%;
  }

  .profile-table th {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .profile-table td {
    border-bottom: 1px solid var(--glass-border);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .modal-content {
    padding: 3rem 1.5rem 1.5rem 1.5rem;
  }
}

/* --- CONTACT SECTION --- */
.contact-container {
  max-width: 650px;
  margin: 0 auto;
}

.contact-card {
  border-color: var(--primary-glow);
  padding: 3.5rem 3rem;
}

.contact-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 576px) {
  .header .container {
    padding-inline: 1rem;
  }

  .navbar {
    gap: 0.75rem;
  }

  .nav-brand {
    gap: 0.5rem;
    font-size: 1rem;
    flex-basis: calc(100% - 6.75rem);
    max-width: calc(100% - 6.75rem);
  }

  .nav-brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .nav-brand .brand-jp {
    font-size: 0.72rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .lang-btn {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
  }

  .nav-link {
    padding-inline: 0.4rem;
    font-size: 0.75rem;
  }

  .card {
    padding: 2rem 1.25rem;
  }

  .btn {
    width: 100%;
    min-height: 44px;
    padding: 0.875rem 1rem !important;
  }

  .hero-pill {
    padding-inline: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-control {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  outline: none;
  transition: opacity var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 15px var(--primary-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* --- CONTACT PIPELINE RESPONSIVE --- */
@media (max-width: 768px) {
  .pipeline-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .pipeline-col-middle, .pipeline-col-right {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px solid var(--border-color) !important;
    padding-top: 1.5rem !important;
  }
}

/* ==========================================================================
   三島の清流 — procedural WebGL water
   Decorative layer. Two placements: .seiryu--hero fills the hero section,
   .seiryu--page is a fixed ground behind a whole page. Falls back to a still
   gradient when WebGL is unavailable or JavaScript is off.
   ========================================================================== */

:root {
  /* Veil over the water. Heavier on the copy side, thin on the open side so
     the stream still reads as the subject of the hero. */
  --seiryu-veil-strong: hsla(224, 40%, 8%, 0.82);
  --seiryu-veil-soft:   hsla(224, 40%, 8%, 0.44);
  --seiryu-veil-top:    hsla(224, 40%, 8%, 0.90);
  --seiryu-veil-bottom: hsla(224, 40%, 8%, 0.68);
  /* Page-wide ground sits under body copy and form controls: heavier. */
  --seiryu-veil-page:   hsla(224, 40%, 8%, 0.56);
  --seiryu-fallback-1: hsla(188, 90%, 45%, 0.16);
  --seiryu-fallback-2: hsla(196, 70%, 30%, 0.10);
  --seiryu-fallback-3: hsla(188, 85%, 40%, 0.14);
}

[data-theme="light"] {
  --seiryu-veil-strong: hsla(210, 40%, 98%, 0.88);
  --seiryu-veil-soft:   hsla(210, 40%, 98%, 0.52);
  --seiryu-veil-top:    hsla(210, 40%, 98%, 0.92);
  --seiryu-veil-bottom: hsla(210, 40%, 98%, 0.74);
  --seiryu-veil-page:   hsla(210, 40%, 98%, 0.70);
  --seiryu-fallback-1: hsla(188, 80%, 60%, 0.22);
  --seiryu-fallback-2: hsla(196, 60%, 70%, 0.16);
  --seiryu-fallback-3: hsla(188, 75%, 62%, 0.20);
}

.seiryu {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.seiryu--page {
  position: fixed;
}

.seiryu canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 900ms ease;
}

.seiryu[data-seiryu-state="on"] canvas {
  opacity: 1;
}

.seiryu[data-seiryu-state="off"] canvas {
  display: none;
}

/* Still fallback: visible until the first WebGL frame lands, and forever
   when WebGL or JS is unavailable. */
.seiryu::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 118%, var(--seiryu-fallback-1), transparent 62%),
    linear-gradient(180deg, transparent 0%, var(--seiryu-fallback-2) 55%, var(--seiryu-fallback-3) 100%);
  transition: opacity 900ms ease;
}

.seiryu[data-seiryu-state="on"]::before {
  opacity: 0;
}

.seiryu-veil {
  position: absolute;
  inset: 0;
}

/* Hero: veil the copy side, leave the open side clear. */
.seiryu--hero .seiryu-veil {
  background:
    linear-gradient(
      90deg,
      var(--seiryu-veil-strong) 0%,
      var(--seiryu-veil-soft) 44%,
      transparent 74%
    ),
    linear-gradient(
      180deg,
      var(--seiryu-veil-top) 0%,
      transparent 24%,
      transparent 60%,
      var(--seiryu-veil-bottom) 100%
    );
}

@media (max-width: 900px) {
  /* Single column: the copy sits over the whole width, so veil vertically. */
  .seiryu--hero .seiryu-veil {
    background: linear-gradient(
      180deg,
      var(--seiryu-veil-top) 0%,
      var(--seiryu-veil-soft) 26%,
      var(--seiryu-veil-soft) 62%,
      var(--seiryu-veil-bottom) 100%
    );
  }
}

/* Page ground: even veil, heaviest under the header band. */
.seiryu--page .seiryu-veil {
  background: linear-gradient(
    180deg,
    var(--seiryu-veil-top) 0%,
    var(--seiryu-veil-page) 18%,
    var(--seiryu-veil-page) 100%
  );
}

.hero > .container {
  position: relative;
  z-index: 1;
}

/* Content must sit above a page-wide water ground. Keyed off a body class
   rather than :has(), so browsers without :has() still stack correctly. */
.has-seiryu-page main,
.has-seiryu-page .footer {
  position: relative;
  z-index: 1;
}
