:root {
  --paper: #fbfbf8;
  --paper-soft: #f4f3ef;
  --ink: #17171a;
  --ink-soft: #6c6c66;
  --ink-faint: #73736c;
  --line: #e4e3dd;
  --field-line: #91908a;
  --accent: #0f6f60;
  --measure: 58rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131416;
    --paper-soft: #1a1c1f;
    --ink: #eceae4;
    --ink-soft: #9b9a93;
    --ink-faint: #81807a;
    --line: #2a2c30;
    --field-line: #616367;
    --accent: #7ed4be;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo,
    system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.9;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

/* The toggle shows one language and hides the other. */
html[data-lang="ja"] .en,
html[data-lang="en"] .ja { display: none; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: opacity 0.2s var(--ease);
}

a:hover { opacity: 0.65; }

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

/* ---- header ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.25rem 1.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { opacity: 1; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.brand-name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.lang-switch button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.lang-switch button:hover { color: var(--ink-soft); }

.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
}

/* ---- layout ---- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.75rem;
}

section + section {
  border-top: 1px solid var(--line);
  padding-top: 4rem;
}

section > h2 {
  margin: 0 0 2rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---- hero ---- */

.hero { padding: 9rem 0 8rem; }

.hero h1 {
  margin: 0;
  font-family: ui-serif, Georgia, "Hiragino Mincho ProN", "Yu Mincho",
    YuMincho, "Noto Serif JP", serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
}

/* ---- products ---- */

.products { padding-bottom: 4rem; }

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

.plain-list li + li {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.plain-list h3 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.plain-list p {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.85;
}

.meta {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ---- catalogue controls ---- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.catalogue {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem 1.75rem;
  margin: -0.5rem 0 2.5rem;
}

.catalogue-search { flex: 1 1 11rem; }

.catalogue-search input {
  width: 100%;
  padding: 0.4rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s var(--ease);
}

.catalogue-search input::placeholder { color: var(--ink-faint); }

.catalogue-search input:hover { border-bottom-color: var(--ink-soft); }

.catalogue-search input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.catalogue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalogue-filters button {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.catalogue-filters button:hover { color: var(--ink-soft); }

.catalogue-filters button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
}

.catalogue-sort {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.catalogue-sort label {
  color: var(--ink-faint);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.catalogue-sort select {
  appearance: none;
  padding: 0.2rem 1.1rem 0.2rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  /* Caret drawn here because appearance:none removes the native one. */
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 0.38rem center, right 0.15rem center;
  background-size: 0.23rem 0.23rem, 0.23rem 0.23rem;
  background-repeat: no-repeat;
}

.catalogue-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

@media (max-width: 34rem) {
  .catalogue { gap: 1rem 1.25rem; }
  .catalogue-search { flex-basis: 100%; }
}

/* ---- contact ---- */

.contact { padding-bottom: 4rem; }

.contact form { max-width: 30rem; }

.field { margin: 0 0 1.4rem; }

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease);
}

.field input:hover,
.field textarea:hover { border-bottom-color: var(--ink-soft); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.field textarea { resize: vertical; line-height: 1.8; }

/* Off-screen rather than display:none, because some bots skip
   hidden inputs and would miss the trap. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit {
  appearance: none;
  margin-top: 0.5rem;
  padding: 0.7rem 2rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.submit:hover:not(:disabled) {
  background: var(--accent);
  color: var(--paper);
}

.submit:disabled { opacity: 0.4; cursor: progress; }

.form-status {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  min-height: 1.5em;
}

.form-status.is-error { color: #b4342b; }

@media (prefers-color-scheme: dark) {
  .form-status.is-error { color: #e8938b; }
}

/* ---- company ---- */

.profile { padding-bottom: 5rem; }

.profile dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
}

.profile dt,
.profile dd {
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.profile dt {
  color: var(--ink-faint);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.profile dd { font-size: 0.92rem; }

.profile dl > dt:first-of-type,
.profile dl > dt:first-of-type + dd { border-top: 0; }

/* ---- prose pages ---- */

.prose {
  max-width: 40rem;
  padding: 4rem 0 5rem;
}

.prose h1 {
  margin: 0 0 0.5rem;
  font-family: ui-serif, Georgia, "Hiragino Mincho ProN", "Yu Mincho",
    YuMincho, serif;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 400;
  line-height: 1.5;
}

.prose h2 {
  margin: 3rem 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
}

.prose p,
.prose li {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose ul { padding-left: 1.1rem; }

.prose li { margin-bottom: 0.5rem; }

.prose .updated {
  margin: 0 0 2.5rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.prose .contact-line {
  font-size: 1rem;
  margin: 1.5rem 0;
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.site-footer p {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.25rem 1.75rem 3rem;
  line-height: 2.2;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover { color: var(--ink); opacity: 1; }

/* ---- small screens ---- */

@media (max-width: 34rem) {
  .hero { padding: 6rem 0 5rem; }

  .profile dl { grid-template-columns: 1fr; }

  .profile dt {
    padding-bottom: 0;
    border-top: 1px solid var(--line);
  }

  .profile dd { padding-top: 0.25rem; border-top: 0; }
  .profile dl > dt:first-of-type + dd { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
