/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4
 * genre: modern-minimal · macrostructure: Studied product-story split
 * theme: studied-DNA (source: https://aizoth.com/) · observed fonts: Noto Sans JP + Noto Serif JP
 * observed palette: white / mint / cyan surfaces · navy headings · yellow CTA · illustration-led
 * enrichment: Tier-C generated product illustrations · nav: preserved N1b · footer: preserved Ft1
 * contrast: pass (40–41) · studied: yes · DNA-source: url · rhythm: unknown (URL mode)
 * slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30)
 * mobile: pass (34, 49, 50–57)
 */

@import url("./tokens.css");

.ms-site {
  background: var(--color-paper);
  color: var(--color-ink-soft);
}

.ms-hero--visual {
  overflow: hidden;
  padding-block: clamp(var(--space-xl), 7vw, var(--space-3xl)) clamp(var(--space-2xl), 9vw, var(--space-4xl));
  position: relative;
}

.ms-hero--visual::before {
  background: var(--color-paper-blue);
  border-radius: 50% 0 0 50%;
  content: "";
  inset-block: var(--space-xl) calc(var(--space-xl) * -1);
  inset-inline-start: 44%;
  position: absolute;
  z-index: 0;
}

.ms-hero--visual .ms-shell {
  position: relative;
  z-index: 1;
}

.ms-home-hero__grid,
.ms-product-hero__grid {
  align-items: center;
  display: grid;
  gap: clamp(var(--space-xl), 5vw, var(--space-3xl));
  grid-template-columns: minmax(0, 1fr);
}

.ms-home-hero__content,
.ms-product-hero__content {
  display: grid;
  gap: var(--space-lg);
  min-width: 0;
}

.ms-home-hero__content .ms-brand-lockup {
  gap: var(--space-md);
}

.ms-home-hero__content h1,
.ms-product-hero__content h1 {
  font-size: clamp(var(--text-2xl), 4.6vw, var(--text-display-small));
  max-width: 13ch;
}

/* Preserve meaningful Japanese word and product-name units when headlines wrap. */
.ms-title-unit {
  display: inline-block;
  white-space: nowrap;
}

.ms-home-visuals {
  align-items: end;
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.76fr);
  min-width: 0;
}

.ms-visual-stage {
  background: var(--color-surface);
  border: var(--rule-thin) solid var(--color-rule);
  border-radius: var(--radius-lg);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: var(--space-sm);
}

.ms-visual-stage--main {
  background: var(--color-paper-blue);
  margin-block-end: var(--space-xl);
}

.ms-visual-stage--secondary {
  background: var(--color-brand-soft);
}

.ms-visual-stage img,
.ms-product-card__visual img,
.ms-proof-panel__visual img {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.ms-product-hero__visual {
  align-self: stretch;
  background: var(--color-paper-blue);
}

.ms-product-hero__visual--alchemy {
  background: var(--color-brand-soft);
}

.ms-site .ms-action--primary {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: var(--color-accent-ink) !important;
}

.ms-site .ms-action--primary:hover,
.ms-site .ms-action--primary.is-hover {
  background: var(--color-graphite-soft);
  border-color: var(--color-graphite-soft);
  color: var(--color-accent-ink) !important;
}

.ms-site .ms-action--quiet:hover,
.ms-site .ms-action--quiet.is-hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: var(--color-surface) !important;
}

.ms-catalogue {
  gap: var(--space-lg);
}

.ms-product-card {
  background: var(--color-surface);
  border: var(--rule-thin) solid var(--color-rule);
  border-block-start-width: var(--rule-strong);
  border-radius: var(--radius-md);
  min-width: 0;
  padding: var(--space-lg);
}

.ms-product-card--architect {
  background: var(--color-paper-blue);
}

.ms-product-card--alchemy {
  background: var(--color-brand-soft);
}

.ms-product-card__visual {
  align-items: center;
  background: var(--color-paper-soft);
  border-radius: var(--radius-sm);
  display: flex;
  min-height: 8rem;
  overflow: hidden;
  padding: var(--space-sm);
}

