/* ============================================================
   SKY, LLC. — Common Stylesheet (v4 — JAFTAS-accurate)
   ============================================================ */

:root {
  /* Palette */
  --brand-dark: #0a1628;        /* Deep navy brand accent */
  --ink: #0a1628;               /* Primary deep navy (unified with brand-dark) */
  --ink-strong: #050b16;
  --ink-sub: #2a3a52;
  --ink-muted: #5c6b82;
  --ink-faint: #9aa5b5;

  --primary: #2b7bb9;           /* Supporting blue */
  --primary-strong: #1a4a7a;
  --primary-hover: #205a8c;
  --primary-light: #d9e9f3;     /* Pale blue bg (used for CTA fill) */
  --primary-pale: #eef5fb;
  --primary-ultra: #f5f9fc;

  --bg: #ffffff;
  --bg-soft: #f3f7fb;
  --bg-mid: #e4edf4;

  --line: #e2e8ee;
  --line-strong: #c7d3dd;

  /* Fonts (gothic only, no serif) */
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-en: "Inter", "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Layout */
  --max-w: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 120px;
  --nav-h-mobile: 76px;

  /* Easing */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink-sub);
  font-family: var(--font-jp);
  font-size: 15px;
  line-height: 1.9;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
ul { list-style: none; }

/* ============================================================
   NAVIGATION — JAFTAS-accurate (transparent, logo-mark, hamburger)
   ============================================================ */
nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  height: var(--nav-h);
  padding: 14px var(--gutter) 14px calc(var(--gutter) + 4px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.0);
  transition: background 0.4s var(--ease), box-shadow 0.4s, backdrop-filter 0.4s, padding 0.3s, height 0.3s;
}
nav.top.scrolled {
  padding-top: 8px;
  padding-bottom: 8px;
  height: calc(var(--nav-h) - 20px);
}

/* Mobile: compact nav, no scroll resize */
@media (max-width: 1024px) {
  nav.top,
  nav.top.scrolled {
    height: var(--nav-h-mobile);
    padding: 8px var(--gutter);
  }
  nav.top .logo-img { height: 48px; }
  .menu-btn { width: 60px; height: 60px; }
  .menu-btn span { width: 26px; }
}
nav.top.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(15, 27, 45, 0.04), 0 8px 24px -16px rgba(15, 27, 45, 0.08);
}

/* Logo (fixed size, doesn't shrink on scroll) */
nav.top .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
}
nav.top .logo-img {
  height: 72px;
  width: auto;
}

/* Nav right-side container (2-row structure) */
nav.top .nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
}
/* Top row (small text + JP|EN) */
.nav-top-row {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-jp);
  font-size: 11px;
  font-weight: 500;
  color: var(--brand-dark);
  letter-spacing: 0.03em;
}
.nav-top-row a {
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.nav-top-row a svg { width: 9px; height: 9px; opacity: 0.6; transition: opacity 0.2s; }
.nav-top-row a:hover { color: var(--primary); }
.nav-top-row a:hover svg { opacity: 1; }

/* Bottom row (main menu + CTAs) */
.nav-bottom-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
nav.top ul.menu {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 36px);
}
nav.top ul.menu > li > a {
  position: relative;
  padding: 10px 0;
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.25s;
  letter-spacing: 0.02em;
}
nav.top ul.menu > li.has-sub > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  transition: transform 0.25s;
  color: var(--primary);
}
nav.top ul.menu > li.has-sub:hover > a::after {
  transform: rotate(180deg);
}
nav.top ul.menu > li > a:hover,
nav.top ul.menu > li > a.active {
  color: var(--primary);
}

/* ===== Hover dropdown (mega-tooltip) for has-sub items ===== */
nav.top ul.menu > li.has-sub {
  position: relative;
}
nav.top ul.menu .mega-pop {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 760px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 24px 70px -20px rgba(10, 22, 40, 0.28), 0 2px 10px rgba(10, 22, 40, 0.06);
  border: 1px solid rgba(10, 22, 40, 0.05);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0.25s;
  z-index: 400;
}
nav.top ul.menu .mega-pop::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: white;
  border-left: 1px solid rgba(10, 22, 40, 0.05);
  border-top: 1px solid rgba(10, 22, 40, 0.05);
}
nav.top ul.menu .mega-pop::after {
  content: "";
  position: absolute;
  top: -24px;
  left: 0; right: 0;
  height: 24px;
}
nav.top ul.menu > li.has-sub:hover .mega-pop,
nav.top ul.menu > li.has-sub:focus-within .mega-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-pop-left {
  border-right: 1px solid var(--line);
  padding-right: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mega-pop-left .mega-wave {
  width: 36px;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}
.mega-pop-left .mega-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.16em;
  display: block;
  margin-bottom: 10px;
}
.mega-pop-left .mega-title {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
}

