:root {
  --blue: #21418b;
  --blue-deep: #152d65;
  --ink: #172031;
  --muted: #626a78;
  --border: #d9d8d2;
  --paper: #fffefa;
  --band: #eef1f7;
  --footer: #101f43;
  --white: #ffffff;
  --danger: #8d2a2a;
  --container: 1180px;
  --header-h: 80px;
  --diagram-rise: 10px;
  --diagram-stagger: 80ms;
  --diagram-icon-duration: 760ms;
  --diagram-wire-duration: 680ms;
  --diagram-ease: cubic-bezier(.22, 1, .36, 1);
  --diagram-wire-stroke: 2.4px;
  --radius: 8px;
  --shadow: 0 12px 32px rgba(23, 32, 49, 0.05);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 10px 14px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
}

.skip-link:focus { top: 12px; }

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

[hidden] { display: none !important; }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 254, 250, 0.94);
  border-bottom: 1px solid rgba(217, 216, 210, 0.9);
  backdrop-filter: blur(10px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-mark {
  display: block;
  width: 148px;
  height: 32px;
  background: var(--blue-deep);
  -webkit-mask: url("/assets/logo-rayzon.webp") left center / contain no-repeat;
  mask: url("/assets/logo-rayzon.webp") left center / contain no-repeat;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.menu-lines { position: relative; }
.menu-lines::before,
.menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-lines::before { top: -6px; }
.menu-lines::after { top: 6px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px 22px;
}

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { color: var(--blue); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); color: var(--white); }

.btn-secondary {
  background: var(--paper);
  color: var(--blue);
  border-color: #c9cdd6;
}
.btn-secondary:hover { border-color: var(--blue); background: var(--white); }

.btn-outline {
  min-height: 44px;
  padding: 0 16px;
  border-color: #c5cad3;
  color: var(--ink);
  font-weight: 500;
  background: var(--paper);
}
.btn-outline:hover,
.btn-outline[aria-current="page"] {
  border-color: var(--blue);
  color: var(--blue);
}

.btn:disabled { opacity: 0.65; cursor: default; }

/* Hero, cases, about, process, and contact rules are in assets/sections/ and load after this file. */

.section { padding: 104px 0; }
.section-tight-top { padding-top: 8px; }

#about,
#cases-logos,
#services,
#process,
#members,
#company,
#contact,
#privacy,
#confirm-heading {
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.section-band { background: var(--band); }

.kicker {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker .kicker-ja {
  margin-left: 8px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
}

.kicker .kicker-ja::before {
  content: "|";
  margin-right: 8px;
  color: #9aa6bd;
  font-weight: 400;
}

.section h2,
.contact-intro h1,
.thanks h1,
.not-found h1 {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 42em;
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

#confirm-heading {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.section-head { margin-bottom: 48px; }

.about-figure,
.mech,
.process-figure {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.diagram {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--blue);
  fill: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.diagram .wire,
.diagram .rule {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.diagram .wire { stroke-width: var(--diagram-wire-stroke); }
.diagram .rule { stroke-width: 1.5px; }

.diagram text { dominant-baseline: central; }

.diagram .quiet {
  fill: none;
  stroke: #c8c7c0;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.diagram .plate {
  fill: var(--band);
  stroke: none;
}

.diagram .knock {
  fill: var(--paper);
  stroke: none;
}

.diagram .icon,
.diagram .icon * {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.diagram .end { fill: var(--blue); }

.diagram .sub,
.diagram .fine {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.diagram .lane,
.diagram .arc-label,
.diagram .verb,
.diagram .compact-verb {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.diagram .tick {
  fill: var(--blue);
  font-size: 13px;
  font-weight: 500;
}

.diagram .verb.end,
.diagram .compact-verb.end {
  fill: var(--blue);
  font-weight: 700;
}

.diagram .fine { font-size: 11px; }
.diagram .compact-title { font-size: 11px; }
.diagram .compact-verb { font-size: 11px; }
.service-list { list-style: none; border-bottom: 1px solid var(--border); }

.service-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 3fr) minmax(420px, 2fr);
  gap: 16px 32px;
  align-items: start;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.service-copy {
  border-left: 1px solid var(--border);
  padding-left: 22px;
}

.service-no {
  color: var(--blue);
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.service-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
}

.service-title-main,
.service-sub { display: block; }

.service-sub {
  margin-top: 0.28em;
  color: var(--muted);
  font-size: 0.72em;
  font-weight: 400;
  line-height: 1.65;
}

.service-row p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.member-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  align-content: start;
  padding: 16px 16px 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.member-photo {
  position: relative;
  width: min(100%, 200px);
  aspect-ratio: 5 / 6;
  max-height: 240px;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f5f8;
}

.member-photo img {
  position: absolute;
  max-width: none;
  height: auto;
}

/* 一杉: smile. Public file member-ichisugi.jpg (source member-b). */
.member-photo-ichisugi img {
  width: 213.1%;
  left: -54.3%;
  top: -2.4%;
  object-fit: cover;
}

/* 植田: arms crossed. Public file member-ueda.jpg (source member-a). */
.member-photo-ueda img {
  width: 349.1%;
  left: -118.4%;
  top: -20.6%;
  object-fit: cover;
}

.member-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 18px 8px 12px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
}

.member-role {
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 8px 14px;
  list-style: none;
}

.member-tags li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--band);
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.member-bio {
  margin: 0 8px 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
}

.member-record { margin: 8px 8px 10px; border-top: 1px solid var(--border); }

.member-record summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.member-record summary::-webkit-details-marker { display: none; }

.member-record summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg) translateY(-2px);
}

.member-record[open] summary::after { transform: rotate(225deg) translateY(-2px); }

.member-record ul {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.member-record li {
  position: relative;
  padding-left: 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.member-record li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 1px;
  background: var(--blue);
}

.company-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 400;
}

.company-table tr:first-child th,
.company-table tr:first-child td { border-top: 1px solid var(--border); }

.company-table th {
  width: 8.5em;
  padding-right: 16px;
  color: var(--muted);
  font-weight: 500;
}

.company-table ul { list-style: none; }
.company-table a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.cta-band { padding: 28px 0 104px; }

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 44px;
  border-radius: 16px;
  background: var(--band);
}

.cta-panel h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.cta-panel p {
  max-width: 40em;
  margin-top: 10px;
  color: var(--muted);
}

.site-footer {
  background: var(--footer);
  color: rgba(255, 255, 255, 0.82);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
}

.footer-logo { width: 148px; height: auto; margin-bottom: 16px; }

.footer-address {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.8;
}

.footer-address a { text-decoration: underline; text-underline-offset: 3px; }

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  list-style: none;
  align-content: start;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}

.footer-nav a:hover { color: var(--white); }

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.thanks,
.not-found {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 280px);
  padding: 88px 0;
  text-align: center;
}