.ms-product-card--architect .ms-product-card__visual {
  background: var(--color-paper);
}

.ms-product-card--alchemy .ms-product-card__visual {
  background: var(--color-paper);
}

.ms-product-card__visual--sigma {
  justify-content: center;
}

.ms-product-card__visual--sigma img {
  max-width: 11rem;
}

.ms-product-card__meta {
  color: var(--color-accent-strong);
  font-weight: 700;
}

.ms-choice-grid {
  gap: var(--space-lg);
}

.ms-choice {
  background: var(--color-surface);
  border-block-start: var(--rule-strong) solid var(--color-accent);
  padding: var(--space-lg);
}

.ms-choice:nth-child(2) {
  border-block-start-color: var(--color-accent-strong);
}

.ms-choice:nth-child(3) {
  border-block-start-color: var(--color-brand-strong);
}

.ms-section--soft {
  background: var(--color-paper-soft);
}

.ms-section--soft .ms-section-head {
  padding-block-start: var(--space-xs);
}

.ms-proof-panel {
  background: var(--color-paper-blue);
  border: var(--rule-thin) solid var(--color-rule);
  color: var(--color-ink-soft);
}

.ms-proof-panel h2,
.ms-proof-panel h3,
.ms-proof-panel p {
  color: var(--color-ink);
}

.ms-proof-panel__visual {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  margin: 0;
  overflow: hidden;
  padding: var(--space-xs);
}

.ms-data-flow li {
  background: var(--color-surface);
  border-color: var(--color-rule-strong);
  color: var(--color-ink-soft);
}

.ms-data-flow li::after {
  color: var(--color-accent-strong);
}

.ms-feature-row {
  border-block-start: var(--rule-thin) solid var(--color-rule);
  padding-block-start: var(--space-2xl);
}

.ms-feature-row__proof {
  border-radius: var(--radius-md);
}

.ms-use-case {
  background: var(--color-paper-blue);
  border: 0;
  border-block-start: var(--rule-strong) solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.ms-use-case:nth-child(even) {
  background: var(--color-brand-soft);
  border-block-start-color: var(--color-brand-strong);
}

.ms-section--dark {
  background: var(--color-graphite);
}

.ms-section--dark .ms-spec-list {
  border-block-start-color: var(--color-graphite-ink);
}

.ms-section--dark .ms-spec-list > div {
  border-block-end-color: var(--color-graphite-soft);
}

.ms-news {
  background: var(--color-surface);
}

.ms-news-item {
  padding-inline: var(--space-md);
}

@media (min-width: 40rem) {
  .ms-home-hero__grid,
  .ms-product-hero__grid {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  }

  .ms-catalogue {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .ms-catalogue > :nth-child(1) {
    grid-column: span 3;
  }

  .ms-catalogue > :nth-child(2) {
    grid-column: span 5;
  }

  .ms-catalogue > :nth-child(3) {
    grid-column: span 4;
  }

  .ms-choice-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

@media (min-width: 60rem) {
  .ms-home-hero__grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .ms-product-hero__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .ms-product-hero__visual {
    margin-inline-end: calc(var(--space-xl) * -1);
  }
}

@media (pointer: coarse) {
  .ms-product-card__link {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-site *,
  .ms-site *::before,
  .ms-site *::after {
    animation-duration: var(--dur-micro) !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--dur-micro) !important;
  }
}

/* Product-line card alignment: each visual uses one consistent frame. */
.ms-product-card {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.ms-product-card__visual {
  aspect-ratio: 16 / 10;
  min-height: 0;
  width: 100%;
}

.ms-product-card__visual img {
  height: 100%;
  max-width: none;
  object-fit: contain;
  width: 100%;
}

.ms-product-card__visual--sigma img {
  max-width: none;
}

@media (min-width: 40rem) {
  .ms-catalogue {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ms-catalogue > :nth-child(n) {
    grid-column: auto;
  }
}