/* ==========================================================================
   日桥 NIKKYO — site stylesheet
   Palette: blue-and-white porcelain (染付 / 青花). No external fonts or CDNs,
   so the site loads the same inside and outside mainland China.
   ========================================================================== */

:root {
  --porcelain: #F3F6F5;      /* page background, cool porcelain white */
  --paper: #FFFFFF;
  --indigo: #0F2747;         /* 濃藍: headings, dark band */
  --indigo-mid: #1D4679;     /* 藍: links */
  --celadon: #7DB3A2;        /* 青磁: graphics only */
  --celadon-deep: #3B7767;   /* numerals */
  --celadon-wash: #DCEAE4;
  --brass: #A4864E;          /* graphics only */
  --brass-text: #765E2C;
  --ink: #1C2733;
  --muted: #53626F;
  --rule: #D3DCD9;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);

  --s-1: 0.875rem;
  --s0: 1.0625rem;
  --s1: 1.3125rem;
  --s2: 1.5rem;
  --s3: clamp(1.75rem, 3vw, 2.25rem);
  --s4: clamp(2rem, 4.4vw, 3.25rem);

  --display: Georgia, serif;
  --text: sans-serif;
  --measure: 38em;
}

html[lang="zh-Hans"] {
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "STSongti-SC-Regular", "Noto Serif CJK SC", "Source Han Serif SC", "Noto Serif SC", STSong, SimSun, serif;
  --text: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}
html[lang="ja"] {
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif CJK JP", "Noto Serif JP", serif;
  --text: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
}
html[lang="en"] {
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Gelasio, serif;
  --text: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 34em;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--s0);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { line-height: 1.65; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  color: var(--indigo);
  line-height: 1.4;
  letter-spacing: 0.05em;
}
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: 0; line-height: 1.2; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 { font-feature-settings: "palt"; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--indigo-mid); text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
a:hover { color: var(--indigo); }
:focus-visible { outline: 2px solid var(--indigo-mid); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--indigo); color: #fff; padding: 10px 16px; z-index: 50; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 246, 245, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar { display: flex; align-items: center; gap: 28px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--indigo); flex-shrink: 0; }
.mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--display); font-size: 1.4375rem; letter-spacing: 0.16em; }
html[lang="en"] .brand-name { letter-spacing: 0.04em; }
.brand-sub { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-main { gap: 26px; }
.nav-main a { color: var(--ink); text-decoration: none; font-size: 0.9375rem; padding-block: 6px; border-bottom: 1px solid transparent; }
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--indigo); border-bottom-color: var(--indigo); }

.lang { gap: 2px; font-size: 0.8125rem; border-left: 1px solid var(--rule); padding-left: 22px !important; }
.lang a { display: block; padding: 4px 8px; color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--indigo); }
.lang a[aria-current="true"] { color: var(--indigo); box-shadow: inset 0 -1px 0 var(--indigo); }

.menu-btn { display: none; margin-left: auto; font: inherit; font-size: 0.9375rem; color: var(--indigo); background: none; border: 1px solid var(--indigo); padding: 6px 16px; border-radius: 2px; cursor: pointer; }

