/*
Theme Name: Nexira Theme
Theme URI: https://nexira.co.jp
Author: NEXIRA株式会社
Author URI: https://nexira.co.jp
Description: NEXIRA株式会社 コーポレートサイト - シングルページテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexira-theme
Tags: one-page, corporate, responsive
*/

/* ===== CSS Variables ===== */
:root {
  --navy:       #0D1F3C;
  --navy-dark:  #081529;
  --navy-mid:   #162B50;
  --sky:        #3A9ECC;
  --sky-light:  #5BB8E8;
  --sky-pale:   #EAF6FD;
  --white:      #FFFFFF;
  --gray-light: #F4F6F9;
  --gray-mid:   #8A9BB5;
  --gray-dark:  #3D4F6A;
  --text:       #1A2A42;
  --border:     #D6E4F0;

  --font-ja: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-en: 'EB Garamond', 'Georgia', serif;
  --font-ui: 'Montserrat', sans-serif;

  --transition: 0.3s ease;
  --radius:     6px;
  --shadow:     0 4px 24px rgba(13, 31, 60, 0.12);
  --shadow-lg:  0 8px 40px rgba(13, 31, 60, 0.18);
}

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

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

body {
  font-family: var(--font-ja);
  color: var(--text);
  background: var(--white);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sky);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--sky-light); }

ul { list-style: none; }

/* ===== Typography ===== */
.section-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sky), var(--sky-light));
  border-radius: 2px;
  transition: width 0.7s ease 0.2s;
}

.section-title.is-visible::after {
  width: 2.8rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--gray-dark);
  max-width: 560px;
}

/* ===== Layout ===== */
.container {
  width: 86%;
  max-width: 1100px;
  margin: 0 auto;
}

section {
  padding: 128px 0;
}

/* ===== Header / Navbar ===== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(
    105deg,
    rgba(5,  12, 26, 0.95) 0%,
    rgba(13, 31, 60, 0.92) 40%,
    rgba(18, 38, 72, 0.90) 70%,
    rgba(8,  20, 42, 0.94) 100%
  );
  background-size: 300% 300%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  transition: box-shadow 0.4s ease, backdrop-filter 0.4s ease;
  animation: headerGradient 12s ease infinite;
}

/* 下部ボーダーに光が流れるシマー */
#site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent                0%,
    rgba(58, 158, 204, 0.15)  20%,
    rgba(58, 158, 204, 0.55)  50%,
    rgba(58, 158, 204, 0.15)  80%,
    transparent               100%
  );
  background-size: 200% auto;
  animation: headerBorderShimmer 6s linear infinite;
}

#site-header.is-scrolled {
  background: linear-gradient(
    105deg,
    rgba(4,  10, 22, 0.98) 0%,
    rgba(10, 24, 48, 0.98) 40%,
    rgba(15, 32, 62, 0.97) 70%,
    rgba(6,  16, 34, 0.98) 100%
  );
  background-size: 300% 300%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
  animation: headerGradientScrolled 12s ease infinite;
}

@keyframes headerGradient {
  0%,  100% { background-position:   0% 50%; }
  33%        { background-position:  80% 30%; }
  66%        { background-position: 100% 70%; }
}

@keyframes headerGradientScrolled {
  0%,  100% { background-position:   0% 50%; }
  33%        { background-position:  80% 30%; }
  66%        { background-position: 100% 70%; }
}

@keyframes headerBorderShimmer {
  0%   { background-position:   0% center; }
  100% { background-position: 200% center; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 170px;
  transition: height 0.4s ease;
}

#site-header.is-scrolled .header-inner {
  height: 110px;
}

#site-header.is-scrolled .logo-img {
  height: 78px;
}

.site-logo {
  display: flex;
  align-items: center;
  line-height: 1;
}

.logo-img {
  height: 100px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9))
          drop-shadow(0 0 1px rgba(255, 255, 255, 1));
  transition: height 0.4s ease;
}

#site-header.is-scrolled .logo-img {
  height: 65px;
}

.footer-logo-img {
  height: 80px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.6));
}

/* footer text logo (unchanged) */
.footer-brand .logo-en {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--white);
}

.footer-brand .logo-en span {
  color: var(--sky);
}

.footer-brand .logo-ja {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--gray-mid);
  margin-top: 2px;
}

