:root {
  --navy-950: #030b1f;
  --navy-900: #061433;
  --navy-800: #0b2152;
  --navy-700: #13306f;
  --blue-500: #2f6fe0;
  --blue-300: #8fb4ff;
  --gold-500: #c9a45c;
  --gold-400: #d8b977;
  --gold-300: #e8d3a2;
  --ink-900: #0d1730;
  --ink-700: #34405a;
  --ink-500: #5d6984;
  --line: #dde2ec;
  --paper: #ffffff;
  --paper-2: #f4f6fa;
  --radius: 10px;
  --shadow: 0 18px 40px -24px rgba(6, 20, 51, .45);
  --font-display: "Cormorant Garamond", "Noto Serif JP", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", sans-serif;
  --header-h: 72px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-700);
  background: var(--paper);
}
:lang(ja) body, html:lang(ja) body { line-height: 1.9; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); }
a:hover { color: var(--blue-500); }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.25; margin: 0 0 .6em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; }
html:lang(ja) h1, html:lang(ja) h2 { font-family: "Noto Serif JP", var(--font-display); font-weight: 700; letter-spacing: .04em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold-400); color: var(--navy-950); padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 11, 31, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 164, 92, .25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .12em; color: #f3e6c4; }
.brand-sub { font-family: var(--font-display); font-weight: 600; font-size: .72rem; letter-spacing: .55em; color: var(--gold-400); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: #dbe4f7; text-decoration: none; font-size: .92rem; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: #fff; border-bottom-color: var(--gold-500); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { color: var(--gold-300); font-size: .85rem; text-decoration: none; border-left: 1px solid rgba(255,255,255,.2); padding-left: 14px; margin-left: 4px; }
.lang-switch:hover { color: #fff; }
.menu-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
  font-family: inherit; line-height: 1.2;
}
.btn-sm { padding: 8px 16px; font-size: .82rem; }
.btn-gold { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: var(--navy-950); }
.btn-gold:hover { color: var(--navy-950); filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline { border-color: rgba(232, 211, 162, .6); color: var(--gold-300); background: transparent; }
.btn-outline:hover { background: rgba(232, 211, 162, .1); color: #fff; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Sections */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: radial-gradient(1200px 500px at 80% 0%, #0f2c6b 0%, var(--navy-900) 55%, var(--navy-950) 100%); color: #c9d4ec; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a:not(.btn) { color: var(--gold-300); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-500); margin-bottom: 14px; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.section-head h2::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 18px; background: linear-gradient(90deg, var(--gold-500), transparent); }
.section-head.center h2::after { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--gold-500), transparent); }
.lead { font-size: 1.12rem; color: var(--ink-500); }
.section-dark .lead { color: #b9c6e3; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--navy-950);
  min-height: min(88vh, 820px);
  display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,11,31,.95) 0%, rgba(3,11,31,.7) 45%, rgba(3,11,31,.2) 100%), linear-gradient(0deg, rgba(3,11,31,.9), transparent 40%); }
.hero-content { position: relative; z-index: 1; padding: 120px 0 100px; max-width: 720px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.08; margin-bottom: 24px; }
html:lang(ja) .hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.35; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--gold-300), var(--gold-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.15rem; color: #c9d4ec; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.page-hero { position: relative; overflow: hidden; background: var(--navy-950); color: #fff; padding: 110px 0 80px; }
.page-hero .hero-bg { opacity: .35; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,11,31,.95), rgba(3,11,31,.55)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 14px; }
.page-hero p { color: #c9d4ec; max-width: 700px; font-size: 1.1rem; margin: 0; }

/* Grid & cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 10px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; color: inherit; transition: transform .2s ease, border-color .2s ease; }
.card-link:hover { transform: translateY(-4px); border-color: var(--gold-400); color: inherit; }
.card-media { margin: -28px -28px 22px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16 / 10; background: var(--navy-950); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .9rem; color: var(--navy-700); }
.card-more::after { content: " →"; }
.section-dark .card { background: rgba(255,255,255,.04); border-color: rgba(201,164,92,.22); box-shadow: none; }
.section-dark .card p, .section-dark .card li { color: #b9c6e3; }
.card-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--gold-500); line-height: 1; margin-bottom: 12px; }

/* Feature split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media.dark img { background: var(--navy-950); }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 2px; background: var(--gold-500); }

/* Subnav (software page) */
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; white-space: nowrap; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 500; color: var(--ink-700); }
.subnav a:hover { background: var(--paper-2); color: var(--navy-800); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy-900); color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .04em; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { color: var(--ink-900); font-weight: 600; width: 34%; background: var(--paper-2); }

/* Module tiles (EMS suite) */
.module { border-top: 3px solid var(--gold-500); }
.module-code { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--navy-800); line-height: 1; }
.module-name { font-size: .85rem; color: var(--ink-500); margin-bottom: 14px; }

.app-shots { display: flex; gap: 16px; justify-content: center; align-items: flex-end; }
.app-shots img { width: 30%; max-width: 200px; }

