/* ---- Brand tokens ---- */
:root {
  --navy: #292B57;
  --navy-soft: #3a3d6e;
  --blue: #147FAA;
  --blue-soft: #2a9bc7;
  --white: #ffffff;
  --offwhite: #f6f7fb;
  --ink: #1a1b35;
  --ink-muted: #5a5d7a;
  --line: #e4e6f0;

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4rem, 9vw, 7rem);
  --radius: 0; /* brand prefers sharp corners */

  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "Yu Gothic", "Meiryo", "Segoe UI", Roboto, system-ui, sans-serif;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  /* Japanese-aware wrapping: `normal` lets CJK wrap between characters (correct
     JP typography, and keeps min-content tiny so flex/grid tracks never blow past
     the viewport — the cause of the earlier mobile horizontal overflow);
     `overflow-wrap: break-word` breaks long Latin/URL runs as a fallback;
     `line-break: strict` avoids orphaned 、。 / small kana at line start. The brand
     name "X-DEAL" is kept intact via the `.nobr` helper where needed. Headings
     re-enable `word-break: keep-all` so short titles break at punctuation. */
  word-break: normal;
  overflow-wrap: break-word;
  line-break: strict;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--navy);
  letter-spacing: -.01em;
  /* Headings are short — keep CJK runs together so they break at punctuation
     (、。) rather than mid-phrase. Safe from overflow at these lengths. */
  word-break: keep-all;
}
/* Japanese clause units in headings. WebKit/Safari ignores the break
   opportunity that `word-break: keep-all` gives after 、 (Blink/Android allows
   it), so headings broke mid-phrase on iPhone. Making each clause an atomic
   inline-block forces the break at the clause boundary in BOTH engines; a clause
   still wraps internally if it alone exceeds a very narrow viewport. */
.phrase { display: inline-block; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1em; }
ul { margin: 0; padding-left: 1.25em; }

/* ---- Utilities ---- */
/* Keep the brand name from splitting at its hyphen ("X-" / "DEAL") */
.nobr { white-space: nowrap; }
.u-mt-lg { margin-top: 1.75rem; }
.u-measure-md { max-width: 60ch; }
.u-measure-sm { max-width: 48ch; }
.u-text-on-navy { color: rgba(255, 255, 255, .85); }

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-pad) 0; }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--soft { background: var(--offwhite); }
.eyebrow {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
  font-weight: 600;
}
.section--navy .eyebrow { color: var(--blue-soft); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 64px;
}
.site-header .brand img { height: 28px; width: auto; }
.site-nav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--blue); text-decoration: none; }

/* ---- Hero ---- */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(5rem, 12vw, 8rem);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .hero__inner { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}
.hero h1 { color: var(--white); margin-top: 1rem; }
.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255,255,255,.85);
  max-width: 38ch;
}
/* CTA buttons: wrap cleanly with even spacing on narrow screens
   (replaces the old margin-left hack that mis-indented a wrapped button). */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__visual img { max-width: 240px; width: 60%; opacity: .95; }

/* Subtle diamond accent in hero corners */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  background: var(--blue);
  opacity: .08;
  transform: rotate(45deg);
  pointer-events: none;
}
.hero::before { top: -100px; right: -100px; }
.hero::after  { bottom: -100px; left: -100px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: .85rem 1.5rem;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-soft); text-decoration: none; }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn--ghost:hover { border-color: var(--white); text-decoration: none; }

/* ---- About ---- */
.about__layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 880px) {
  .about__layout { grid-template-columns: 1.6fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
}
.about__body { max-width: 64ch; }
.about__body p { font-size: 1.02rem; }

/* Stats panel — balances the text column, echoes the brand's top-accent cards */
.about__stats {
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
}
.stat { padding: 1.4rem 1.6rem; }
.stat + .stat { border-top: 1px solid var(--line); }
.stat__num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -.01em;
}
.stat__plus { color: var(--blue); }
.stat__label {
  display: block;
  margin-top: .35rem;
  font-size: .85rem;
  color: var(--ink-muted);
  letter-spacing: .04em;
}

/* ---- Services ---- */
.services__intro { margin-bottom: 2.5rem; }
.services__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .services__grid { grid-template-columns: repeat(2, 1fr); } }
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.75rem;
  transition: border-color .15s ease, transform .15s ease;
}
.service-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}
.service-card__mark {
  width: 18px; height: 18px;
  background: var(--blue);
  transform: rotate(45deg);
  margin-bottom: 1rem;
}
.service-card h3 { margin-bottom: .5rem; }
.service-card p { color: var(--ink-muted); margin-bottom: 0; font-size: .95rem; }

/* ---- Contact ---- */
.contact__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .contact__grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
}
.contact__info dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem 1.5rem;
}
.contact__info dt {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding-top: .15rem;
}
.contact__info dd { margin: 0; color: var(--ink); }
/* Emails / URLs in the contact panel may break anywhere to avoid horizontal overflow */
.contact__info dd,
.contact__info dd a {
  overflow-wrap: anywhere;
}
/* Contact section is on navy bg — lift dl colors to be readable */
.section--navy .contact__info dt { color: rgba(255, 255, 255, .55); }
.section--navy .contact__info dd { color: rgba(255, 255, 255, .95); }
.section--navy .contact__info dd a { color: var(--blue-soft); }
.section--navy .contact__info dd a:hover { color: var(--white); }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 2.5rem 0;
  font-size: .9rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer img { height: 24px; width: auto; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--white); }