.global-nav ul {
  display: flex;
  gap: 2.8rem;
  align-items: center;
}

.global-nav a {
  font-family: var(--font-ja);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.global-nav a:hover {
  color: var(--sky-light);
  border-bottom-color: var(--sky-light);
}

.nav-cta {
  border-bottom: none !important;
}

.nav-cta:hover {
  color: var(--sky-light);
  border-bottom-color: transparent !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== Cursor Comet Trail ===== */
.cursor-trail-dot {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(140, 210, 240, 0.7)  45%,
    transparent               100%
  );
  pointer-events: none;
  z-index: 4;
  will-change: transform;
}

/* ===== Hero White Accents ===== */
.hero-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

/* 白いボケ玉 */
.hl-orb {
  position: absolute;
  border-radius: 50%;
}

.hl-orb-a {
  width: 520px;
  height: 520px;
  top: -100px;
  left: 4%;
  background: radial-gradient(circle, rgba(255,255,255,0.055) 0%, transparent 65%);
  animation: hlOrb 22s ease-in-out infinite;
}

.hl-orb-b {
  width: 340px;
  height: 340px;
  top: 30%;
  right: 6%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 60%);
  animation: hlOrb 28s ease-in-out 7s infinite reverse;
}

.hl-orb-c {
  width: 240px;
  height: 240px;
  bottom: 10%;
  left: 38%;
  background: radial-gradient(circle, rgba(255,255,255,0.045) 0%, transparent 65%);
  animation: hlOrb 19s ease-in-out 12s infinite;
}

@keyframes hlOrb {
  0%,  100% { transform: translate(  0px,   0px) scale(1.00); }
  25%        { transform: translate( 28px,  18px) scale(1.04); }
  50%        { transform: translate(-18px,  38px) scale(0.97); }
  75%        { transform: translate( 12px, -14px) scale(1.02); }
}

/* 斜めに流れる光のライン */

/* ===== Hero ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy-dark); /* 動画ロード前のフォールバック */
  overflow: hidden;
  padding: 0;
}

/* 背景動画 */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

/* 動画上のオーバーレイ（文字の視認性確保） */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6,  14, 30, 0.72) 0%,
    rgba(10, 22, 46, 0.60) 50%,
    rgba(14, 30, 58, 0.65) 100%
  );
  z-index: 1;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 158, 204, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 158, 204, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(58, 158, 204, 0.15) 0%, transparent 65%);
  pointer-events: none;
  animation: glowFloat 14s ease-in-out infinite;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 160px 0 100px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
  border: 1px solid rgba(58, 158, 204, 0.4);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--sky);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

.hero-title-accent {
  display: block;
  background: linear-gradient(120deg, var(--sky) 0%, var(--sky-light) 40%, #a8dff5 60%, var(--sky) 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 5s linear 1.5s infinite;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

.hero-tagline-en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(58, 158, 204, 0.7);
  letter-spacing: 0.03em;
  margin-bottom: 3.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, var(--sky), var(--sky-light), var(--sky));
  background-size: 200% auto;
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  transition: background-position 0.5s ease, transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(58, 158, 204, 0.35);
  animation: btnGlow 3s ease-in-out 1.5s infinite;
}

.btn-primary:hover {
  background-position: right center;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(58, 158, 204, 0.55);
  animation: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
}

.btn-outline:hover {
  border-color: var(--sky-light);
  color: var(--sky-light);
}

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(58, 158, 204, 0.6));
  animation: scrollLinePulse 2.5s ease-in-out 2s infinite;
}

/* ===== Company Overview ===== */
#about {
  background: var(--gray-light);
  position: relative;
}


/* 2つの青い光が対角を走るアニメーション */
.about-glow-box {
  position: relative;
  margin-top: 4rem;
  border: 1px solid rgba(58, 158, 204, 0.18);
  border-radius: var(--radius);
  overflow: visible;
}

