/*
Theme Name: HGMT
Theme URI: https://hgmt.co.jp/
Author: Heritage Global Material Trading Co., Ltd.
Author URI: https://hgmt.co.jp/
Description: 株式会社ヘリテージグローバルマテリアルトレーディング コーポレートサイト用カスタムテーマ。和モダンを基調とし、4 言語（日本語・英語・中国語・韓国語）対応、ACF による会社情報・製品情報・採用情報の管理画面化、Contact Form 7 統合済み。
Version: 3.4.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
License URI: https://hgmt.co.jp/
Text Domain: hgmt
*/

/* =========================================================
   HGMT — Heritage Global Material Trading
   Wa-modern corporate identity
   ========================================================= */
:root {
  --ink: #0f1115;
  --ink-soft: #2a2d35;
  --sub: #6a6e78;
  --line: #d8d3c6;
  --line-strong: #b8b1a0;
  --paper: #f5f1e8;
  --paper-2: #ece7d8;
  --white: #ffffff;
  --accent: #a8341f;     /* 朱 */
  --accent-deep: #7a2415;
  --gold: #b89968;

  --font-jp: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --font-jp-sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-en: "Cormorant Garamond", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1280px;
  --pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ========== Background paper texture ========== */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(168,52,31,.05), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(184,153,104,.07), transparent 60%);
  z-index: 0;
}

/* ========== Loader / Page enter ========== */
.page-enter {
  position: fixed; inset: 0; background: var(--ink); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  transition: transform 1.2s cubic-bezier(.77,0,.18,1);
}
.page-enter.done { transform: translateY(-100%); }
.page-enter .seal {
  color: var(--paper);
  font-family: var(--font-en);
  font-size: 14px; letter-spacing: .4em;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  opacity: 0;
  animation: sealFade .9s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes sealFade {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.page-enter .seal-mark {
  position: relative;
  width: 88px; height: 88px;
  display: grid; place-items: center;
}
.page-enter .seal-mark img {
  position: relative; z-index: 2;
  width: 100%; height: 100%; object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(255,255,255,.18));
  animation: logoBreath 2.4s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 14px rgba(255,255,255,.14)); }
  50%      { transform: scale(1.05); filter: drop-shadow(0 0 26px rgba(120,180,230,.32)); }
}
.page-enter .seal-ring,
.page-enter .seal-ring-2 {
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  pointer-events: none;
  animation: ringPulse 2.4s ease-out infinite;
}
.page-enter .seal-ring-2 {
  inset: -22px;
  border-color: rgba(255,255,255,.12);
  animation-delay: .6s;
}
@keyframes ringPulse {
  0%   { transform: scale(.9);  opacity: .9; }
  100% { transform: scale(1.4); opacity: 0; }
}
.page-enter .seal-text {
  position: relative;
  font-family: var(--font-en);
  letter-spacing: .55em;
  font-size: 13px;
  padding-left: .55em;
  color: rgba(245,241,232,.9);
}
.page-enter .seal-text::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,241,232,.55), transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: lineWipe 1.8s cubic-bezier(.77,0,.18,1) infinite;
}
@keyframes lineWipe {
  0%     { transform: scaleX(0); transform-origin: left; }
  50%    { transform: scaleX(1); transform-origin: left; }
  50.01% { transform-origin: right; }
  100%   { transform: scaleX(0); transform-origin: right; }
}

