/* ==========================================================================
   Cyrisin Inc. — B2B landing page (/ja/maso/, /en/maso/), the privacy page
   and the inquiry receipt pages.

   Loaded after site.css and built only from its tokens: same paper, same
   graphite, the one glass accent. Nothing here introduces a new colour.
   ========================================================================== */

/* ---------------------------------------------------------- line breaks -- */
/* Japanese has no spaces, so a browser may break a line inside any word
   (医|療, 設計|し). The Japanese pages that load this file carry <wbr>
   between phrases (scripts/ja-wbr.py, BudouX), and keep-all lets a line
   break only there, at spaces and after punctuation; overflow-wrap is the
   safety net for a phrase longer than its line. Re-run the script after
   editing Japanese text. Headings and labels are balanced so a short last
   line is never left alone; running text avoids a one-word last line. */
html:lang(ja) main { word-break: keep-all; overflow-wrap: anywhere; }
main :is(input, textarea) { word-break: normal; }
html:lang(ja) main :is(.link-underline, .link-out) { word-break: keep-all; }
main :is(h1, h2, h3, summary, legend, .card__title, .lp-tile__label, .tier__label) { text-wrap: balance; }
main :is(p, li, dd, figcaption) { text-wrap: pretty; }

/* ----------------------------------------------------------------- hero -- */
/* The LP hero has two jobs in one screen: the claim (headline, theoretical
   numbers, buttons) and the uses (seven photographs). So it is tighter than
   the corporate hero, and splits into two columns once there is room. */
.lp-hero { padding-block: clamp(2rem, 5vw, 3.75rem) clamp(3rem, 7vw, 5.5rem); }
.lp-hero h1,
:lang(ja) .lp-hero h1 { font-size: clamp(1.75rem, 1rem + 2vw, 2.35rem); max-width: none; }
.lp-hero .lead { font-size: clamp(1rem, 0.96rem + 0.25vw, 1.0625rem); }
.lp-hero .target { padding-top: 1.1rem; gap: clamp(1.2rem, 4vw, 2.5rem); }
.lp-hero .target__value { font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.5rem); }
.lp-hero .target__times { padding-bottom: 0.9rem; }

.lp-hero__grid { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: center; }

/* Seven photographs, one per use. Each is a link to its card further down.
   Under the text on a tablet they run three across, with the first and the
   last two columns wide, so the seven fill three rows exactly; a wide tile
   takes its height from the 4:3 tile beside it. Beside the text on a desktop
   they run two across: the first on a row of its own, then three rows of
   two, cropped to 16:9 so the block stays about as tall as the text column.
   The photo is positioned absolutely, so only the tile's own shape sets the
   row height. The first and last tiles get a 960px source (srcset) for when
   they are drawn wide. */
.lp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.lp-tiles > li:first-child,
.lp-tiles > li:last-child { grid-column: span 2; }
.lp-tiles > li:first-child .lp-tile,
.lp-tiles > li:last-child .lp-tile { aspect-ratio: auto; height: 100%; }
.lp-tiles > li:first-child img { object-position: 50% 40%; }
.lp-tiles > li:last-child img { object-position: 50% 35%; }
@media (min-width: 1000px) {
  .lp-hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .lp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-tiles .lp-tile,
  .lp-tiles > li:last-child .lp-tile { aspect-ratio: 16 / 9; height: auto; }
  .lp-tiles > li:last-child { grid-column: auto; }
  .lp-tiles > li:first-child .lp-tile { aspect-ratio: 32 / 9; height: auto; }
}
/* On a phone the text alone fills the first screen, so the photographs move
   up to sit right under the headline as a strip you can swipe sideways.
   display:contents lets the text column's children take part in the hero
   grid, so `order` can slot the strip between them. Only the strip scrolls;
   the page never does. */
@media (max-width: 640px) {
  .lp-hero__grid { gap: 1.35rem; }
  .lp-hero__grid > .hero__inner { display: contents; }
  .lp-hero__grid .eyebrow { order: 1; }
  .lp-hero__grid h1 { order: 2; }
  .lp-hero__uses { order: 3; }
  .lp-hero__grid .lead { order: 4; }
  .lp-hero__grid .tier { order: 5; }
  .lp-hero__grid .hero__actions { order: 6; }
  .lp-tiles {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .lp-tiles::-webkit-scrollbar { display: none; }
  .lp-tiles li { flex: 0 0 46%; scroll-snap-align: start; }
  .lp-br-wide { display: none; }
  .lp-tiles > li:first-child .lp-tile,
  .lp-tiles > li:last-child .lp-tile { aspect-ratio: 4 / 3; height: auto; }
}
.lp-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.lp-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.lp-tile:hover img,
.lp-tile:focus-visible img { transform: scale(1.04); }
/* A dark fade under the label so white text stays readable on any photo. */
.lp-tile__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.6rem 0.65rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(180deg, rgba(10, 12, 16, 0) 0%, rgba(10, 12, 16, 0.7) 100%);
}

.lp-note {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-faint);
}
.lp-hero__note { margin-top: 0.6rem; }

/* ---------------------------------------------------------- photographs -- */
/* Same treatment as the news photos: the files are 1040px wide and the
   frame never lets them grow past their natural size. */
.lp-photo { margin: 0; display: grid; gap: 0.6rem; }
.lp-photo img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.lp-photo figcaption { font-size: 0.8125rem; line-height: 1.7; color: var(--text-faint); }

.lp-split {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 880px) {
  .lp-split { grid-template-columns: 1.05fr 1fr; }
  .lp-split--flip > :first-child { order: 2; }
}

