/*
  TSUKI JAPAN company page.
  Calm, Apple-like clarity under the company's own identity (docs/design/README.md): the deck's green is the single
  accent, surfaces are white, cream, and deep green, fonts are the system's, and nothing copies Apple's palette,
  wording, or navigation. No inline styles: the content security policy allows only this stylesheet.
*/

:root {
  color-scheme: light dark;
  --canvas: #ffffff;
  --canvas-alt: #f7f5ef;
  --tile-dark: #14231d;
  --ink: #1e2a26;
  --ink-muted: #56635d;
  --on-dark: #f7f5ef;
  --on-dark-muted: #c3cfc8;
  --accent: #175843;
  --accent-on-dark: #8fcbab;
  --hairline: rgba(30, 42, 38, 0.14);
  --subnav-bg: rgba(247, 245, 239, 0.8);
  --radius-card: 18px;
  --radius-pill: 9999px;
  --section-pad: clamp(3.5rem, 2.25rem + 5vw, 5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0f1512;
    --canvas-alt: #151d19;
    --tile-dark: #1c2a24;
    --ink: #e9eee9;
    --ink-muted: #a9b6af;
    --on-dark: #f0f4f1;
    --on-dark-muted: #bccac2;
    --accent: #8fcbab;
    --accent-on-dark: #a6dabd;
    --hairline: rgba(233, 238, 233, 0.16);
    --subnav-bg: rgba(15, 21, 18, 0.78);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  line-break: strict;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

:lang(en) {
  line-height: 1.47;
}

/* Japanese breaks between phrases, not inside words: by phrase where the browser can, and at marked points
   (<wbr>) in the motto and the company details everywhere. */

:lang(ja) {
  word-break: auto-phrase;
}

.lead,
dd {
  word-break: keep-all;
}

h1,
h2,
.lead,
.tagline {
  text-wrap: balance;
}

.nowrap {
  white-space: nowrap;
}

p {
  margin: 0;
}

/* Frosted bar that stays at the top while the page scrolls under it. */

.subnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--subnav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.subnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 61.25rem;
  min-height: 3.25rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.subnav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.625rem;
  border-radius: 0.5rem;
  color: var(--accent);
  font-size: 0.875rem;
  line-height: 1;
  text-decoration: none;
}

.subnav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.subnav a:active {
  opacity: 0.55;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Full-width bands. The change of colour between bands is the divider. */

.tile {
  padding-block: var(--section-pad);
  background: var(--canvas);
}

.tile-alt {
  background: var(--canvas-alt);
}

.tile-dark {
  background: var(--tile-dark);
  color: var(--on-dark);
}

.tile-inner {
  max-width: 61.25rem;
  margin: 0 auto;
  padding-inline: 1rem;
}

.centered {
  text-align: center;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 1.5rem + 3.75vw, 3.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.015em;
}

h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  scroll-margin-top: 4.5rem;
}

h2:lang(en) {
  letter-spacing: -0.01em;
}

.lead {
  max-width: 46rem;
  margin: 0 auto 0.75rem;
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.75rem);
  font-weight: 400;
  line-height: 1.5;
}

.tagline {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--ink-muted);
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.3125rem);
}

.chip {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--canvas-alt);
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Reading sections: a narrow column, with the heading centred above it. */

.prose {
  max-width: 42.5rem;
}

.prose h2 {
  text-align: center;
}

.prose p + p {
  margin-top: 1rem;
}

.tile-dark .secondary {
  color: var(--on-dark-muted);
}

/* Company details: one rounded card with hairline rows. */

.details h2 {
  text-align: center;
}

.secondary {
  color: var(--ink-muted);
}

h2 .secondary {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0;
}

.facts {
  max-width: 42.5rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--canvas-alt);
}

.facts > div {
  display: grid;
  gap: 0.125rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
}

.facts > div:first-child {
  border-top: 0;
}

dt {
  font-weight: 600;
}

dt .secondary,
dd .secondary {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.43;
  letter-spacing: 0.01em;
}

dd {
  margin: 0;
}

abbr[title] {
  text-decoration: none;
}

.people {
  margin: 0;
  padding: 0;
  list-style: none;
}

.people li + li {
  margin-top: 0.5rem;
}

.footer {
  padding-block: 2.5rem 3rem;
  background: var(--canvas-alt);
  border-top: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

@media (max-width: 39.99rem) {
  .chip {
    flex-direction: column;
    gap: 0;
    border-radius: var(--radius-card);
  }

  .chip-dot {
    display: none;
  }
}

@media (min-width: 40rem) {
  .subnav-inner,
  .tile-inner {
    padding-inline: 1.5rem;
  }

  .facts {
    padding: 0 1.75rem;
  }

  .facts > div {
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .subnav {
    background: var(--canvas-alt);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-muted: var(--ink);
    --on-dark-muted: var(--on-dark);
    --hairline: var(--ink);
  }

  .subnav {
    background: var(--canvas);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
