:root {
  --bg: #F7FAFC;
  --surface: #FFFFFF;
  --tint: #EEF5F9;
  --ink: #14263B;
  --ink-soft: #44566B;
  --line: #D6E1EA;
  --blue-deep: #086A91;
  --blue-bright: #56C7ED;
  --red-deep: #BF3B30;
  --red-deep-hover: #A2312A;
  --red-bright: #FF7668;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 38, 59, .06), 0 8px 24px rgba(20, 38, 59, .06);
  --container: 1120px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-latin: "Avenir Next", "Segoe UI", "Helvetica Neue", var(--font);
}
/* Per-language body fonts: Japanese glyph shapes differ from Simplified Chinese ones. */
:root:lang(en) { --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif; }
:root:lang(zh-Hans) { --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; }
/* Latin text wraps between words, so phrase blocks are only needed for CJK. */
:lang(en) .phrase { display: inline; }

*, *::before, *::after { box-sizing: border-box; }
/* Components set their own display; keep the hidden attribute authoritative. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  line-break: strict;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0; word-break: auto-phrase; }
.phrase { display: inline-block; }
p { margin: 0; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 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(--ink); color: #fff; padding: 8px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 250, 252, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand {
  display: inline-flex; white-space: nowrap; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-latin); font-weight: 700; font-size: 20px; letter-spacing: .01em;
}
/* Logo file is final artwork: fixed height, width follows its 32:28 ratio. */
.brand-mark { height: 28px; width: auto; flex: none; }

.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; white-space: nowrap; padding: 8px 14px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.site-nav a:hover { background: var(--tint); }
.site-nav .nav-cta { color: var(--blue-deep); font-weight: 700; }
.site-nav .lang-switch { display: flex; align-items: center; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
.site-nav .lang-switch a { padding: 8px 8px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.site-nav .lang-switch a[aria-current="page"] { color: var(--ink); font-weight: 700; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer;
  position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 50%; width: 20px; height: 2px; margin-left: -10px;
  background: var(--ink); border-radius: 2px; content: ""; transition: transform .2s, opacity .2s;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before { top: -6px; left: 0; margin-left: 0; }
.nav-toggle-bar::after { top: 6px; left: 0; margin-left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 28px; border-radius: 10px; border: 0;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.4;
  text-decoration: none; cursor: pointer; transition: background-color .15s, transform .15s;
}
.btn-primary { background: var(--red-deep); color: #fff; box-shadow: 0 6px 18px rgba(191, 59, 48, .22); }
.btn-primary:hover { background: var(--red-deep-hover); }
.btn-secondary { background: var(--surface); color: var(--blue-deep); border: 1.5px solid var(--blue-deep); min-height: 48px; padding: 10px 22px; font-size: 15px; }
.btn-secondary:hover { background: #EAF6FB; }
.btn-primary:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; box-shadow: none; }
.text-link { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.text-link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 48px; }
.hero-brand {
  font-family: var(--font-latin); font-weight: 700; font-size: 18px; letter-spacing: .04em;
  color: var(--blue-deep); margin-bottom: 20px;
}
.hero-brand span { font-family: var(--font); font-weight: 500; font-size: 14px; color: var(--ink-soft); margin-left: 8px; letter-spacing: .08em; }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; letter-spacing: .02em; line-height: 1.35; }
.hero-lead { margin-top: 20px; font-size: clamp(17px, 1.7vw, 20px); color: var(--ink-soft); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }

.hero-visual { margin: 0; }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
.hero-visual .grid path { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.flow { fill: none; stroke-linecap: round; }
.flow-blue { stroke: var(--blue-bright); stroke-width: 6; }
.flow-red { stroke: var(--red-bright); stroke-width: 6; }
.flow-blue-soft { stroke: var(--blue-bright); stroke-width: 3; opacity: .35; }
.flow-red-soft { stroke: var(--red-bright); stroke-width: 3; opacity: .35; }
.flow-out { stroke: var(--ink); stroke-width: 6; }
.flow-blue, .flow-red, .flow-out { stroke-dasharray: 14 10; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .flow-blue, .flow-red, .flow-out { animation: none; stroke-dasharray: none; } }
.src-blue { fill: var(--blue-bright); }
.src-red { fill: var(--red-bright); }
.node-ring { fill: none; stroke: var(--ink); stroke-width: 2; opacity: .18; }
.node { fill: var(--ink); }
.goal { fill: var(--surface); stroke: var(--ink); stroke-width: 4; }
.vis-label { font-family: var(--font-latin); font-size: 15px; font-weight: 700; fill: var(--ink-soft); }
.vis-label-goal { font-family: var(--font); font-size: 14px; fill: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.eyebrow {
  font-family: var(--font-latin); font-size: 13px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 8px;
}
.section h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: .02em; }
.section-lead { margin-top: 14px; max-width: 44em; color: var(--ink-soft); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px;
}
.card-grid { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 24px; }
.card-grid.services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service-card h3 { font-size: 20px; margin: 12px 0 12px; }
.service-card p { color: var(--ink-soft); }
.card-index { font-family: var(--font-latin); font-weight: 700; font-size: 14px; color: var(--blue-deep); letter-spacing: .1em; }
.service-card { border-top: 4px solid var(--blue-bright); }

/* Platforms — equal weight: identical structure, only accent colour differs */
.platform-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.platform-card { position: relative; padding-top: 40px; overflow: hidden; }
.platform-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; }
.platform-databricks::before { background: var(--red-bright); }
.platform-snowflake::before { background: var(--blue-bright); }
.platform-kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink-soft); }
.platform-kicker::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 8px; vertical-align: 1px;
}
.platform-databricks .platform-kicker::before { background: var(--red-bright); }
.platform-snowflake .platform-kicker::before { background: var(--blue-bright); }
.platform-card h3 { font-family: var(--font-latin); font-size: 30px; margin: 6px 0 14px; letter-spacing: .01em; }
.platform-card > p { color: var(--ink-soft); }
.platform-card h4 { font-size: 15px; margin: 26px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.7; }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px;
  border-left: 2px solid var(--blue-deep); border-bottom: 2px solid var(--blue-deep); transform: rotate(-45deg);
}
.platform-undecided {
  margin-top: 24px; padding: 22px 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px dashed #B6C8D6;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
}
.platform-undecided p { flex: 1 1 28em; }