/* ========== Header ========== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
  backdrop-filter: blur(0px);
}
.site-header.scrolled {
  background: rgba(245, 241, 232, .82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
  padding: 14px var(--pad);
}
.brand {
  display: flex; align-items: center;
}
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav {
  display: flex; align-items: center; gap: 36px;
}
.nav a {
  font-family: var(--font-jp-sans); font-size: 13px; letter-spacing: .14em;
  position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--ink); transform: scaleX(0);
  transform-origin: right; transition: transform .4s cubic-bezier(.77,0,.18,1);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-switch {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.5);
}
.lang-switch button {
  padding: 7px 10px;
  font-family: var(--font-en); font-size: 11px; letter-spacing: .12em;
  color: var(--sub);
  border-right: 1px solid var(--line-strong);
  transition: all .25s;
  white-space: nowrap;
}
.lang-switch button[data-lang="ko"] {
  font-family: var(--font-jp-sans);
}
.lang-switch button:last-child { border-right: none; }
.lang-switch button.active {
  background: var(--ink); color: var(--paper);
}
.lang-switch button:not(.active):hover { color: var(--ink); }

.menu-toggle { display: none; }

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 0 var(--pad);
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(15,17,21,.0) 0%, rgba(15,17,21,.0) 60%, rgba(15,17,21,.05) 100%);
}
.hero-bg::before {
  content: "";
  position: absolute; right: -10%; top: -10%;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: .5;
}
.hero-bg::after {
  content: "";
  position: absolute; right: 5%; top: 8%;
  width: 50vw; height: 50vw; max-width: 600px; max-height: 600px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: .35;
}
.hero-sun {
  position: absolute;
  right: 2%; top: 10%;
  width: 56vw; height: 56vw; max-width: 760px; max-height: 760px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: none;
  z-index: 1;
  animation: floaty 14s ease-in-out infinite;
  pointer-events: none;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.hero-vertical {
  position: absolute;
  right: var(--pad); bottom: 16%;
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: 13px; letter-spacing: 1.2em;
  color: var(--ink);
  z-index: 2;
}

.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto; width: 100%;
  padding-top: 140px; padding-bottom: 100px;
}
.hero-eyebrow {
  font-family: var(--font-en); font-size: 18px;
  letter-spacing: .35em; color: var(--accent);
  margin-bottom: 28px;
  display: inline-flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before {
  content: ""; width: 36px; height: 1px; background: var(--accent);
}
.hero h1 {
  font-family: var(--font-jp);
  font-size: clamp(34px, 6vw, 80px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .04em;
  margin: 0 0 36px;
}
.hero h1 .l1, .hero h1 .l2 {
  display: block;
}
.hero h1 .l1 span, .hero h1 .l2 span {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: rise 1.1s cubic-bezier(.77,0,.18,1) forwards;
  animation-delay: .8s;
  white-space: pre-line;
}
.hero h1 .l2 span { animation-delay: 1.0s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
.hero-lead {
  font-family: var(--font-jp-sans);
  font-size: clamp(14px, 1.4vw, 17px);
  letter-spacing: .15em;
  color: var(--ink-soft);
  max-width: 560px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 1s ease forwards; animation-delay: 1.4s;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.hero-scroll {
  position: absolute;
  left: var(--pad); bottom: 36px;
  font-family: var(--font-en);
  font-size: 11px; letter-spacing: .35em;
  color: var(--sub);
  display: flex; align-items: center; gap: 14px;
  z-index: 3;
}
.hero-scroll-line {
  display: inline-block; width: 60px; height: 1px;
  background: var(--ink); position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* ========== Section common ========== */
section {
  position: relative; z-index: 1;
  padding: clamp(80px, 12vw, 160px) var(--pad);
}
.container {
  max-width: var(--max); margin: 0 auto;
}
.kicker {
  font-family: var(--font-en);
  font-size: 18px; letter-spacing: .35em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 12px;
}
.kicker::before {
  content: ""; width: 28px; height: 1px; background: var(--accent);
}
.section-title {
  font-family: var(--font-jp);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .04em;
  margin: 0 0 50px;
  white-space: pre-line;
}
.section-title em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-jp);
}

/* ========== Intro ========== */
.intro {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
.intro-grid h2 {
  font-family: var(--font-jp);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500; line-height: 1.4; letter-spacing: .05em;
  margin: 0; white-space: pre-line;
}
.intro-grid p {
  font-family: var(--font-jp-sans);
  font-size: 15px; line-height: 2.0; letter-spacing: .08em;
  color: var(--ink-soft);
  white-space: pre-line;
}
.vert-rule {
  position: relative; padding-left: 28px;
}
.vert-rule::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--accent);
}

