/* ================================================================
   Hayakawa Electronics America — style.css
   Encoding: UTF-8
   Breakpoint: 768px (mobile)
================================================================ */

/* ----------------------------------------------------------------
   1. CSS Custom Properties (:root)
---------------------------------------------------------------- */
:root {
  /* Colors */
  --c-bg:          #080808;
  --c-bg-alt:      #111111;
  --c-bg-card:     #161616;
  --c-bg-card-hov: #1e1e1e;
  --c-border:      #2a2a2a;
  --c-accent:      #CC0000;
  --c-accent-dim:  #990000;
  --c-text:        #f0f0f0;
  --c-text-muted:  #999999;
  --c-text-dim:    #555555;
  --c-white:       #ffffff;

  /* Typography */
  --f-heading: 'Noto Sans', sans-serif;
  --f-body:    'Noto Sans', sans-serif;
  --f-ja:      'Noto Sans JP', sans-serif;

  /* Layout */
  --nav-h:         72px;
  --max-w:         1200px;
  scroll-padding-top: var(--nav-h);
  --section-py:    50px;
  --section-py-sm: 30px;
  --radius:        4px;
  --radius-lg:     8px;

  /* Animation */
  --ease:   cubic-bezier(.4, 0, .2, 1);
  --dur:    .3s;
  --dur-lg: .6s;

  /* Scrollbar gap (set by JS when modal opens to prevent layout shift) */
  --scrollbar-gap: 0px;
}

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

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

body {
  font-family: var(--f-body);
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Sans', sans-serif;
}

/* ----------------------------------------------------------------
   3. Utility
---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 40px;
}

.ja {
  font-family: var(--f-ja);
  font-weight: 300;
}

.lead {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

p + p {
  margin-top: 1rem;
}

strong {
  color: var(--c-white);
  font-weight: 600;
}

.small {
  font-size: .8rem;
}

.img-caption {
  display: block;
  margin-top: .5rem;
  font-size: .75rem;
  color: var(--c-text-dim);
  letter-spacing: .05em;
}

/* ----------------------------------------------------------------
   4. Scroll Reveal
---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur-lg) var(--ease),
              transform var(--dur-lg) var(--ease);
}

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

/* ----------------------------------------------------------------
   5. Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 2.2rem;
  font-family: var(--f-heading);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn--primary {
  background: var(--c-accent);
  color: var(--c-white);
  border: 2px solid var(--c-accent);
}

.btn--primary:hover {
  background: var(--c-accent-dim);
  border-color: var(--c-accent-dim);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--c-white);
  border: 2px solid rgba(255,255,255,.5);
}

.btn--outline:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--c-white);
  transform: translateY(-2px);
}

.btn--full {
  width: 100%;
}

/* ----------------------------------------------------------------
   6. Header / Navigation
---------------------------------------------------------------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--nav-h);
  padding-inline-end: var(--scrollbar-gap);
  transition: box-shadow var(--dur) var(--ease);
}

/*
 * backdrop-filter creates a new containing block for position:fixed descendants,
 * which breaks the fullscreen nav overlay on mobile. Moving it to ::before avoids this.
 */
#site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, .96);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
  z-index: -1;
}

#site-header.scrolled {
  box-shadow: 0 1px 0 var(--c-border);
}

#site-header.scrolled::before {
  opacity: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: 40px;
  max-width: var(--max-w);
  margin-inline: auto;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-shrink: 0;
}

.nav__logo-img {
  height: 48px;
  width: auto;
  background: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
}

.hero__logo-img {
  height: clamp(70px, 12vw, 110px);
  width: auto;
  background: #ffffff;
  border-radius: 6px;
  padding: 4px 10px;
}

.footer__logo-img {
  height: 50px;
  width: auto;
  background: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  gap: .2rem;
  justify-content: center;
}

.logo-text__main {
  font-family: var(--f-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--c-white);
}

.logo-text__sub {
  font-family: var(--f-heading);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--c-accent);
  text-transform: uppercase;
}

/* Nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav__link {
  font-family: var(--f-heading);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  transition: color var(--dur) var(--ease);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--c-accent);
  transition: width var(--dur) var(--ease);
}

.nav__link:hover,
.nav__link.active {
  color: #ffffff;
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link.btn::after {
  display: none;
}

#site-header .nav__link.btn--primary:hover {
  transform: none;
}

.nav__link--accent {
  color: var(--c-accent);
}

.nav__link--accent:hover {
  color: var(--c-accent-dim);
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1100;
}

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

.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------------
   7. Hero / Slider
---------------------------------------------------------------- */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

/* ---- Slides ---- */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s var(--ease);
  pointer-events: none;
}

.slide--active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Slider arrows ---- */
.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.slider__arrow:hover {
  background: rgba(204,0,0,.75);
  border-color: var(--c-accent);
}

.slider__arrow--prev { left: 2rem; }
.slider__arrow--next { right: 2rem; }

/* ---- Slider dots ---- */
.slider__dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: .55rem;
}

.slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.slider__dot--active {
  background: var(--c-accent);
  transform: scale(1.35);
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
}

.hero__video,
.slide__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8,8,8,.85) 0%,
    rgba(8,8,8,.55) 60%,
    rgba(8,8,8,.40) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.slide--active .hero__content {
  animation: heroFadeUp .9s var(--ease) .15s both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  font-family: var(--f-heading);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-accent);
  text-align: center;
  margin-bottom: .5rem;
}

.hero__title {
  font-family: var(--f-heading);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--c-white);
  text-align: center;
  margin-top: 1rem;
  margin-bottom: .75rem;
}

.hero__cta {
  margin-top: .5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: heroFadeUp .9s var(--ease) .8s both;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--c-accent));
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: .2; }
}

/* ----------------------------------------------------------------
   9. Sections (common)
---------------------------------------------------------------- */
.section {
  padding-block: var(--section-py);
}

.section--alt {
  background: var(--c-bg-alt);
}

.section__header {
  margin-bottom: 2.5rem;
}

.section__num {
  display: block;
  font-family: var(--f-heading);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .5rem;
}

.section__title {
  font-family: var(--f-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: var(--c-white);
  margin-bottom: 1.25rem;
}

.section__line {
  width: 60px;
  height: 3px;
  background: var(--c-accent);
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   10. Two-Column Layout
---------------------------------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Who We Are — stretch media column to match text height */
#about .two-col {
  align-items: stretch;
}

/* What We Do — row height follows content; shorter images avoid gap under text */
#what-we-do .two-col {
  align-items: start;
}

/* Pass height down to image children */
#about .two-col .two-col__media,
#what-we-do .two-col .two-col__media {
  display: flex;
  flex-direction: column;
}

.two-col--img-right .two-col__media { order: 2; }
.two-col--img-right .two-col__text  { order: 1; }
.two-col--img-left  .two-col__media { order: 1; }
.two-col--img-left  .two-col__text  { order: 2; }

.two-col__media img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
}

/* Who We Are — stacked two-image column */
.about-img-stack {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1;
  height: 100%;
}

.about-img-stack > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.about-img-stack img {
  width: 100%;
  flex: 1;
  min-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
}

.img-badge {
  position: absolute;
  bottom: .6rem;
  left: .6rem;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  color: var(--c-accent);
  font-family: var(--f-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 2px;
}

/* Feature list */
.feature-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  color: var(--c-text);
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
}

/* ----------------------------------------------------------------
   11. Global Network — World Map
---------------------------------------------------------------- */
.world-map {
  margin-bottom: 3rem;
}

.world-map__bg {
  position: relative;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 323 / 159;
}

.world-map__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* invert: ocean → black (matches --c-bg), land → light silhouette */
  filter: invert(1) brightness(0.72);
  opacity: 0.65;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---- Map pins with always-visible country labels ---- */
.map-pin {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 2px rgba(204,0,0,.2), 0 0 8px rgba(204,0,0,.5);
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
  transition: transform var(--dur) var(--ease);
}

.map-pin:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
}

.map-pin--hq {
  left: 85.4%;
  top: 43.7%;
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 4px rgba(204,0,0,.25), 0 0 16px rgba(204,0,0,.7);
}

.map-pin--us {
  left: 19%;
  top: 46%;
  width: 11px;
  height: 11px;
  box-shadow: 0 0 0 3px rgba(204,0,0,.2), 0 0 10px rgba(204,0,0,.5);
}