/* Process */
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.step { position: relative; padding: 28px 28px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--font-latin); font-weight: 700; margin-bottom: 14px;
}
.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { color: var(--ink-soft); }

.example {
  margin-top: 40px; padding: 32px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(86, 199, 237, .12), rgba(255, 118, 104, .10));
  border: 1px solid var(--line);
}
.example-tag {
  display: inline-block; padding: 2px 12px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .08em;
}
.example h3 { font-size: 22px; margin: 14px 0 6px; }
.example-note { font-size: 14px; color: var(--ink-soft); }
.example-flow { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.example-flow li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; background: var(--surface); padding: 16px 20px; border-radius: 10px; }
.example-step { font-weight: 700; color: var(--blue-deep); font-size: 15px; padding-top: 1px; }

/* Contact */
/* Stacked and centred: intro above, form card below, sharing one column width. */
.contact-inner { max-width: 768px; display: grid; gap: 40px; }
.contact-intro { text-align: center; }
.contact-intro p { text-wrap: balance; }
.contact-intro h2 { margin-bottom: 18px; }
.contact-intro p + p { margin-top: 16px; }
.contact-privacy { font-size: 14px; color: var(--ink-soft); }
.contact-booking .btn { margin-top: 12px; }
.contact-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }

.mode-notice {
  margin-bottom: 24px; padding: 14px 18px; border-radius: 10px;
  background: #FFF4E5; border: 1px solid #F0C88A; font-size: 14px; line-height: 1.7;
}
.mode-notice-title { font-weight: 700; margin-bottom: 4px; }