/* ========== Philosophy ========== */
.philosophy {
  background: var(--paper);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.philosophy::before {
  content: "傳承";
  position: absolute;
  right: -2vw; top: 8%;
  font-family: var(--font-jp);
  font-size: clamp(180px, 32vw, 460px);
  font-weight: 300;
  color: rgba(15,17,21,.045);
  letter-spacing: .1em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.philosophy .kicker { color: var(--accent); }
.philosophy .kicker::before { background: var(--accent); }
.philosophy .section-title { color: var(--ink); }
.philosophy-body {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  margin-top: 30px;
}
.philosophy-body p {
  font-family: var(--font-jp-sans);
  font-size: 15px; line-height: 2.0; letter-spacing: .08em;
  color: var(--ink-soft);
  margin: 0 0 24px;
  white-space: pre-line;
}
.philosophy-body p:empty { display: none; }
.pillars {
  display: grid; gap: 0;
  border-top: 1px solid var(--line-strong);
  margin-top: 80px;
  position: relative; z-index: 2;
}
.pillar {
  display: grid; grid-template-columns: 80px 1fr 2fr;
  gap: 40px; align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--line-strong);
  transition: padding .4s ease;
}
.pillar:hover { padding-left: 12px; }
.pillar-no {
  font-family: var(--font-en); font-size: 14px;
  letter-spacing: .3em; color: var(--accent);
}
.pillar-title {
  font-family: var(--font-jp); font-size: 28px; font-weight: 500;
  letter-spacing: .15em;
  color: var(--ink);
}
.pillar-desc {
  font-family: var(--font-jp-sans); font-size: 14px;
  color: var(--ink-soft); letter-spacing: .08em;
}

/* ========== Products ========== */
.products {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.products-head {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: end; margin-bottom: 60px;
}
.products-head .section-title { margin-bottom: 0; }
.products-head .lead {
  font-family: var(--font-jp-sans); font-size: 14px;
  color: var(--ink-soft); letter-spacing: .1em;
}
.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}
.product {
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 36px 28px 30px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  transition: background .4s ease;
}
.product::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 0; background: var(--accent);
  transition: height .4s cubic-bezier(.77,0,.18,1);
  z-index: 0;
}
.product:hover::before { height: 100%; }
.product:hover .product-no,
.product:hover .product-name,
.product:hover .product-sub,
.product:hover .product-desc { color: var(--paper); }
.product-no {
  font-family: var(--font-en); font-size: 12px; letter-spacing: .3em;
  color: var(--accent); margin-bottom: 28px; position: relative; z-index: 1;
  transition: color .4s;
}
.product-name {
  font-family: var(--font-jp); font-size: 18px; font-weight: 500;
  line-height: 1.5; letter-spacing: .06em;
  margin: 0 0 6px; position: relative; z-index: 1;
  transition: color .4s;
}
.product-sub {
  font-family: var(--font-en); font-size: 12px; letter-spacing: .15em;
  color: var(--sub); margin-bottom: 18px; position: relative; z-index: 1;
  transition: color .4s;
}
.product-desc {
  font-family: var(--font-jp-sans); font-size: 12.5px; line-height: 1.85;
  color: var(--ink-soft); letter-spacing: .04em; position: relative; z-index: 1;
  transition: color .4s;
}

/* ========== Company ========== */
.company {
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.company-grid {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: clamp(40px, 6vw, 100px);
}
.company-table {
  width: 100%; border-collapse: collapse;
}
.company-table tr {
  border-bottom: 1px solid var(--line-strong);
}
.company-table tr:first-child { border-top: 1px solid var(--line-strong); }
.company-table th, .company-table td {
  text-align: left; padding: 22px 0;
  vertical-align: top;
  font-family: var(--font-jp-sans);
  font-size: 14px; letter-spacing: .08em;
}
.company-table th {
  width: 30%; font-weight: 500; color: var(--sub);
  font-size: 12px; letter-spacing: .2em;
  padding-right: 20px;
}
.company-table td { color: var(--ink); line-height: 1.7; }

/* ========== Access ========== */
.access {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.access-grid {
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: clamp(30px, 5vw, 80px); align-items: stretch;
}
.access-info h3 {
  font-family: var(--font-jp); font-weight: 500;
  font-size: 18px; letter-spacing: .12em;
  margin: 0 0 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}
.access-info .addr {
  font-family: var(--font-jp); font-size: 17px;
  line-height: 1.9; letter-spacing: .05em;
  white-space: pre-line; margin-bottom: 36px;
}
.station {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-jp-sans); font-size: 13px;
  letter-spacing: .06em;
}
.station-line { color: var(--accent); font-weight: 500; }
.station-name { color: var(--ink-soft); }

.map-frame {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  min-height: 420px;
  overflow: hidden;
}
.map-frame svg,
.map-frame .map-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ========== Recruit ========== */
.recruit {
  background: var(--paper);
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.recruit::before {
  content: "縁";
  position: absolute;
  left: -3vw; top: 12%;
  font-family: var(--font-jp);
  font-size: clamp(180px, 30vw, 420px);
  font-weight: 300;
  color: rgba(15,17,21,.04);
  letter-spacing: .1em;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.recruit .container {
  position: relative;
  z-index: 1;
}
.recruit-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
.recruit-notice {
  border: 1px solid var(--line-strong);
  background: var(--white);
  padding: clamp(36px, 5vw, 56px) clamp(28px, 4vw, 48px);
  position: relative;
}
.recruit-notice::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 1px;
  background: var(--accent);
}
.recruit-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--sub);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.recruit-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  display: inline-block;
}
.recruit-headline {
  font-family: var(--font-jp);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: .08em;
  color: var(--ink);
  margin: 0 0 24px;
}
.recruit-body {
  font-family: var(--font-jp-sans);
  font-size: 14px;
  line-height: 2.0;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin: 0 0 32px;
  white-space: pre-line;
}
.recruit-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 32px 0 24px;
}
.recruit-future {
  font-family: var(--font-jp-sans);
  font-size: 12px;
  line-height: 1.95;
  letter-spacing: .1em;
  color: var(--sub);
  margin: 0;
}
.recruit-future a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: opacity .25s ease;
}
.recruit-future a:hover { opacity: .7; }