/* Pin positions (equirectangular: x=(lon+180)/360*100, y=(90-lat)/180*100) */
.map-pin--mexico { left: 19%; top: 53%; }
.map-pin--england { left: 46%; top: 31%; }
.map-pin--czech { left: 51.5%; top: 35%; }
.map-pin--india { left: 68.5%; top: 49%; }
.map-pin--china { left: 78.5%; top: 41%; }
.map-pin--hong-kong { left: 78.5%; top: 50.5%; }
.map-pin--vietnam { left: 76.75%; top: 59%; }
.map-pin--thailand { left: 74.5%; top: 55.5%; }
.map-pin--philippines { left: 81.5%; top: 56.5%; }
.map-pin--singapore { left: 75.5%; top: 63.5%; }

.map-pin__label--hq {
  background: #ffffff;
  color: var(--c-accent);
  border: 1px solid rgba(204,0,0,.3);
}

@keyframes pinPulse {
  0%, 100% { transform: scale(1); opacity: .45; }
  50%       { transform: scale(1.7); opacity: 0; }
}

/* ---- Label box ---- */
.map-pin__label {
  position: absolute;
  background: var(--c-accent);
  color: #fff;
  font-family: var(--f-heading);
  font-size: clamp(8px, 0.72vw, 11px);
  font-weight: 700;
  letter-spacing: .08em;
  padding: 3px 8px 4px;
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1.4;
  cursor: pointer;
  z-index: 6;
}

/* Thin connector line from label to dot */
.map-pin__label::before {
  content: '';
  position: absolute;
  background: rgba(204,0,0,.7);
  pointer-events: none;
}

/* RIGHT  — label sits right of dot, line extends left from label */
.map-pin__label[data-dir="r"]  { left:14px; top:50%; transform:translateY(-50%); }
.map-pin__label[data-dir="r"]::before { right:100%; top:50%; width:8px; height:1px; transform:translateY(-50%); }

/* RIGHT + down ~45° — diagonal connector (e.g. Vietnam vs Philippines overlap) */
.map-pin__label[data-dir="rd45"] {
  left: 14px;
  top: 50%;
  transform: translate(4px, calc(-50% + 12px));
}
.map-pin__label[data-dir="rd45"]::before {
  right: 100%;
  top: 50%;
  width: 14px;
  height: 1px;
  transform-origin: right center;
  transform: translateY(-50%) rotate(45deg);
}

/* LEFT   — label sits left of dot, line extends right from label */
.map-pin__label[data-dir="l"]  { right:14px; top:50%; transform:translateY(-50%); }
.map-pin__label[data-dir="l"]::before { left:100%; top:50%; width:8px; height:1px; transform:translateY(-50%); }

/* TOP    — label sits above dot, line extends down from label */
.map-pin__label[data-dir="t"]  { bottom:14px; left:50%; transform:translateX(-50%); }
.map-pin__label[data-dir="t"]::before { top:100%; left:50%; width:1px; height:8px; transform:translateX(-50%); }

/* BOTTOM — label sits below dot, line extends up from label */
.map-pin__label[data-dir="b"]  { top:14px; left:50%; transform:translateX(-50%); }
.map-pin__label[data-dir="b"]::before { bottom:100%; left:50%; width:1px; height:8px; transform:translateX(-50%); }

/* Diagonals (no connector — proximity implies link) */
.map-pin__label[data-dir="tl"] { bottom:13px; right:13px; }
.map-pin__label[data-dir="tr"] { bottom:13px; left:13px; }
.map-pin__label[data-dir="bl"] { top:13px; right:13px; }
.map-pin__label[data-dir="br"] { top:13px; left:13px; }

/* ---- Map location detail modal ---- */
html.map-detail-modal--open {
  overflow: hidden;
}

body.map-detail-modal--open {
  overflow: hidden;
  padding-inline-end: var(--scrollbar-gap);
}

.map-detail-modal[hidden] {
  display: none !important;
}

.map-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.map-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.map-detail-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 2rem));
  max-height: min(92vh, 900px);
  overflow: hidden;
  background: rgba(10, 10, 10, 0.98);
  border: 1px solid rgba(204, 0, 0, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85);
  padding: 1.25rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
}