.about-glow-box .about-grid {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

/* 光の点 共通 */
.glow-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(91, 184, 232, 0.55);
  box-shadow:
    0 0  5px  3px rgba(91, 184, 232, 0.3),
    0 0 12px  6px rgba(58, 158, 204, 0.15);
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

/* 光A：通常速度で周回 */
.glow-dot-a {
  animation: orbitDot 7s linear infinite;
}

/* 光B：180度ずらして対角位置をキープ */
.glow-dot-b {
  animation: orbitDot 7s linear infinite;
  animation-delay: -3.5s;
}

@keyframes orbitDot {
  0%   { top: -1px;              left: -1px; }
  25%  { top: -1px;              left: calc(100% + 1px); }
  50%  { top: calc(100% + 1px); left: calc(100% + 1px); }
  75%  { top: calc(100% + 1px); left: -1px; }
  100% { top: -1px;              left: -1px; }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 4rem;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
}

.about-table th,
.about-table td {
  padding: 1.25rem 1.4rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.about-table th {
  width: 38%;
  font-weight: 700;
  color: var(--navy);
  background: rgba(58, 158, 204, 0.06);
  white-space: nowrap;
}

.about-table td {
  color: var(--gray-dark);
}

.about-table tr:last-child th,
.about-table tr:last-child td {
  border-bottom: none;
}

.about-highlight {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
}

.about-highlight-title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-ui);
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.stat-value sup {
  font-size: 1rem;
  font-weight: 700;
  margin-right: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--gray-mid);
  letter-spacing: 0.05em;
}

.stat-divider {
  height: 1px;
  background: var(--border);
}

.about-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 320px;
  align-self: stretch;
}

.about-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
}

/* ===== Philosophy ===== */
#philosophy {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

#philosophy::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 158, 204, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 158, 204, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

#philosophy .section-label {
  color: var(--sky-light);
}

#philosophy .section-title {
  color: var(--white);
}

#philosophy .section-subtitle {
  color: rgba(255, 255, 255, 0.6);
}

.philosophy-inner {
  position: relative;
  z-index: 1;
}

.philosophy-concept {
  border-left: 3px solid var(--sky);
  padding-left: 1.5rem;
  margin: 3rem 0;
}

.concept-ja {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.concept-en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 1rem;
  color: var(--sky-light);
  letter-spacing: 0.04em;
}

.philosophy-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  perspective: 1200px;
}

.pillar-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  overflow: visible;
  transform-style: preserve-3d;
  transform: translateZ(0);
  box-shadow:
    0 4px 24px rgba(180, 220, 255, 0.1),
    0 1px  8px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background var(--transition), border-color var(--transition), transform 0.15s ease, box-shadow 0.3s ease;
  cursor: default;
}

.pillar-card:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 40px rgba(180, 220, 255, 0.18),
    0 2px 12px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pillar-icon {
  width: 44px;
  height: 44px;
  background: rgba(58, 158, 204, 0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.pillar-illust {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  display: block;
  transform: translateY(0) scale(1) rotateX(0deg);
  transform-origin: bottom center;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.08);
  transition:
    transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1),
    box-shadow 0.45s ease;
  will-change: transform;
}

.pillar-card:hover .pillar-illust {
  transform: translateY(-16px) scale(1.05) rotateX(-4deg);
  box-shadow:
    0 20px 40px rgba(255, 255, 255, 0.22),
    0  8px 18px rgba(255, 255, 255, 0.14);
}

.pillar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.pillar-desc {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

/* ===== CEO Message ===== */
/* ── Message background animations ── */
@keyframes orbDrift1 {
  0%,100% { transform: translate(0, 0) scale(1); }
  30%      { transform: translate(40px, -50px) scale(1.12); }
  70%      { transform: translate(-30px, 30px) scale(0.9); }
}
@keyframes orbDrift2 {
  0%,100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-50px, 40px) scale(1.08); }
  75%      { transform: translate(30px, -20px) scale(0.95); }
}
@keyframes orbDrift3 {
  0%,100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(25px, 45px) scale(1.1); }
}

#message {
  background: var(--navy-dark);
  position: relative;
  overflow: hidden;
}

#message .section-title { color: var(--white); }

/* Canvas（パーティクル） */
.msg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* フローティングオーブ */
.msg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}
.msg-orb--1 {
  width: 420px; height: 420px;
  top: -15%; right: -8%;
  background: radial-gradient(circle, rgba(58,158,204,.18) 0%, transparent 70%);
  animation: orbDrift1 12s ease-in-out infinite;
}
.msg-orb--2 {
  width: 300px; height: 300px;
  bottom: -10%; left: -5%;
  background: radial-gradient(circle, rgba(91,184,232,.12) 0%, transparent 70%);
  animation: orbDrift2 15s ease-in-out infinite;
}
.msg-orb--3 {
  width: 200px; height: 200px;
  top: 40%; left: 35%;
  background: radial-gradient(circle, rgba(58,158,204,.08) 0%, transparent 70%);
  animation: orbDrift3 10s ease-in-out infinite;
}

