/* ============================================================
   Two colors only: Japan-flag red #bc002d and white #ffffff.
   Every border/overlay below is an opacity tint of one of those two.
   ============================================================ */
:root {
  --red: #bc002d;
  --white: #ffffff;
  --red-tint-12: rgba(188, 0, 45, 0.12);
  --red-tint-30: rgba(188, 0, 45, 0.3);
  --red-tint-60: rgba(188, 0, 45, 0.6);
  --white-tint-15: rgba(255, 255, 255, 0.15);
  --white-tint-35: rgba(255, 255, 255, 0.35);
  --white-tint-70: rgba(255, 255, 255, 0.7);
  color-scheme: light;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Inter, ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", "Noto Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC",
    "Noto Sans Devanagari", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Anti-flash guard: hide until i18n.js applies a non-English language. */
.i18n-pending body {
  visibility: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--white);
  color: var(--red);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  background: var(--white);
  border-bottom: 1px solid var(--red-tint-12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
}

.brand-name {
  font-size: 18px;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}

.nav a {
  opacity: 0.78;
  transition: opacity 0.15s ease;
}

.nav a:hover {
  opacity: 1;
}

.lang-field {
  display: inline-flex;
}

#lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--white);
  color: var(--red);
  border: 1px solid var(--red-tint-30);
  border-radius: 999px;
  padding: 7px 30px 7px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23bc002d' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

#lang-select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--red);
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.button.primary {
  background: var(--red);
  color: var(--white);
}

.button.primary:hover {
  transform: translateY(-2px);
}

.button.ghost {
  background: transparent;
  color: var(--red);
}

.button.ghost:hover {
  background: var(--red);
  color: var(--white);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 64px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.72;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.hero-tagline {
  margin-top: 20px;
  font-size: 18px;
  max-width: 46ch;
  opacity: 0.85;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Hinomaru-framed duotone portrait */
.hero-portrait {
  display: grid;
  place-items: center;
}

.hinomaru {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--red);
  display: grid;
  place-items: center;
  box-shadow: 0 24px 60px var(--red-tint-30);
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: url(#duotone) grayscale(1);
}

/* Hero badge: always show the kanji monogram, keeping the portrait anonymous. */
.portrait-mark {
  display: block;
  font-size: clamp(96px, 22vw, 150px);
  color: var(--white);
  line-height: 1;
}

.hinomaru.no-photo {
  background: var(--white);
  border: 3px solid var(--red);
}

.hinomaru.no-photo .portrait-mark {
  display: block;
  color: var(--red);
}

/* ---------- Sections ---------- */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--red-tint-12);
}

/* "band" sections invert to a red background with white text — still two colors. */
.section.band {
  background: var(--red);
  color: var(--white);
  border-top: none;
  border-radius: 28px;
  padding: 56px 40px;
  margin: 24px 0;
}

.section-heading {
  max-width: 60ch;
  margin-bottom: 36px;
}

.section h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.lead {
  margin-top: 14px;
  font-size: 17px;
  opacity: 0.85;
}

.band .eyebrow {
  opacity: 0.85;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.principles,
.capabilities {
  grid-template-columns: repeat(3, 1fr);
}

.way {
  grid-template-columns: repeat(2, 1fr);
}

.principles article {
  border: 1px solid var(--white-tint-35);
  border-radius: 18px;
  padding: 24px;
}

.principles .kanji {
  display: block;
  font-size: 30px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.principles strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.principles em {
  display: block;
  font-style: normal;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.72;
  margin: 4px 0 12px;
}

.principles p {
  font-size: 15px;
  opacity: 0.9;
}

.capabilities article {
  border: 1px solid var(--red-tint-12);
  border-radius: 18px;
  padding: 24px;
  background: var(--white);
}

.capabilities h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.capabilities p {
  font-size: 15px;
  opacity: 0.82;
}

.way article {
  border: 1px solid var(--white-tint-35);
  border-radius: 18px;
  padding: 22px 24px;
}

.way strong {
  font-size: 17px;
}

.way p {
  margin-top: 8px;
  font-size: 15px;
  opacity: 0.9;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--white-tint-35);
}

.stats strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
}

.stats span {
  display: block;
  font-size: 13px;
  opacity: 0.82;
  margin-top: 4px;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
}

.contact .lead {
  margin: 14px auto 28px;
  max-width: 56ch;
}

.contact .button {
  margin-bottom: 18px;
}

.email-line {
  display: block;
  font-weight: 600;
  opacity: 0.8;
}

/* ---------- Footer ---------- */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--red-tint-12);
  font-size: 14px;
  opacity: 0.7;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 48px 0;
  }
  .hero-tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-portrait {
    order: -1;
  }
  .principles,
  .capabilities {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 861px) {
  .hero h1 {
    max-width: 11ch;
  }
}

@media (max-width: 560px) {
  .nav {
    display: none;
  }
  .principles,
  .capabilities,
  .way {
    grid-template-columns: 1fr;
  }
  .section.band {
    padding: 40px 22px;
  }
}