.map-detail-modal__close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 2.35rem;
  height: 2.35rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: #e8e8e8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.map-detail-modal__close:hover {
  color: var(--c-accent);
  background: rgba(255, 255, 255, 0.06);
}

.map-detail-modal__sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.map-detail-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.15rem;
  padding-right: 2.25rem;
  padding-bottom: 1.5rem;
  overscroll-behavior: contain;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  color: #e8e8e8;
  font-size: 0.82rem;
  line-height: 1.65;
}

.map-detail-modal__body strong {
  column-span: all;
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #ff7777;
  margin-bottom: 0.35rem;
  font-family: var(--f-heading);
  line-height: 1.3;
}

.map-detail-modal__body em {
  display: block;
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
  font-style: normal;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-accent);
  font-weight: 600;
}

.map-detail-modal__body .tip-location {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #e8e8e8;
  font-weight: 500;
}

.map-detail-modal__body em + strong {
  margin-top: 1.4rem;
}

#tab-hiring-ja .lead {
  font-weight: 400;
  color: var(--c-text);
}

@media (max-width: 767px) {
  .map-detail-modal__panel {
    max-height: 89vh;
    max-height: 89dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-detail-modal__close {
    transition: none;
  }
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 1px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
  width: fit-content;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.75rem;
  font-family: var(--f-heading);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  background: var(--c-bg-card);
  transition: all var(--dur) var(--ease);
}

.tab-btn.active {
  background: var(--c-accent);
  color: var(--c-white);
}

.tab-btn:hover:not(.active) {
  background: var(--c-bg-card-hov);
  color: var(--c-white);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel.active .reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Unified map+locations view (no tabs) */
.world-map--unified {
  margin-bottom: 2rem;
}

/* ----------------------------------------------------------------
   12. Products
---------------------------------------------------------------- */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--c-border);
}

.product-row:last-child {
  border-bottom: none;
}

.product-row--alt .product-row__media { order: 2; }
.product-row--alt .product-row__body  { order: 1; }

.product-row__media {
  position: relative;
}

.product-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
}

.product-row__body h3 {
  font-family: var(--f-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--c-white);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
}

.product-tag {
  display: block;
  font-family: var(--f-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .75rem;
}

/* ----------------------------------------------------------------
   13. Sales Contact
---------------------------------------------------------------- */
.sales-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.sales-strengths__title {
  font-family: var(--f-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 2rem;
}

.strength-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.strength-icon {
  font-size: 1.2rem;
  color: var(--c-accent);
  flex-shrink: 0;
  margin-top: .1rem;
}

.strength-item h4 {
  font-family: var(--f-heading);
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: .4rem;
}

.strength-item p {
  font-size: .875rem;
  color: var(--c-text-muted);
  line-height: 1.7;
}

/* Form */
.contact-form-block h3 {
  font-family: var(--f-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 1.75rem;
}

.form__row--half {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.form__group {
  margin-bottom: 1rem;
  min-width: 0;
}

.form__group label {
  display: block;
  font-family: var(--f-heading);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: .45rem;
}

.form__group input,
.form__group select,
.form__group textarea {
  width: 100%;
  max-width: 100%;
  padding: .75rem 1rem;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: .9rem;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
  appearance: none;
}

.form__group input::placeholder,
.form__group textarea::placeholder {
  color: var(--c-text-dim);
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  background: var(--c-bg-card-hov);
}

.form__group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form__group textarea {
  resize: vertical;
  min-height: 130px;
}

/* ----------------------------------------------------------------
   14. Hiring
---------------------------------------------------------------- */
.hiring-content .lead {
  margin-bottom: 1rem;
}

.hiring-content > .ja {
  font-size: .875rem;
  color: var(--c-text-muted);
  margin-bottom: 2.5rem;
  display: block;
}

/* Job Card */
.job-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2rem;
}

.job-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  background: rgba(204, 0, 0, .06);
}

.job-card__header h3 {
  font-family: var(--f-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-white);
}

.job-badge {
  font-family: var(--f-heading);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-white);
  background: var(--c-accent);
  padding: .25rem .65rem;
  border-radius: 3px;
}

.job-table {
  padding: .5rem 0;
}

.job-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  padding: .9rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  font-size: .85rem;
  line-height: 1.6;
}

.job-row:last-child {
  border-bottom: none;
}