/* コンテンツを前面に */
#message .container { position: relative; z-index: 1; }

.message-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
  margin-top: 4rem;
}

.message-portrait {
  position: sticky;
  top: 96px;
}

/* 装飾フレーム（ポートレート後ろのオフセットボックス） */
.message-portrait::before {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 80%;
  height: 65%;
  background: linear-gradient(135deg, var(--sky) 0%, var(--navy-mid) 100%);
  border-radius: calc(var(--radius) * 2);
  opacity: 0.35;
  z-index: 0;
}

.portrait-box {
  aspect-ratio: 3/4;
  background: var(--navy-mid);
  border-radius: calc(var(--radius) * 2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow:
    0 16px 48px rgba(0,0,0,.45),
    0 0 0 1px rgba(58,158,204,.2);
}

/* 下部グラデーション（テキスト可読性） */
.portrait-box::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(8,21,41,.85) 0%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.portrait-name {
  position: relative;
  z-index: 1;
  text-align: center;
}

.portrait-name-ja {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
}

.portrait-name-role {
  font-size: 0.72rem;
  color: var(--sky-light);
  letter-spacing: 0.15em;
  margin-top: 0.3rem;
}

.message-body h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 2rem;
}

.message-body p {
  font-size: 0.95rem;
  color: rgba(255,255,255,.72);
  line-height: 2;
  margin-bottom: 1.5rem;
}

.message-signature {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.sig-role {
  font-size: 0.8rem;
  color: rgba(255,255,255,.45);
  letter-spacing: 0.06em;
}

.sig-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.1em;
}

/* ===== Contact ===== */
#contact {
  background: var(--gray-light);
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  margin-top: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
}

.info-value {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.6;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.form-group label .req {
  color: var(--sky);
  margin-left: 4px;
  font-size: 0.7rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ja);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--gray-light);
  transition: border-color var(--transition), background var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--sky);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(58, 158, 204, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

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

.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-ja);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background var(--transition), transform var(--transition);
}

.btn-submit:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
}

.form-note {
  font-size: 0.75rem;
  color: var(--gray-mid);
  margin-top: 1rem;
  line-height: 1.6;
}

#form-status:empty { display: none; }

.form-status-success,
.form-status-error {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.form-status-success {
  background: rgba(58, 158, 204, 0.08);
  border: 1px solid rgba(58, 158, 204, 0.35);
  color: var(--navy);
}

.form-status-error {
  background: rgba(192, 57, 43, 0.06);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #922b21;
}

.form-status-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--sky);
  color: var(--white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 1px;
}

/* ===== Footer ===== */
#site-footer {
  background: linear-gradient(
    105deg,
    rgba(5,  12, 26, 1) 0%,
    rgba(13, 31, 60, 1) 40%,
    rgba(18, 38, 72, 1) 70%,
    rgba(8,  20, 42, 1) 100%
  );
  background-size: 300% 300%;
  padding: 3rem 0 2rem;
  animation: headerGradient 14s ease infinite;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2rem;
}


.footer-address {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.8;
  margin-top: 0.75rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  font-family: var(--font-ja);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--sky-light); }

.footer-bottom {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
}

/* ===== Page Loader ===== */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

/* カーテンが上にめくれる際の底辺ライン */
#site-loader::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--sky), var(--sky-light));
  transform: scaleX(0);
  transform-origin: left;
  animation: loaderLineGrow 0.65s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

#site-loader.is-hidden {
  transform: translateY(-100%);
}

.loader-logo {
  width: 240px;
  max-width: 55vw;
  animation: loaderLogoIn 0.7s cubic-bezier(0.34, 1.45, 0.64, 1) 0.2s both;
}