/* Four short cards: two by two on a desktop, one column below ~760px. */
.lp-grid-4 {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

/* ------------------------------------------------------------ use cases -- */
.lp-use { display: grid; gap: 0.7rem; align-content: start; }
.lp-use__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 0.3rem;
}
.lp-use__more {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  justify-self: start;
}
/* Seven use cards and an eighth, text-only cell for uses nobody has named
   yet. The grid (.grid-2) fits as many 300px columns as it can: one on a
   phone, two below about 1036px (four full rows), three above, where the
   eighth cell spans two columns so the third row closes. Its text sits
   centred in the height the photo card beside it gives the row. */
.lp-use--other { align-content: center; }
.lp-use--other > * { max-width: 34em; }
@media (min-width: 1036px) {
  .lp-uses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-use--other { grid-column: span 2; }
}
.lp-closing {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
}
.lp-closing p { font-size: 1.0625rem; line-height: 1.8; color: var(--text); max-width: var(--measure); }

/* ---------------------------------------------------------------- steps -- */
/* Numbered because the order is the point: talk, NDA, design, supply. */
.lp-steps { display: grid; gap: 0; counter-reset: step; border-top: 1px solid var(--line); }
.lp-steps li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0 1rem;
  padding-block: clamp(1.1rem, 2.4vw, 1.5rem);
  border-bottom: 1px solid var(--line);
}
.lp-steps li::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  width: 2rem; height: 2rem;
  border: 1px solid var(--glass-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 1;
}
.lp-steps h3 { grid-column: 2; font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.3rem; }
.lp-steps p { grid-column: 2; color: var(--text-dim); font-size: 0.9375rem; line-height: 1.8; }

/* ------------------------------------------------------------ track record -- */
.lp-record { display: grid; gap: 1rem; }
.lp-record li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
  line-height: 1.8;
}
.lp-record li::before {
  content: "";
  width: 7px; height: 7px;
  margin-top: 0.72em;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
}
.lp-record strong { color: var(--text); font-weight: 600; }
.lp-record cite { font-style: normal; }

/* ------------------------------------------------------------------ FAQ -- */
/* <details> works with scripting off, which is the house rule. */
.lp-faq { border-top: 1px solid var(--line); max-width: 52rem; }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1.1rem;
  font-weight: 600;
  font-size: 1rem;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq details > p {
  color: var(--text-dim);
  font-size: 0.9375rem;
  line-height: 1.85;
  padding-bottom: 1.2rem;
  max-width: var(--measure);
}

/* ----------------------------------------------------------------- form -- */
.lp-form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 92% 0%, rgba(255, 115, 0, 0.08) 0%, transparent 60%),
    var(--surface);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.lp-form { display: grid; gap: 1.35rem; }
.lp-form__row { display: grid; gap: 1.35rem; }
@media (min-width: 720px) {
  .lp-form__row { grid-template-columns: 1fr 1fr; }
}

.lp-field { display: grid; gap: 0.45rem; align-content: start; }
.lp-label, .lp-legend {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5em;
}
.lp-req, .lp-opt {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  line-height: 1;
}
.lp-req { color: var(--accent); border: 1px solid var(--glass-line); background: rgba(253, 230, 212, 0.5); }
.lp-opt { color: var(--text-faint); border: 1px solid var(--line-strong); }
.lp-hint { font-size: 0.8125rem; line-height: 1.6; color: var(--text-faint); }

.lp-input,
.lp-textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.lp-textarea { min-height: 11rem; resize: vertical; }
.lp-input:focus,
.lp-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 80, 0, 0.15);
}
.lp-input::placeholder,
.lp-textarea::placeholder { color: var(--text-faint); opacity: 1; }

.lp-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 0.55rem; }
.lp-legend { padding: 0; margin-bottom: 0.15rem; }
.lp-choices {
  display: grid;
  gap: 0.45rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.lp-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-dim);
  cursor: pointer;
}
.lp-choice input {
  margin: 0.3em 0 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.lp-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.lp-consent input { margin: 0.3em 0 0; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

.lp-purpose {
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

.lp-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.lp-submit .btn { font-size: 0.95rem; padding: 0.9rem 1.6rem; cursor: pointer; font-family: inherit; }
.lp-submit .btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }

/* The honeypot. Off-screen rather than display:none, which some bots skip. */
.lp-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Result line under the button, announced to screen readers (aria-live). */
.lp-status { font-size: 0.9375rem; line-height: 1.7; color: var(--text-dim); }
.lp-status:empty { display: none; }
.lp-status[data-state="ok"] {
  color: var(--text);
  border: 1px solid var(--glass-line);
  background: rgba(253, 230, 212, 0.55);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
}
.lp-status[data-state="error"] { color: #8a2a1d; }

.lp-alt { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--text-dim); }

/* ---------------------------------------------------- privacy page -- */
.lp-policy { max-width: var(--measure); display: grid; gap: 2.4rem; }
.lp-policy h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.7rem; }
.lp-policy p, .lp-policy li { color: var(--text-dim); font-size: 0.9375rem; line-height: 1.85; }
.lp-policy p + p,
.lp-policy ul + p { margin-top: 0.8rem; }
.lp-policy p + ul { margin-top: 0.6rem; }
.lp-policy ul { display: grid; gap: 0.45rem; }
.lp-policy li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
}
.lp-policy li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 0.75em;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
}
.lp-policy .sub { display: block; color: var(--text-faint); font-size: 0.8125rem; margin-top: 0.4rem; }

@media print {
  .lp-form-panel { background: none; }
}

/* Keeps a Japanese phrase on one line in a large heading; the heading may
   still wrap between phrases. Without it a narrow screen splits words such
   as 超軽量 across lines. */
.lp-nb { white-space: nowrap; }