.inquiry-form { display: grid; gap: 18px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; padding: 0; }
.req, .opt { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 700; vertical-align: 1px; line-height: 1.7; }
.req { background: var(--red-deep); color: #fff; }
.opt { background: var(--tint); color: var(--ink-soft); }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid #A9BACA; border-radius: 8px;
}
textarea { resize: vertical; min-height: 140px; line-height: 1.7; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: var(--blue-deep); }
[aria-invalid="true"] { border-color: var(--red-deep) !important; background: #FFF8F7 !important; }
.field-error { color: var(--red-deep); font-size: 14px; font-weight: 600; margin-top: 4px; min-height: 0; }
.field-error:empty { display: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.field .choice {
  display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important;
  min-height: 44px; padding: 8px 14px; border: 1px solid #A9BACA; border-radius: 8px;
  font-weight: 500 !important; cursor: pointer; background: var(--surface);
}
.field .choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue-deep); }
.choice:has(input:checked) { border-color: var(--blue-deep); background: #EAF6FB; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit { width: 100%; margin-top: 4px; }
.form-status:empty { display: none; }
.form-status { padding: 12px 16px; border-radius: 8px; font-size: 15px; font-weight: 600; }
.form-status.is-error { background: #FDECEA; color: #8E2A22; border: 1px solid #F2B8B2; }
.form-status.is-info { background: #EAF6FB; color: #0B4F6B; border: 1px solid #B8DFEE; }
.form-foot { font-size: 14px; color: var(--ink-soft); text-align: center; text-wrap: balance; word-break: auto-phrase; }
.form-success { padding: 12px 0; }
.form-success:focus { outline: none; }
.form-success-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--ink); }
.form-success-title::before {
  content: ""; display: inline-block; width: 12px; height: 20px; margin-right: 12px; vertical-align: -1px;
  border-right: 4px solid var(--blue-deep); border-bottom: 4px solid var(--blue-deep); transform: rotate(45deg);
}

/* Footer */
.site-footer { background: var(--ink); color: #DCE6EF; padding: 48px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.footer-brand { font-family: var(--font-latin); font-weight: 700; font-size: 20px; color: #fff; }
.footer-brand span { font-family: var(--font); font-weight: 500; font-size: 13px; margin-left: 8px; color: #B5C5D4; }
.footer-desc { font-size: 14px; color: #B5C5D4; margin-top: 4px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-links a { color: #fff; display: inline-flex; min-height: 44px; align-items: center; }
.site-footer :focus-visible { outline-color: var(--blue-bright); }
.footer-legal { grid-column: 1 / -1; font-size: 12px; color: #9DB0C2; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; }

/* Privacy page */
.doc { padding: 64px 0 96px; }
.doc .container { max-width: 800px; }
.doc h1 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 12px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.4em; }
.doc .meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 24px; }
.doc .pending { background: #FFF4E5; border: 1px solid #F0C88A; border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-top: 20px; }
.doc .back { margin-top: 48px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { max-width: 520px; }
  .card-grid.services, .steps { grid-template-columns: 1fr; }
  .contact-inner { gap: 32px; }
}

/* The nav collapses below 900px: the Japanese labels plus the language switcher need that width. */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(20, 38, 59, .08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .site-nav a { padding: 12px 8px; min-height: 48px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav .lang-switch { margin: 8px 0 0; padding: 0; border-left: 0; gap: 8px; }
  .site-nav .lang-switch a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
  .site-nav .lang-switch a[aria-current="page"] { border-color: var(--ink); }
}
@media (max-width: 760px) {
  .platform-grid { grid-template-columns: 1fr; }
}

/* JS-less fallback: keep nav visible when the toggle cannot work */
.no-js .nav-toggle { display: none; }
@media (max-width: 900px) {
  .no-js .site-nav { position: static; display: block; box-shadow: none; border: 0; }
  .no-js .header-inner { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 48px; }
  .hero-visual { max-width: 300px; margin: 0 auto; }
  .hero h1 { font-size: 29px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 28px; }
  .hero-actions .btn { width: 100%; }
  .hero-actions .text-link { justify-content: center; }
  .section { padding: 64px 0; }
  .card, .contact-panel, .example { padding: 24px 20px; }
  .platform-card { padding-top: 32px; }
  .platform-card h3 { font-size: 26px; }
  .platform-undecided { padding: 20px; }
  .example-flow li { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .contact-intro { text-align: left; }
  .contact-intro p { text-wrap: pretty; }
}