.mega-pop-right {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mega-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s;
}
.mega-card:hover { transform: translateY(-3px); }
.mega-card-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: box-shadow 0.3s;
  position: relative;
}
.mega-card:hover .mega-card-visual {
  box-shadow: 0 12px 30px -10px rgba(26, 63, 107, 0.3);
}
.mega-card-visual svg { width: 44%; max-width: 56px; opacity: 0.95; }
/* 各ビジュアルの背景色・グラデーション */
.mega-visual-message { background: linear-gradient(135deg, #5fa6d8 0%, #2b7bb9 100%); }
.mega-visual-values  { background: linear-gradient(135deg, #7fbbe0 0%, #1a3f6b 100%); }
.mega-visual-access  { background: linear-gradient(135deg, #4e95c9 0%, #0a1628 100%); }
.mega-visual-system  { background: linear-gradient(135deg, #2b7bb9 0%, #1a3f6b 100%); }

/* ===== Mega menu backdrop (dims page except nav/menu on hover) ===== */
.mega-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 290; /* just below nav (300) and mega-pop; above everything else */
}
body:has(nav.top ul.menu > li.has-sub:hover) .mega-backdrop,
body:has(nav.top ul.menu > li.has-sub:focus-within) .mega-backdrop {
  opacity: 1;
}
/* Keep nav fully opaque while backdrop is active, so the menu reads clearly */
body:has(nav.top ul.menu > li.has-sub:hover) nav.top,
body:has(nav.top ul.menu > li.has-sub:focus-within) nav.top {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(15, 27, 45, 0.04), 0 8px 24px -16px rgba(15, 27, 45, 0.08);
}

.mega-card-label {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.mega-card:hover .mega-card-label { color: var(--primary); }
/* Decorative blue stripe behind nav items (JAFTAS style) */
nav.top .nav-stripe {
  position: absolute;
  left: 90px;
  top: 10px;
  width: 50px;
  height: 56px;
  background: repeating-linear-gradient(45deg, var(--primary-light) 0, var(--primary-light) 4px, transparent 4px, transparent 8px);
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}

/* CTA buttons in nav */
.nav-cta-wrap { display: flex; gap: 8px; align-items: center; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--primary);
  border: 1px solid transparent;
  color: white;
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  transition: all 0.25s;
  min-width: 150px;
  justify-content: center;
}
.nav-cta svg { width: 16px; height: 16px; flex-shrink: 0; color: white; }
.nav-cta:hover {
  background: var(--brand-dark);
  color: white;
}
.nav-cta:hover svg { color: white; }

/* Primary CTA (お問い合わせ) */
.nav-cta-main {
  padding: 13px 24px;
  min-width: 0;
  font-size: 13px;
  background: var(--primary);
  border: none;
  border-radius: 4px;
  gap: 8px;
  box-shadow: 0 2px 6px -2px rgba(43, 123, 185, 0.3);
}
.nav-cta-main svg { width: 16px; height: 16px; }
.nav-cta-main:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -6px rgba(43, 123, 185, 0.45);
}

/* JP|EN language pill toggle (compact) */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #5fa6d8 0%, #2b7bb9 100%);
  border-radius: 999px;
  padding: 2px;
  gap: 1px;
  box-shadow: 0 2px 6px rgba(43, 123, 185, 0.18);
}

/* Mobile-only lang toggle (sits beside hamburger) */
.lang-toggle-mobile { display: none; }
@media (max-width: 1024px) {
  /* Repeated class selector raises specificity above .lang-toggle button.active defaults */
  .lang-toggle.lang-toggle-mobile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: 16px;
    margin-left: auto;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .lang-toggle.lang-toggle-mobile button {
    padding: 6px 2px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-en);
    background: transparent;
    border-radius: 0;
    color: var(--ink);
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    line-height: 1;
  }
  .lang-toggle.lang-toggle-mobile button.active {
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    position: relative;
  }
  .lang-toggle.lang-toggle-mobile button.active::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: -2px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
  }
  .lang-toggle.lang-toggle-mobile button:not(.active) {
    color: var(--ink-muted);
    opacity: 0.55;
  }
  .lang-toggle.lang-toggle-mobile button:not(.active):hover {
    opacity: 0.9;
    color: var(--ink);
  }
  .lang-toggle.lang-toggle-mobile .lang-sep {
    font-size: 16px;
    font-weight: 300;
    color: var(--ink-muted);
    opacity: 0.35;
    margin: 0;
    line-height: 1;
    user-select: none;
  }
}
.lang-toggle button {
  padding: 4px 10px;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  color: white;
  background: transparent;
  border-radius: 999px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-toggle button.active {
  background: white;
  color: var(--primary-strong);
}
.lang-toggle .lang-sep {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  padding: 0 1px;
}

/* Hamburger button (gradient blue square) */
.menu-btn {
  width: 75px;
  height: 75px;
  background: linear-gradient(135deg, #5fa6d8 0%, var(--primary) 55%, var(--primary-strong) 100%);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 10px;
  transition: all 0.25s;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(43, 123, 185, 0.4);
}
.menu-btn:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 60%, var(--brand-dark) 100%);
  transform: translateY(-1px);
}
.menu-btn span {
  display: block;
  width: 30px;
  height: 2px;
  background: white;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 1024px) {
  nav.top .nav-right { display: none; }
  nav.top { height: var(--nav-h-mobile); padding: 8px var(--gutter); }
  nav.top .logo-img { height: 48px; }
  .menu-btn { width: 60px; height: 60px; }
  .menu-btn span { width: 26px; }
}

/* ============================================================
   Full-screen fly-out menu (JAFTAS style — blue bg)
   ============================================================ */
.fly-menu {
  position: fixed;
  inset: 0;
  background: linear-gradient(165deg, #2b7bb9 0%, #1a5a94 50%, #205a8c 100%);
  color: white;
  z-index: 310;
  padding: 20px var(--gutter) 40px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.fly-menu.open { transform: translateX(0); }

.fly-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  padding-bottom: 16px;
}
.fly-menu-head .logo {
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.fly-menu-head .logo img {
  height: 54px;
  filter: brightness(0) invert(1);        /* turn the logo white */
}
.fly-close {
  width: 46px;
  height: 46px;
  background: white;
  border-radius: 4px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
}

.fly-menu-list { flex: 1; }
.fly-menu-list > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.fly-menu-list > li > a,
.fly-menu-list > li > button.fly-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 4px;
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 16px;
  color: white;
  text-align: left;
  background: transparent;
}
.fly-menu-list > li > a svg,
.fly-menu-list > li > button svg {
  width: 16px; height: 16px;
  color: white;
  opacity: 0.9;
  transition: transform 0.3s;
}
.fly-menu-list > li.open > button.fly-toggle svg {
  transform: rotate(45deg);
}
.fly-menu-list .sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.fly-menu-list > li.open .sub { max-height: 400px; }
.fly-menu-list .sub a {
  display: block;
  padding: 12px 4px 12px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.fly-menu-list .sub a:first-child { border-top: none; }

/* ===== PC flyout: multi-column grid layout (desktop only) ===== */
@media (min-width: 821px) {
  .fly-menu {
    padding: 24px clamp(40px, 6vw, 80px) 60px;
  }
  .fly-menu-head {
    max-width: 1400px;
    margin: 0 auto 48px;
    width: 100%;
  }
  .fly-menu-list {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 48px;
  }
  .fly-menu-list > li {
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding-top: 4px;
  }
  .fly-menu-list > li > a,
  .fly-menu-list > li > button.fly-toggle {
    padding: 18px 4px 14px;
    font-size: 18px;
    font-weight: 700;
    pointer-events: auto;
  }
  /* On PC, sub items always visible (no accordion needed) */
  .fly-menu-list > li > button.fly-toggle svg { display: none; }
  .fly-menu-list .sub {
    max-height: none;
    overflow: visible;
    display: block;
    margin-top: 4px;
  }
  .fly-menu-list .sub a {
    padding: 10px 4px 10px 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.82);
    border-top: none;
    position: relative;
    padding-left: 18px;
  }
  .fly-menu-list .sub a::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 10px; height: 1px;
    background: rgba(255, 255, 255, 0.5);
  }
  .fly-menu-list .sub a:hover {
    color: white;
  }

  .fly-menu-ctas {
    max-width: 1400px;
    margin: 48px auto 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 16px;
    justify-content: flex-end;
  }
  .fly-menu-cta {
    min-width: 240px;
  }
}

.fly-menu-ctas {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fly-menu-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--primary-strong);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  color: white;
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 14px;
}
.fly-menu-cta:hover { background: #15476f; }
.fly-menu-cta-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fly-menu-cta .cta-ico {
  width: 36px; height: 36px;
  background: white;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}
.fly-menu-cta .cta-ico svg { width: 18px; height: 18px; }

/* Decorative waves at bottom of fly-menu */
.fly-menu::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(255,255,255,0.06) 0%, transparent 65%);
  pointer-events: none;
}

/* ============================================================
   PAGE HERO (sub-pages — JAFTAS style)
   ============================================================ */
.page-hero {
  padding: calc(var(--nav-h) + 60px) var(--gutter) 80px;
  background: linear-gradient(180deg, var(--primary-pale) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.page-hero h1 {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 18px;
}
.page-hero h1 .en {
  display: block;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}
.page-hero p.lead {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-sub);
  max-width: 680px;
}

/* ============================================================
   SECTION LABEL (JAFTAS: wave-mark + English label)
   ============================================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-label .wave-mark {
  display: none;         /* removed per spec */
}
.section-label .label-text {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.on-dark .section-label .label-text { color: rgba(255,255,255,0.9); }

/* Remove all other wave-mark and hero-waves decorations site-wide */
.wave-mark { display: none !important; }
.hero-waves { display: none !important; }
.footer-wave { display: none !important; }

/* ============================================================
   BUTTONS (JAFTAS style)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 36px;
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 14px;
  border-radius: 3px;
  transition: all 0.25s var(--ease);
  position: relative;
}
.btn svg {
  width: 14px; height: 10px;
  transition: transform 0.3s;
}
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
  min-width: 240px;
  justify-content: space-between;
}
.btn-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-outline {
  background: white;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: white;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  padding: 6px 0;
}
.btn-text svg {
  width: 24px; height: 24px;
  padding: 6px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}
.btn-text:hover svg { transform: translateX(4px); }

/* ============================================================
   FOOTER (JAFTAS-accurate — grid nav + big wave + policy row)
   ============================================================ */
footer.site-footer {
  background: var(--bg-soft);
  color: var(--ink-sub);
  padding: 70px var(--gutter) 0;
  position: relative;
  overflow: hidden;
}

/* === Grid nav (4 cols) === */
.footer-nav {
  max-width: var(--max-w);
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-col-group h4 {
  font-family: var(--font-jp);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-col-group h4 a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: inherit;
  transition: color 0.25s;
}
.footer-col-group h4 a:hover { color: var(--primary); }
.footer-col-group h4 .arrow {
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.footer-col-group h4 .arrow svg { width: 14px; height: 14px; }
.footer-col-group ul li {
  margin-bottom: 10px;
}
.footer-col-group ul li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--ink-sub);
  transition: color 0.25s;
}
.footer-col-group ul li a:hover { color: var(--primary); }
.footer-col-group ul li a .ext {
  width: 10px; height: 10px;
  opacity: 0.65;
}

/* Addr block (sits in col 4) */
.footer-addr {
  padding-top: 20px;
}
.footer-addr h5 {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 12px;
}
.footer-addr p {
  font-family: var(--font-jp);
  font-size: 12px;
  line-height: 1.9;
  color: var(--ink-sub);
}
.footer-addr .email-line {
  margin-top: 10px;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 12px;
  color: var(--primary);
}

/* === Big wave decoration (JAFTAS signature) === */
.footer-wave {
  position: relative;
  width: 100%;
  height: 180px;
  margin-top: 20px;
  pointer-events: none;
}
.footer-wave svg {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* === Bottom row (links + logo + copyright) — separated white section === */
.footer-bottom-wrap {
  background: #ffffff;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding: 28px var(--gutter);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: flex-end;
}
.footer-bottom-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-office {
  font-family: var(--font-jp);
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-brand-logo {
  display: inline-block;
  line-height: 0;
}
.footer-brand-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.footer-brand-logo:hover { opacity: 0.75; }
.footer-policies {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  font-family: var(--font-jp);
  font-size: 11px;
}
.footer-policies a {
  color: var(--ink-sub);
  transition: color 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.footer-policies a:hover { color: var(--primary); }
.footer-policies a svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  opacity: 0.65;
}
.footer-policies a:hover svg { opacity: 1; }

.footer-bottom-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}
.footer-bottom-right .footer-logo-mark {
  display: inline-flex;
  align-items: center;
}
.footer-bottom-right .footer-logo-mark img { height: 32px; }
.footer-bottom-right .footer-copy {
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}
.footer-sdgs-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.25s;
}
.footer-sdgs-link img { width: 150px; height: auto; display: block; }
.footer-sdgs-link:hover { opacity: 0.75; }
@media (max-width: 720px) {
  .footer-sdgs-link img { width: 130px; }
}

/* Back-to-top button */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.25s;
  z-index: 100;
  cursor: pointer;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--primary-hover); }