@media (max-width: 980px) {
  .recruit-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .recruit::before { font-size: clamp(140px, 26vw, 280px); top: 18%; }
  .recruit-headline { font-size: clamp(20px, 5.5vw, 24px); }
  .recruit-body { font-size: 13px; line-height: 1.95; }
}

/* ========== Contact ========== */
.contact {
  background: var(--ink); color: var(--paper);
  border-top: 1px solid var(--ink);
}
.contact .kicker { color: var(--gold); }
.contact .kicker::before { background: var(--gold); }
.contact .section-title { color: var(--paper); font-family: var(--font-en); letter-spacing: .04em; font-style: italic; font-weight: 400; }
.contact-lead {
  font-family: var(--font-jp-sans);
  font-size: 14px; line-height: 2; letter-spacing: .1em;
  color: rgba(245,241,232,.75);
  white-space: pre-line; margin: 0 0 60px;
  max-width: 560px;
}
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.field {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
  display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center;
}
.field.full { grid-column: 1 / -1; align-items: start; }
.field label {
  font-family: var(--font-jp-sans);
  font-size: 12px; letter-spacing: .2em;
  color: rgba(245,241,232,.7);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.field label > span:first-child { min-width: 0; }
.field .req {
  font-family: var(--font-en);
  font-size: 9px;
  letter-spacing: .2em;
  background: var(--accent);
  color: var(--paper);
  padding: 2px 6px;
  border-radius: 1px;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  width: auto !important;
  min-width: max-content;
  line-height: 1.4;
  align-self: center;
}
.field input, .field textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(255,255,255,.0);
  color: var(--paper);
  font-family: var(--font-jp-sans); font-size: 14px;
  letter-spacing: .06em;
  padding: 8px 0;
  outline: none;
  transition: border-color .3s;
}
.field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.0);
  color: var(--paper);
  font-family: var(--font-jp-sans);
  font-size: 14px;
  letter-spacing: .06em;
  padding: 8px 28px 8px 0;
  outline: none;
  transition: border-color .3s;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.field select option {
  color: var(--ink);
  background: var(--paper);
}
.field input::placeholder, .field textarea::placeholder {
  color: rgba(245,241,232,.3);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 120px; }
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1px solid rgba(245,241,232,.85);
  border-bottom: 1px solid rgba(245,241,232,.85);
  transform: rotate(45deg);
  pointer-events: none;
}
.field-help {
  display: block;
  margin-top: 8px;
  font-family: var(--font-jp-sans);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .08em;
  color: rgba(245,241,232,.45);
}
.submit-note {
  font-family: var(--font-jp-sans);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .08em;
  color: rgba(245,241,232,.5);
}
.form-status {
  margin-top: 14px;
  font-family: var(--font-jp-sans);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .08em;
  color: rgba(245,241,232,.58);
}

.submit-row {
  margin-top: 60px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.submit-btn {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 22px 44px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-jp-sans); font-size: 13px; letter-spacing: .25em;
  border: 1px solid var(--paper);
  position: relative; overflow: hidden;
  transition: color .4s ease;
}
.submit-btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s cubic-bezier(.77,0,.18,1);
  z-index: 0;
}
.submit-btn:hover { color: var(--paper); border-color: var(--accent); }
.submit-btn:hover::before { transform: scaleX(1); transform-origin: left; }
.submit-btn span { position: relative; z-index: 1; }
.submit-btn .arrow {
  position: relative; z-index: 1;
  width: 24px; height: 1px; background: currentColor;
}
.submit-btn .arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.privacy-note {
  font-family: var(--font-jp-sans); font-size: 11px;
  color: rgba(245,241,232,.5); letter-spacing: .1em;
}