.btn {
  display: inline-block; background: var(--indigo); color: #fff; text-decoration: none;
  padding: 14px 34px; border-radius: 2px; font-size: 1rem; letter-spacing: 0.08em; line-height: 1.4;
  border: 1px solid var(--indigo); transition: background-color .15s ease, color .15s ease;
}
html[lang="en"] .btn { letter-spacing: 0.01em; }
.btn:hover { background: var(--indigo-mid); border-color: var(--indigo-mid); color: #fff; }
.btn-small { padding: 9px 22px; font-size: 0.875rem; }
.text-link { font-size: 1rem; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; background: var(--indigo); color: #D8E0EA; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(52% 78% at 80% 48%, rgba(125, 179, 162, 0.17), rgba(15, 39, 71, 0) 72%); }
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(56px, 7vw, 96px);
  min-height: min(82vh, 800px);
}
.hero h1 { color: #fff; font-weight: 400; font-size: var(--hero-size); line-height: 1.42; }
.hero h1 span { display: block; }
html[lang="zh-Hans"] { --hero-size: clamp(1.625rem, 3.9vw, 3.5rem); }
html[lang="ja"] { --hero-size: clamp(1.5rem, 3.05vw, 2.75rem); }
html[lang="en"] { --hero-size: clamp(2.125rem, 4.3vw, 3.75rem); }
html[lang="en"] .hero h1 { line-height: 1.14; letter-spacing: -0.01em; text-wrap: balance; }
html[lang="en"] .hero h1 span + span { margin-top: 0.18em; }
@media (min-width: 360px) {
  html[lang="zh-Hans"] .hero h1 span, html[lang="ja"] .hero h1 span { white-space: nowrap; }
}
.hero .lead { max-width: 31em; margin: 30px 0 0; font-size: var(--s1); line-height: 1.85; color: #D8E0EA; }
html[lang="en"] .hero .lead { line-height: 1.55; max-width: 29em; }
.actions { margin-top: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.hero .btn { background: #fff; border-color: #fff; color: var(--indigo); }
.hero .btn:hover { background: var(--celadon-wash); border-color: var(--celadon-wash); color: var(--indigo); }
.hero .text-link { color: #fff; }
.hero :focus-visible { outline-color: #fff; }

.rings { margin: 0 calc(var(--gutter) * -1 - 150px) 0 0; position: relative; }
.rings svg { display: block; width: 100%; height: auto; overflow: visible; }
.rings figcaption { position: absolute; left: 0; bottom: 0; max-width: 16em; font-size: var(--s-1); color: #A9B8C8; line-height: 1.7; }
.ring-label { font-family: var(--text); font-size: 15px; fill: #A9B8C8; }
.ring-label.now { fill: #DCC08A; }
.ring-axis { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.ring-core { fill: #D2B273; }
.ring-tick { fill: var(--indigo); stroke: #E6ECF2; stroke-width: 1.4; }
.ring-tick.y1 { stroke: #D2B273; }

.ring { fill: none; stroke: #E6ECF2; stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ring-draw 1.5s cubic-bezier(.45, 0, .2, 1) forwards; }
.ring.y1 { stroke: #D2B273; stroke-width: 1.9; }
.ring.y2 { animation-delay: .25s; }
.ring.y3 { animation-delay: .5s; }
.ring-future { fill: none; stroke: var(--celadon); stroke-width: 1.1; stroke-dasharray: 2 9; stroke-linecap: round; opacity: 0; animation: ring-fade 1s ease 1.4s forwards; }
.ring-axis, .ring-tick, .ring-label { opacity: 0; animation: ring-fade .8s ease 1.1s forwards; }
@keyframes ring-draw { to { stroke-dashoffset: 0; } }
@keyframes ring-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ring, .ring-future, .ring-axis, .ring-tick, .ring-label { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

/* ---------- Inner page head ---------- */

.page-head { position: relative; overflow: hidden; background: var(--indigo); color: #D8E0EA; }
.page-head .wrap { position: relative; padding-block: clamp(36px, 5vw, 60px) clamp(48px, 6.5vw, 88px); }
.page-head h1 { font-size: var(--s4); font-weight: 400; color: #fff; }
.page-head .lead { max-width: 33em; margin: 22px 0 0; font-size: var(--s1); line-height: 1.85; }
html[lang="en"] .page-head .lead { line-height: 1.55; }
.page-head :focus-visible { outline-color: #fff; }
.page-arcs { position: absolute; right: -150px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%); pointer-events: none; }
.page-arcs .a1 { fill: none; stroke: #D2B273; stroke-width: 1.5; }
.page-arcs .a2 { fill: none; stroke: #E6ECF2; stroke-width: 1; opacity: .6; }
.page-arcs .a3 { fill: none; stroke: var(--celadon); stroke-width: 1.1; stroke-dasharray: 2 9; stroke-linecap: round; }
.crumbs { display: flex; gap: 10px; margin-bottom: 34px; font-size: var(--s-1); color: #A9B8C8; }
.crumbs a { color: #A9B8C8; }
.crumbs a:hover { color: #fff; }

/* ---------- Sections: heading in the left margin, content on the right ---------- */

.section { padding-block: clamp(56px, 8vw, 108px); border-bottom: 1px solid var(--rule); }
.section-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px clamp(24px, 4vw, 64px); align-items: start; }
.section-title { font-size: var(--s3); text-wrap: balance; }
.section-note { margin: 16px 0 0; font-size: var(--s-1); color: var(--muted); line-height: 1.8; max-width: 20em; }
.section-body > :last-child { margin-bottom: 0; }
.after { margin: 32px 0 0; }
.small-note { margin: 34px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); max-width: var(--measure); font-size: var(--s-1); color: var(--muted); line-height: 1.85; }

.prose p { max-width: var(--measure); }

/* Service index: rows, not cards */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--indigo); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) max-content; gap: 12px 32px; align-items: baseline; padding: 30px 4px; color: inherit; text-decoration: none; transition: background-color .15s ease; }
.rows a:hover { background: var(--paper); }
.rows h3 { font-size: var(--s2); }
.rows p { margin: 0; color: var(--muted); }
.rows .more { font-size: var(--s-1); color: var(--indigo-mid); text-decoration: underline; text-underline-offset: 0.3em; white-space: nowrap; }

/* Year-by-year track: a real sequence, so it gets a line and nodes */
.track { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.track li { position: relative; padding: 30px 32px 0 0; border-top: 1px solid var(--indigo); }
.track li::before { content: ""; position: absolute; top: -7px; left: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--porcelain); border: 1.5px solid var(--indigo); }
.track li:first-child::before { background: var(--brass); border-color: var(--brass); }
.track .when { display: block; font-family: var(--display); font-size: var(--s0); color: var(--brass-text); letter-spacing: 0.1em; }
html[lang="en"] .track .when { letter-spacing: 0.02em; }
.track h3 { font-size: var(--s2); margin: 6px 0 12px; }
.track p { margin: 0; color: var(--muted); }

/* Dark band */
.band { background: var(--indigo); color: #DCE4EC; border-bottom: 0; }
.band .section-title { color: #fff; }
.stances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 64px; }
.stances h3 { font-size: var(--s2); color: #fff; margin-bottom: 10px; }
.stances p { margin: 0; color: #C3CFDB; }

/* Ordered steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; border-top: 1px solid var(--indigo); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 4px 12px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); grid-row: 1 / span 2; font-family: var(--display); font-size: 2.5rem; line-height: 1; color: var(--celadon-deep); }
.steps h3 { font-size: var(--s1); align-self: center; }
.steps p { grid-column: 2; margin: 0; color: var(--muted); max-width: var(--measure); }
.steps.compact { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 28px; }
.steps.compact li { display: block; padding: 22px 0 0; border-bottom: 0; }
.steps.compact li::before { display: block; font-size: 2rem; margin-bottom: 12px; }
.steps.compact h3 { margin-bottom: 6px; }
.steps.compact p { font-size: var(--s-1); line-height: 1.8; }

/* Definition-style item grid */
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 56px; margin: 0; }
.items div { border-top: 1px solid var(--rule); padding-top: 20px; }
.items dt { font-family: var(--display); font-size: var(--s1); color: var(--indigo); letter-spacing: 0.05em; margin-bottom: 6px; }
html[lang="en"] .items dt { letter-spacing: 0; }
.items dd { margin: 0; color: var(--muted); }
.items.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }

.plain-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--indigo); }
.plain-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); }

/* Things to know before deciding */
.notice { background: var(--paper); border: 1px solid var(--rule); padding: clamp(24px, 3.5vw, 40px); }
.notice ul { margin: 0; padding-left: 1.25em; }
.notice li { margin-bottom: 0.7em; max-width: 42em; }
.notice li:last-child { margin-bottom: 0; }
.footnote { margin: 22px 0 0; font-size: var(--s-1); color: var(--muted); }

/* Company profile */
.profile { margin: 0; border-top: 1px solid var(--indigo); }
.profile div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--indigo); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 22px 0; font-family: var(--display); font-size: var(--s1); color: var(--indigo); letter-spacing: 0.04em; }
html[lang="en"] .faq summary { letter-spacing: 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--text); font-size: 1.375rem; line-height: 1; color: var(--celadon-deep); flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0; padding: 0 0 24px; max-width: var(--measure); color: var(--muted); }

/* Contact */
.contact-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; border-top: 1px solid var(--indigo); }
.contact-list div { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); }
.contact-list dt { font-size: var(--s-1); color: var(--muted); }
.contact-list dd { margin: 2px 0 0; font-family: var(--display); font-size: var(--s2); color: var(--indigo); line-height: 1.5; overflow-wrap: anywhere; }
.contact-list dd.plain { font-family: var(--text); font-size: var(--s0); color: var(--ink); line-height: 1.8; padding-top: 6px; }
.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* Closing call to action */
.cta { background: var(--celadon-wash); }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; padding-block: clamp(48px, 6vw, 80px); }
.cta h2 { font-size: var(--s3); }
.cta p { margin: 12px 0 0; max-width: 34em; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 56px 40px; font-size: var(--s-1); color: var(--muted); }
.foot { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; }
.foot .brand { margin-bottom: 16px; }
.foot address { font-style: normal; line-height: 1.9; }
.foot address a { color: inherit; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.foot-nav a { color: var(--ink); text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.foot-note { margin: 24px 0 0; line-height: 1.85; max-width: 46em; }
.foot-rights { grid-column: 1 / -1; margin: 0; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.foot-rights a { color: inherit; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--porcelain); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px; margin: 0; }
  .nav.open { display: flex; }
  .nav-main { flex-direction: column; gap: 0 !important; }
  .nav-main a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
  .lang { border-left: 0; padding: 16px 0 !important; }
  .nav .btn { text-align: center; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; padding-bottom: 0; }
  .rings { margin: 36px 0 0; display: flex; flex-direction: column; }
  .rings figcaption { position: static; order: -1; max-width: none; margin: 0; }
  .rings svg { width: 128%; margin: 4px 0 -40% 6%; }
  .hero .lead, .page-head .lead { font-size: 1.125rem; }
  .section-grid { grid-template-columns: 1fr; }
  .section-note { max-width: var(--measure); }
  .rows a { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .track { grid-template-columns: 1fr; }
  .track li { padding: 26px 0 30px 28px; border-top: 0; border-left: 1px solid var(--indigo); }
  .track li::before { top: 32px; left: -7px; }
  .track li:last-child { padding-bottom: 0; }
  .stances, .items, .items.three, .contact-list { grid-template-columns: 1fr; }
  .stances { gap: 32px; }
  .steps.compact { grid-template-columns: 1fr; }
  .steps.compact li { display: grid; padding: 20px 0; border-bottom: 1px solid var(--rule); }
  .steps.compact li::before { margin-bottom: 0; }
  .profile div { grid-template-columns: 1fr; gap: 2px; }
  .page-arcs { opacity: .5; right: -330px; }
  .foot { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .brand-sub { display: none; }
  .btn { padding: 13px 26px; }
}

@media print {
  .site-header, .cta, .menu-btn, .rings, .page-arcs { display: none; }
  body { background: #fff; }
  .band { background: #fff; color: var(--ink); }
  .band .section-title, .stances h3 { color: var(--indigo); }
  .stances p { color: var(--ink); }
}