.to-top svg { width: 18px; height: 18px; }

/* ===== Footer responsive ===== */
@media (max-width: 1100px) {
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  footer.site-footer { padding: 50px var(--gutter) 0; }
  .footer-nav {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 32px;
  }
  .footer-col { gap: 0; }
  /* Accordion-like compact list on mobile */
  .footer-col-group h4 {
    margin-bottom: 0;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .footer-col-group h4 .arrow {
    width: 20px; height: 20px;
  }
  .footer-col-group ul {
    display: none;
  }
  .footer-col-group.open ul {
    display: block;
    padding: 12px 4px 20px;
  }
  .footer-addr {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }
  .footer-wave { height: 100px; margin-top: 10px; }
  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
  }
  .footer-bottom-right {
    align-items: flex-start;
    text-align: left;
  }
  .footer-policies { gap: 12px 20px; font-size: 11px; }
  .btn-primary { min-width: 100%; }
}
@media (max-width: 480px) {
  .footer-policies { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Pillars Section (dark BG with illustration) ===== */
.pillars-section {
  padding: clamp(70px, 10vw, 120px) var(--gutter);
  background: linear-gradient(180deg, #0a1628 0%, #0f1f36 100%);
  color: white;
  text-align: center;
  overflow: hidden;
}
.pillars-inner { max-width: 1100px; margin: 0 auto; }
.pillars-mini-en {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
}
.pillars-section h2 {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: clamp(22px, 3.2vw, 36px);
  line-height: 1.5;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}
.pillars-lead {
  font-family: var(--font-jp);
  font-size: 14.5px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}
.pillars-visual {
  margin: 0 auto clamp(36px, 5vw, 56px);
  max-width: 820px;
  position: relative;
}
.pillars-visual::after {
  content: "";
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(ellipse at center, rgba(43, 123, 185, 0.25), transparent 65%);
  z-index: -1;
  filter: blur(30px);
}
.pillars-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 920px;
  margin: 0 auto;
}
.pillar-item { text-align: left; }
.pillar-item .pillar-label {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #5fa6d8;
  margin-bottom: 12px;
}
.pillar-item h3 {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 12px;
  color: white;
}
.pillar-item p {
  font-family: var(--font-jp);
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.75);
}
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: 1fr; gap: 28px; max-width: 460px; }
  .pillar-item { text-align: center; }
}