.job-label {
  font-family: var(--f-heading);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  padding-top: .1rem;
}

/* ----------------------------------------------------------------
   15. Footer
---------------------------------------------------------------- */
.footer {
  background: #050505;
  border-top: 1px solid var(--c-border);
  padding-top: 4rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--c-border);
}

.footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.footer__name {
  font-family: var(--f-heading);
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-white);
}

.footer__tagline {
  font-size: .78rem;
  color: var(--c-accent);
  letter-spacing: .1em;
  margin-top: 0;
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.footer__nav a {
  font-family: var(--f-heading);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  transition: color var(--dur) var(--ease);
}

.footer__nav a:hover {
  color: var(--c-accent);
}

.footer__info {
  font-size: .82rem;
  color: var(--c-text-muted);
  line-height: 1.7;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  font-size: .75rem;
  color: var(--c-text-dim);
}

.footer__parent {
  font-family: var(--f-heading);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

/* ----------------------------------------------------------------
   16. Sticky Contact Us Button
---------------------------------------------------------------- */
.sticky-contact {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--f-heading);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(204,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              background var(--dur) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.sticky-contact.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sticky-contact:hover {
  background: var(--c-accent-dim);
}

.sticky-contact__icon {
  font-size: .85rem;
  line-height: 1;
}

/* ----------------------------------------------------------------
   17. Back to Top
---------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--c-accent-dim);
}

/* ----------------------------------------------------------------
   18. Responsive — 768px
---------------------------------------------------------------- */
@media (max-width: 768px) {

  :root {
    --nav-h:         60px;
    --section-py:    var(--section-py-sm);
  }

  .container {
    padding-inline: 20px;
  }

  /* Nav mobile */
  .nav {
    padding-inline: 20px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 8, .97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-lg) var(--ease);
    z-index: 1050;
  }

  .nav__links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav__link {
    font-size: 1.1rem;
    letter-spacing: .12em;
  }

  /* Logo text hidden on mobile */
  .logo-text__main {
    display: none;
  }

  /* Hero */
  .hero__title {
    text-align: center;
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  /* Two col → stack */
  .two-col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .two-col--img-right .two-col__media,
  .two-col--img-left  .two-col__media {
    order: 1;
  }

  .two-col--img-right .two-col__text,
  .two-col--img-left  .two-col__text {
    order: 0;
  }

  .two-col__media img {
    height: 240px;
  }

  /* What We Do img-duo — match section 01 image height */
  #what-we-do .img-duo__item img {
    height: 240px;
  }

  /* World map */
  .world-map--unified {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 24px 8px;
  }
  
  .world-map__bg {
    border: none;
    border-radius: none;
  }

  .map-pin {
    width: 6px;
    height: 6px;
  }

  /* Wider invisible hit area — labels hidden on small screens */
  .map-pin::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
  }

  .map-pin__label { display: none; }

  /* Tabs full width */
  .tab-bar {
    width: 100%;
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: .65rem 1rem;
    font-size: .72rem;
  }

  /* Products */
  .product-row {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-block: 2.5rem;
  }

  .product-row--alt .product-row__media,
  .product-row--alt .product-row__body {
    order: unset;
  }

  .product-img {
    height: 220px;
  }

  /* Form half row */
  .form__row--half {
    grid-template-columns: 1fr;
  }

  /* Sales grid */
  .sales-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Job table */
  .job-row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: .5rem;
    text-align: center;
  }

  /* Slider arrows hidden on mobile — swipe to navigate */
  .slider__arrow {
    display: none;
  }

  /* Hero CTA buttons — same width, smaller size on mobile */
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta .btn {
    padding: .6rem 1.4rem;
    font-size: .78rem;
  }

  /* Sticky contact + back to top — same vertical position */
  .sticky-contact {
    bottom: 1.2rem;
    left: 1.2rem;
  }

  /* Back to top */
  .back-to-top {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 38px;
    height: 38px;
  }
}

/* ----------------------------------------------------------------
   18. Product — White Background Style
---------------------------------------------------------------- */
.product-row__media--stage {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 340px;
}

.product-img--cutout {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  border: none;
  border-radius: 0;
  display: block;
  background: transparent;
  transition: transform .5s var(--ease);
}

.product-row__media--stage:hover .product-img--cutout {
  transform: scale(1.04);
}