/* ========== Contact — Light variant override ==========
   When the contact section is rendered on a light (paper) background,
   invert all foreground colors to remain legible. Selectors use the
   #contact ID to guarantee higher specificity than the original
   .contact class rules above. */
#contact {
  border-top-color: var(--line);
  color: var(--ink);
}
#contact .kicker { color: var(--accent); }
#contact .kicker::before { background: var(--accent); }
#contact .section-title { color: var(--ink); }
#contact .contact-lead { color: var(--ink-soft); }

#contact .contact-form { border-top-color: var(--line-strong); }
#contact .field { border-bottom-color: var(--line-strong); }
#contact .field label { color: var(--sub); }
#contact .field .req { background: var(--accent); color: var(--paper); }

#contact .field input,
#contact .field textarea,
#contact .field select {
  color: var(--ink);
}
#contact .field input::placeholder,
#contact .field textarea::placeholder {
  color: rgba(15,17,21,.32);
}
#contact .field input:focus,
#contact .field textarea:focus,
#contact .field select:focus {
  border-bottom-color: var(--accent);
}
#contact .field select option {
  color: var(--ink);
  background: var(--paper);
}
#contact .select-wrap::after {
  border-right-color: rgba(15,17,21,.6);
  border-bottom-color: rgba(15,17,21,.6);
}
#contact .field-help { color: var(--sub); }

#contact .submit-note { color: var(--sub); }
#contact .form-status { color: var(--ink-soft); }

#contact .submit-btn {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}
#contact .submit-btn:hover {
  color: var(--paper);
  border-color: var(--accent);
}

/* ========== Footer ========== */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding: 80px var(--pad) 40px;
  position: relative;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-top {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 60px; padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-tag {
  font-family: var(--font-jp); font-size: clamp(28px, 4vw, 44px);
  font-weight: 400; letter-spacing: .12em; line-height: 1.4; margin: 0;
}
.footer-links {
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--font-jp-sans); font-size: 13px; letter-spacing: .14em;
}
.footer-links a {
  opacity: .7; transition: opacity .3s, padding-left .3s;
}
.footer-links a:hover { opacity: 1; padding-left: 8px; }
.footer-bottom {
  max-width: var(--max); margin: 0 auto;
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: var(--font-en); font-size: 11px; letter-spacing: .25em;
  color: rgba(245,241,232,.5);
}

/* ========== Reveal animation ========== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .47s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .54s; }

/* ========== Responsive ========== */
@media (max-width: 980px) {
  .nav { display: none; }
  .menu-toggle {
    display: none; /* シンプルさを優先しナビは非表示。必要であれば拡張可 */
  }

  section { padding: clamp(64px, 10vw, 100px) var(--pad); }

  .intro-grid, .philosophy-body, .products-head, .company-grid, .access-grid, .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr; gap: 8px; }
  .hero-vertical { display: none; }
  .hero-sun { right: -8%; top: 24%; opacity: .85; width: 64vw; height: 64vw; }

  /* ヒーロー余白調整 */
  .hero-inner { padding-top: 110px; padding-bottom: 80px; }
  .hero-scroll { display: none; }

  /* Philosophy背景文字を小さく */
  .philosophy::before { font-size: clamp(140px, 28vw, 280px); top: 12%; right: -4vw; opacity: .8; }

  /* Pillars: 3カラムから縦積みカード型に */
  .pillars { margin-top: 50px; }
  .pillar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 0;
    align-items: start;
  }
  .pillar:hover { padding-left: 0; }
  .pillar-no { font-size: 12px; }
  .pillar-title { font-size: 22px; }
  .pillar-desc { font-size: 13px; line-height: 1.85; }

  /* Access マップ高さ調整 */
  .map-frame { min-height: 320px; }

  /* お問い合わせフォーム余白 */
  .submit-row { margin-top: 40px; flex-direction: column-reverse; align-items: stretch; gap: 16px; }
  .submit-btn { justify-content: center; width: 100%; padding: 20px 24px; }

  /* フッター調整 */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 10px; }
  .footer-tag { font-size: clamp(24px, 6vw, 32px); }
}