/* ============================================================
   Home Tech Stack — reference-image style (3 x 5 logo grid)
   ============================================================ */
.home-tech-stack {
  padding: clamp(80px, 10vw, 130px) var(--gutter);
  background: #fafbfc;
}
.home-tech-stack-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.home-tech-stack-head {
  text-align: center;
  margin-bottom: 56px;
}
.home-tech-stack-head .mini-en {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--primary);
  margin-bottom: 18px;
}
.home-tech-stack-head h2 {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: clamp(30px, 4.2vw, 46px);
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.home-tech-stack-head .sub {
  font-family: var(--font-jp);
  font-size: 15px;
  color: var(--ink-sub);
  line-height: 1.9;
  margin-bottom: 20px;
}
.home-tech-stack-head .deco-bar {
  width: 44px;
  height: 2px;
  background: var(--primary);
  margin: 20px auto 0;
}
.home-tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.home-tech-item {
  background: white;
  border-radius: 12px;
  padding: 34px 20px 22px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.03), 0 4px 14px rgba(10, 22, 40, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.home-tech-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(10, 22, 40, 0.05), 0 12px 28px rgba(10, 22, 40, 0.09);
}
.home-tech-item-logo {
  height: 62px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.home-tech-item-logo img {
  max-width: 86%;
  max-height: 100%;
  object-fit: contain;
}
/* Figma / Docker source images render smaller than peers — nudge up */
.home-tech-item-logo img[alt="Figma"],
.home-tech-item-logo img[alt="Docker"] {
  max-width: 100%;
  transform: scale(1.3);
  transform-origin: center;
}
.home-tech-item-label {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.home-tech-item-other-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}
.home-tech-item-other-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c3cad6;
}
.home-tech-item-other .home-tech-item-label {
  font-family: var(--font-jp);
  font-weight: 500;
  color: var(--ink-muted);
}
@media (max-width: 1024px) {
  .home-tech-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .home-tech-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .home-tech-item { padding: 26px 14px 18px; border-radius: 10px; }
  .home-tech-item-logo { height: 50px; margin-bottom: 14px; }
  .home-tech-item-label { font-size: 13px; }
}
@media (max-width: 480px) {
  .home-tech-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .home-tech-item-logo { height: 46px; }
}