.product-img--rotated {
  transform: rotate(90deg) scale(1.3);
}

.product-row__media--stage:hover .product-img--rotated {
  transform: rotate(90deg) scale(1.35);
}

/* img-duo: two photos stacked vertically (What We Do section) */
.img-duo {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex: 1;
}

.img-duo__item {
  position: relative;
  flex: 1;
  min-height: 0;
}

.img-duo__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  display: block;
}

/* What We Do — fixed stack height (no flex grow) so text column sets row height */
#what-we-do .img-duo {
  flex: 0 0 auto;
}

#what-we-do .img-duo__item {
  flex: none;
}

@media (min-width: 769px) {
  #what-we-do .img-duo__item img {
    height: clamp(152px, 25vw, 323px);
  }
}

/* Hero Japanese subtitle */
.hero__ja-sub {
  font-family: var(--f-ja);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300;
  color: rgba(255,255,255,.6);
  letter-spacing: .25em;
  margin-bottom: .75rem;
  text-align: center;
}

/* Hero English subtitle */
.hero__sub {
  font-size: clamp(.85rem, 1.5vw, 1rem);
  color: rgba(255,255,255,.45);
  letter-spacing: .08em;
  margin-bottom: 2.5rem;
  text-align: center;
}

/* Hiring CTA block */
/* 5-day response guarantee banner */
.response-guarantee {
  display: flex;
  align-items: center;
  gap: .65rem;
  background: rgba(204, 0, 0, .07);
  border: 1px solid rgba(204, 0, 0, .3);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  margin-top: 1.5rem;
  font-size: .88rem;
  color: var(--c-text);
  line-height: 1.6;
}

.response-guarantee__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.response-guarantee strong {
  color: var(--c-white);
}

.hiring-cta {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--c-border);
}

.hiring-cta h4 {
  font-family: var(--f-heading);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-white);
  margin-bottom: .75rem;
}

.hiring-cta p {
  font-size: .875rem;
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

/* Global stats section within Global Network */
.global-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
  padding: 2.5rem;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.global-stat__num {
  display: block;
  font-family: var(--f-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--c-accent);
  line-height: 1.1;
  margin-bottom: .4rem;
}

.global-stat__num sup {
  font-size: .55em;
  vertical-align: super;
}

.global-stat__label {
  font-family: var(--f-heading);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* About meta tags */
.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}

.about-meta__item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.about-meta__label {
  font-family: var(--f-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.about-meta__value {
  font-size: .85rem;
  color: var(--c-text);
  font-weight: 500;
}

/* Section description text */
.section__desc {
  font-size: .95rem;
  color: var(--c-text-muted);
  line-height: 1.8;
  margin-top: .75rem;
}

/* Btn small */
.btn--sm {
  padding: .6rem 1.4rem;
  font-size: .75rem;
}

/* Footer contact links */
.footer__contact a {
  color: var(--c-accent);
  transition: color var(--dur) var(--ease);
}
.footer__contact a:hover {
  color: var(--c-white);
}

/* Responsive additions */
@media (max-width: 768px) {
  .global-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }

  .product-row__media--stage {
    min-height: 220px;
    padding: 1.25rem;
  }

  .product-img--cutout {
    max-height: 200px;
  }
}

/* =========================
   Contact Form Fix
========================= */

.sales-grid > *,
.contact-form-block,
#contact-form {
  min-width: 0;
}

/* jQuery Validate error */
.form-error {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;

  color: #ff2b2b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.35;

  white-space: normal;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--f-heading);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .75rem 1.75rem;
  border-radius: var(--radius);
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* Privacy checkbox */
.form__group--checkbox {
  margin-top: 10px;
  margin-bottom: 20px;
}

.form__group--checkbox .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.form__group--checkbox input[type="checkbox"] {
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;

  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  max-width: 16px;

  margin: 0 !important;
  padding: 0 !important;

  border: none !important;
  background: transparent !important;
  box-shadow: none !important;

  flex: 0 0 16px;
  cursor: pointer;
}

.form__group--checkbox a {
  color: var(--c-accent);
  text-decoration: underline;
  font-weight: 600;
}

.form__group--checkbox a:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .form__row--half {
    grid-template-columns: 1fr;
  }
}