@media (max-width: 640px) {
  :root { --pad: 22px; }

  /* ヘッダー：ロゴをコンパクトに、言語ボタンを最適化 */
  .site-header { padding: 14px var(--pad); }
  .site-header.scrolled { padding: 10px var(--pad); }
  .brand-logo { height: 20px; }
  .lang-switch button {
    padding: 8px 9px;
    font-size: 10px;
    letter-spacing: .12em;
    min-height: 32px;
  }

  /* ヒーロー */
  .hero h1 { font-size: clamp(30px, 9vw, 44px); margin-bottom: 28px; line-height: 1.3; }
  .hero-eyebrow { font-size: 14px; letter-spacing: .25em; margin-bottom: 20px; }
  .hero-eyebrow::before { width: 24px; }
  .hero-lead { font-size: 13px; letter-spacing: .1em; line-height: 1.9; }
  .hero-sun { width: 80vw; height: 80vw; right: -16%; top: 32%; opacity: .8; }

  /* Section title */
  .section-title { font-size: clamp(26px, 7vw, 36px); margin-bottom: 36px; }
  .kicker { font-size: 16px; letter-spacing: .25em; margin-bottom: 16px; }

  /* Intro */
  .intro-grid h2 { font-size: clamp(24px, 6vw, 30px); }
  .intro-grid p { font-size: 14px; line-height: 1.95; }
  .vert-rule { padding-left: 18px; }

  /* Philosophy */
  .philosophy-body p { font-size: 14px; line-height: 1.95; }

  /* Products: 2列→1列に */
  .products-grid { grid-template-columns: 1fr; }
  .product { padding: 28px 22px 26px; }
  .product-no { margin-bottom: 18px; font-size: 11px; }
  .product-name { font-size: 17px; }
  .product-desc { font-size: 13px; }

  /* Company テーブル：縦積みに */
  .company-table th, .company-table td { padding: 16px 0; display: block; width: 100%; }
  .company-table th { padding-bottom: 4px; padding-right: 0; font-size: 11px; }
  .company-table td { padding-top: 0; padding-bottom: 16px; font-size: 14px; }

  /* Access */
  .access-info .addr { font-size: 16px; line-height: 1.85; margin-bottom: 28px; }
  .station { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .station-name { font-size: 12.5px; }

  /* Contact */
  .contact-lead { font-size: 13px; line-height: 1.95; margin-bottom: 40px; }
  .field { padding: 16px 0; }
  .field label { font-size: 11px; letter-spacing: .15em; }
  .field input, .field textarea { font-size: 15px; padding: 10px 0; min-height: 24px; }
  .field textarea { min-height: 100px; }

  /* Footer */
  .site-footer { padding: 60px var(--pad) 30px; }
  .footer-top { padding-bottom: 36px; gap: 32px; }
  .footer-links { font-size: 14px; gap: 12px; }
  .footer-links a { padding: 6px 0; min-height: 32px; }

  /* Loader logoサイズ調整 */
  .page-enter .seal-mark { width: 72px; height: 72px; }
}

@media (max-width: 380px) {
  :root { --pad: 18px; }
  .hero h1 { font-size: 28px; }
  .section-title { font-size: 24px; }
  .lang-switch button { padding: 6px 5px; font-size: 9px; letter-spacing: .05em; }
}

/* lang-aware tweaks */
html[lang="en"] body { font-family: var(--font-en); }
html[lang="en"] .section-title,
html[lang="en"] .hero h1 { font-family: var(--font-en); font-weight: 500; letter-spacing: .01em; }
html[lang="en"] .intro-grid h2,
html[lang="en"] .footer-tag { font-family: var(--font-en); font-weight: 500; }
html[lang="en"] .intro-grid p,
html[lang="en"] .philosophy-body p,
html[lang="en"] .product-desc,
html[lang="en"] .contact-lead { font-family: "Inter", sans-serif; }

html[lang="zh-CN"] body { font-family: "Noto Serif SC", "Songti SC", serif; }
html[lang="zh-CN"] .intro-grid p,
html[lang="zh-CN"] .philosophy-body p,
html[lang="zh-CN"] .product-desc,
html[lang="zh-CN"] .contact-lead,
html[lang="zh-CN"] .nav a,
html[lang="zh-CN"] .company-table th,
html[lang="zh-CN"] .company-table td { font-family: "Noto Sans SC", sans-serif; }