.callout { border-left: 3px solid var(--gold-500); background: var(--paper-2); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; }
.section-dark .callout { background: rgba(255,255,255,.05); }

.stat-row { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 32px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.4rem; color: var(--gold-400); line-height: 1.1; }
.stat span { font-size: .9rem; color: #b9c6e3; }

.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.cta-band .hero-actions { justify-content: center; }

/* About */
.company-table th { width: 28%; }
.map-frame { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.contact-info .item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info .icon { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold-500); display: grid; place-items: center; color: var(--gold-500); }
.contact-info .icon svg { width: 20px; height: 20px; }
.contact-info .label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.form-card { padding: 36px; }
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--paper-2); border-radius: 999px; margin-bottom: 28px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 11px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink-500); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy-900); color: #fff; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label, legend { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-900); margin-bottom: 6px; }
.req { color: #b4232c; margin-left: 4px; font-weight: 500; font-size: .8rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink-900);
  border: 1px solid #c8cfdc; border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,111,224,.18); }
textarea { min-height: 150px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .93rem; color: var(--ink-700); margin: 0; }
.checks input { margin-top: .4em; accent-color: var(--navy-800); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--ink-700); }
.consent input { margin-top: .4em; accent-color: var(--navy-800); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 18px; padding: 14px 18px; border-radius: 8px; font-size: .95rem; }
.form-status.ok { background: #e8f5ec; color: #17603a; border: 1px solid #b9dfc6; }
.form-status.err { background: #fbeaea; color: #8f1d24; border: 1px solid #f0c3c5; }
.field-error { color: #b4232c; font-size: .85rem; margin-top: 4px; }
[aria-invalid="true"] { border-color: #b4232c !important; }

/* Footer */
.site-footer { background: var(--navy-950); color: #9fb0d3; padding: 64px 0 28px; font-size: .92rem; border-top: 1px solid rgba(201,164,92,.25); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 40px; }
.footer-tagline { margin-top: 14px; font-family: var(--font-display); font-size: 1.1rem; color: var(--gold-300); }
.footer-nav { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 8px; }
.site-footer a { color: #dbe4f7; text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }
.footer-contact { font-style: normal; line-height: 2; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); color: #6f80a6; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card-link { transition: none; }
}

/* Responsive */
@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; cursor: pointer;
  }
  .menu-bar, .menu-bar::before, .menu-bar::after { display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: transform .2s ease; }
  .menu-bar::before, .menu-bar::after { content: ""; position: absolute; left: 0; }
  .menu-bar::before { top: -6px; }
  .menu-bar::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-bar { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bar::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bar::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); padding: 12px 24px 28px; border-bottom: 1px solid rgba(201,164,92,.25);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav:not(.open) { display: none; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1rem; }
  .nav-actions { flex-wrap: wrap; padding-top: 18px; }
  .nav-actions .btn { flex: 1; }
  .lang-switch { border-left: 0; padding: 10px 0 0; margin: 0; width: 100%; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse > :first-child { order: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .grid-2, .grid-3, .grid-4, .field-row, .checks { grid-template-columns: 1fr; }
  .hero-content { padding: 90px 0 70px; }
  .page-hero { padding: 80px 0 56px; }
  .form-card { padding: 24px 20px; }
  .card { padding: 22px; }
  .card-media { margin: -22px -22px 18px; }
  th, td { padding: 12px 14px; }
  tbody th { width: auto; }
}

/* Background images (kept out of inline styles for a strict CSP) */
.bg-datacenter { background-image: url("/img/datacenter.webp"); }
.bg-globe { background-image: url("/img/hero-globe.webp"); background-position: center 20%; }
.bg-ems { background-image: url("/img/ems-dashboard.webp"); }
.bg-solar { background-image: url("/img/solar-container.webp"); }
.bg-container { background-image: url("/img/ai-container.webp"); }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }
.mb-56 { margin-bottom: 56px; }
.mt-64 { margin-top: 64px; }
.mt-24 { margin-top: 24px; }
/* Transparent cut-out images: no frame or shadow */
.split-media.plain img { box-shadow: none; border-radius: 0; margin-inline: auto; }

/* EMS solutions (products page) */
.solution { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 40px; align-items: start; padding: 48px 0; border-top: 1px solid var(--line); }
.section-head + .solution { border-top: 0; padding-top: 0; }
.solution-text h3 { font-size: 1.3rem; }
.solution-text tbody th { width: 42%; }
.solution-media { display: grid; gap: 16px; }
.solution-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.spec-grid { align-items: start; }
.spec-grid h3, #fbk h3 { margin-top: 8px; }
.note { font-size: .85rem; color: var(--ink-500); margin-top: 10px; }
@media (max-width: 860px) {
  .solution { grid-template-columns: 1fr; gap: 24px; }
}
/* Tables keep a white surface, so keep dark text even inside dark sections */
.table-wrap td { color: var(--ink-700); }
.split-media .img-fill { width: 100%; max-width: 460px; }