@keyframes loaderLogoIn {
  from { opacity: 0; transform: scale(0.88) translateY(14px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes loaderLineGrow {
  to { transform: scaleX(1); }
}

/* ===== 和 Accents ===== */

/* ヒーロー背景の大字「誠」 */
.hero-kanji {
  position: absolute;
  right: -2%;
  bottom: -4%;
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(260px, 38vw, 480px);
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.022);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.05em;
}

/* セクションラベルの◆モチーフ */
.section-label::before {
  content: '◆';
  font-size: 0.4em;
  margin-right: 0.6em;
  opacity: 0.6;
  vertical-align: middle;
  display: inline-block;
  transform: translateY(-1px);
}

/* Philosophy — 暗背景用 青海波 */
#philosophy::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 100%, transparent 50%, rgba(58, 158, 204, 0.035) 51%),
    radial-gradient(circle at 50% 100%, transparent 50%, rgba(58, 158, 204, 0.035) 51%);
  background-size: 40px 20px, 40px 20px;
  background-position: 0 0, 20px 10px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes glowFloat {
  0%,  100% { transform: translate(  0%,   0%) scale(1.00); }
  33%        { transform: translate(-4%,  3%) scale(1.07); }
  66%        { transform: translate( 3%, -2%) scale(0.96); }
}

@keyframes textShimmer {
  0%   { background-position:   0% center; }
  100% { background-position: 250% center; }
}

@keyframes btnGlow {
  0%,  100% { box-shadow: 0 4px 20px rgba(58, 158, 204, 0.35); }
  50%        { box-shadow: 0 4px 36px rgba(58, 158, 204, 0.70), 0 0 56px rgba(58, 158, 204, 0.15); }
}

@keyframes scrollLinePulse {
  0%,  100% { width: 40px; opacity: 0.35; }
  50%        { width: 60px; opacity: 0.85; }
}

/* Hero entrance — staggered */
.hero-tag        { opacity: 0; animation: fadeInUp 0.6s ease 0.15s forwards; }
.hero-title      { opacity: 0; animation: fadeInUp 0.7s ease 0.35s forwards; }
.hero-tagline    { opacity: 0; animation: fadeInUp 0.6s ease 0.55s forwards; }
.hero-tagline-en { opacity: 0; animation: fadeInUp 0.6s ease 0.65s forwards; }
.hero-actions    { opacity: 0; animation: fadeInUp 0.6s ease 0.80s forwards; }
.hero-scroll     { opacity: 0; animation: fadeIn  0.6s ease 1.10s forwards; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid,
  .message-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .philosophy-pillars {
    grid-template-columns: 1fr 1fr;
  }

  .message-portrait {
    position: static;
    max-width: 320px;
    margin: 0 auto;
  }

  .message-portrait::before {
    bottom: -12px;
    right: -12px;
    width: 70%;
    height: 55%;
  }
}

@media (max-width: 720px) {
  /* Header */
  .header-inner {
    height: 80px;
  }

  .logo-img {
    height: 60px;
  }

  /* Mobile nav — top に合わせてヘッダー高さを反映 */
  .global-nav,
  .nav-cta-wrap {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--navy-dark);
    padding: 1.5rem;
    border-top: 1px solid rgba(58, 158, 204, 0.2);
  }

  .global-nav.is-open { display: block; }

  .global-nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-toggle { display: flex; }

  /* Hero */
  .hero-content {
    padding: 100px 0 60px;
  }

  /* Sections */
  .philosophy-pillars {
    grid-template-columns: 1fr;
  }

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

  section { padding: 96px 0; }

  /* Message section */
  .message-portrait {
    max-width: 260px;
  }

  .message-portrait::before {
    display: none;
  }

  .message-body h3 {
    font-size: 1.2rem;
    text-align: center;
  }

  .message-signature {
    justify-content: center;
    text-align: center;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-logo-img {
    height: 64px;
    margin: 0 auto;
  }

  .footer-address {
    text-align: center;
  }

  .footer-nav ul {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .about-map {
    height: 220px;
  }

  /* Header */
  .header-inner {
    height: 68px;
  }

  .logo-img {
    height: 50px;
  }

  /* Mobile nav */
  .global-nav,
  .nav-cta-wrap {
    top: 68px;
  }

  /* Hero */
  .hero-content {
    padding: 88px 0 48px;
  }

  /* Message section */
  .message-portrait {
    max-width: 220px;
  }

  .message-body p {
    font-size: 0.88rem;
  }

  .hero-actions { flex-direction: column; }
  .btn-primary,
  .btn-outline { justify-content: center; }

  /* Footer */
  .footer-logo-img {
    height: 56px;
  }
}