.thanks h1,
.not-found h1 { max-width: 12em; }
.thanks p,
.not-found p { margin: 16px 0 28px; color: var(--muted); }

@media (max-width: 1080px) {
  .menu-button { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { min-height: 48px; font-size: 16px; }
  .nav-cta { width: 100%; margin-top: 8px; }
}

@media (max-width: 959px) {
  .service-row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
  }
  .service-row .mech {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    margin-bottom: 20px;
  }
  .service-row .service-no {
    grid-column: 1;
    grid-row: 2;
  }
  .service-row .service-copy {
    grid-column: 2;
    grid-row: 2;
  }
  .member-photo {
    width: min(100%, 158px);
    max-height: 190px;
  }
}

@media (max-width: 800px) {
  .container { width: min(var(--container), calc(100% - 40px)); }
  .section { padding: 72px 0; }
  .member-grid,
  .company-layout,
  .footer-grid { grid-template-columns: 1fr; }
  .service-title { font-size: 18px; }
  .cta-panel,
  .cta-band { padding-bottom: 0; }
  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 22px;
    margin-bottom: 72px;
  }
  .cta-panel .btn { width: 100%; }
  .footer-nav { grid-template-columns: 1fr; }
  .company-table th,
  .company-table td { display: block; width: 100%; }
  .company-table th { padding-bottom: 0; border-bottom: 0; }
  .company-table td { padding-top: 4px; }
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.no-js) .diagram [data-diagram-icon],
  html:not(.no-js) .diagram [data-diagram-plate] {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: translateY(var(--diagram-rise));
    transition:
      opacity var(--diagram-icon-duration) var(--diagram-ease),
      transform var(--diagram-icon-duration) var(--diagram-ease);
    transition-delay: calc(var(--diagram-stagger) * var(--i, 0));
  }
  html:not(.no-js) .diagram.is-inview [data-diagram-icon],
  html:not(.no-js) .diagram.is-inview [data-diagram-plate] {
    opacity: 1;
    transform: none;
  }
  html:not(.no-js) .diagram .wire[data-wire] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  html:not(.no-js) .diagram:not(.is-drawn) .wire-end {
    marker-end: none;
  }
  html:not(.no-js) .diagram.is-inview .wire[data-wire] {
    animation: rayzon-wire-draw var(--diagram-wire-duration) var(--diagram-ease) forwards;
  }
  .rise.is-armed {
    opacity: 0;
    transform: translateY(8px);
  }
  .rise.is-in {
    animation: rise-in 0.9s ease-out 1 forwards;
  }
}

@keyframes rayzon-wire-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes rise-in {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arc-label { animation: none; opacity: 1; }
  .diagram [data-diagram-icon],
  .diagram [data-diagram-plate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .diagram .wire[data-wire] {
    animation: none;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
