/* Hallmark · macrostructure: Split Studio · nav: N5 Floating pill · footer: Ft2 compact link row
 * genre: modern-minimal · tone: utilitarian (誠実・実務的)
 * audience: 外国人材関連サービス事業者の経営者・営業責任者 / use: 無料相談フォームの送信
 * theme: 3 variants on [data-theme] — a=継承Lime / b=信頼Navy / c=実直Clay
 * enrichment: labelled image placeholders (user supplies the real assets)
 * differs from the top page on: macrostructure, nav, footer, motion weight
 * Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V5 */

/* ---------- theme variants · 信頼感 × 高級感 ----------
 * Structure taken from the reference the client chose (their own sample site):
 * deep ground + warm off-white paper + a metal used ONLY as hairlines and
 * labels, never as a flood. The CTA is the deep ground, not the metal — that
 * is what keeps it premium rather than gaudy.
 * Two metal tokens per theme: --lp-accent sits on the dark ground,
 * --lp-mark is the darker cousin that can sit on paper.            */

/* 1 · Navy & Brass — the reference palette (#102a43 / #b8924f / #f5f1e8) */
:root[data-theme="navy"] {
  --lp-surface-rgb: 16, 42, 67;
  --lp-paper: #f2efe6;
  --lp-paper-2: #e6e0d1;
  --lp-ink: #1b2b3a;
  --lp-ink-soft: rgba(27, 43, 58, .72);
  --lp-surface: #102a43;
  --lp-on-surface: #f5f1e8;
  --lp-on-surface-soft: rgba(245, 241, 232, .76);
  --lp-accent: #cfa963;
  --lp-mark: #816226;
  --lp-cta-bg: #102a43;
  --lp-cta-fg: #f2efe6;
  --lp-line: rgba(16, 42, 67, .26);
  --lp-line-soft: rgba(16, 42, 67, .13);
  --lp-fill: rgba(16, 42, 67, .05);
}

/* 2 · Graphite & Champagne — neutral, architectural */
:root[data-theme="graphite"] {
  --lp-surface-rgb: 30, 30, 33;
  --lp-paper: #f2f1ec;
  --lp-paper-2: #e4e2da;
  --lp-ink: #17171a;
  --lp-ink-soft: rgba(23, 23, 26, .70);
  --lp-surface: #1e1e21;
  --lp-on-surface: #f5f4f0;
  --lp-on-surface-soft: rgba(245, 244, 240, .74);
  --lp-accent: #d8c9a3;
  --lp-mark: #6e6040;
  --lp-cta-bg: #1e1e21;
  --lp-cta-fg: #f2f1ec;
  --lp-line: rgba(23, 23, 26, .24);
  --lp-line-soft: rgba(23, 23, 26, .12);
  --lp-fill: rgba(23, 23, 26, .05);
}

/* 3 · Bottle Green & Antique Gold — the calmest of the five */
:root[data-theme="bottle"] {
  --lp-surface-rgb: 18, 51, 42;
  --lp-paper: #eef0e7;
  --lp-paper-2: #dfe3d5;
  --lp-ink: #16211c;
  --lp-ink-soft: rgba(22, 33, 28, .72);
  --lp-surface: #12332a;
  --lp-on-surface: #f3f2ea;
  --lp-on-surface-soft: rgba(243, 242, 234, .76);
  --lp-accent: #c9ab6a;
  --lp-mark: #75632f;
  --lp-cta-bg: #12332a;
  --lp-cta-fg: #eef0e7;
  --lp-line: rgba(18, 51, 42, .26);
  --lp-line-soft: rgba(18, 51, 42, .13);
  --lp-fill: rgba(18, 51, 42, .05);
}

/* 4 · Midnight Indigo & Ice — cool, institutional */
:root[data-theme="indigo"] {
  --lp-surface-rgb: 23, 26, 46;
  --lp-paper: #eceef5;
  --lp-paper-2: #dde1ec;
  --lp-ink: #14161f;
  --lp-ink-soft: rgba(20, 22, 31, .70);
  --lp-surface: #171a2e;
  --lp-on-surface: #f2f4f9;
  --lp-on-surface-soft: rgba(242, 244, 249, .76);
  --lp-accent: #9fb4d8;
  --lp-mark: #4a5f86;
  --lp-cta-bg: #171a2e;
  --lp-cta-fg: #eceef5;
  --lp-line: rgba(20, 22, 31, .22);
  --lp-line-soft: rgba(20, 22, 31, .11);
  --lp-fill: rgba(23, 26, 46, .05);
}

/* 5 · Espresso & Copper — the warmest of the five */
:root[data-theme="espresso"] {
  --lp-surface-rgb: 42, 29, 23;
  --lp-paper: #f3ece1;
  --lp-paper-2: #e7dbc9;
  --lp-ink: #1c1614;
  --lp-ink-soft: rgba(28, 22, 20, .72);
  --lp-surface: #2a1d17;
  --lp-on-surface: #f7f2ea;
  --lp-on-surface-soft: rgba(247, 242, 234, .76);
  --lp-accent: #d0906a;
  --lp-mark: #8a4f2f;
  --lp-cta-bg: #2a1d17;
  --lp-cta-fg: #f3ece1;
  --lp-line: rgba(42, 29, 23, .24);
  --lp-line-soft: rgba(42, 29, 23, .12);
  --lp-fill: rgba(42, 29, 23, .05);
}

/* ---------- shared LP scale ---------- */

.lp {
  --lp-gutter: clamp(20px, 4.4vw, 96px);
  --lp-nav-h: 60px;
  --lp-radius: 18px;
  --lp-row-gap: clamp(28px, 4.5vw, 80px);
  --lp-band: clamp(72px, 10vh, 148px);
  --lp-display: clamp(30px, 4.2vw, 68px);
  --lp-h2: clamp(23px, 2.7vw, 38px);
  --lp-h3: clamp(17px, 1.5vw, 24px);
  --lp-body: clamp(14px, 1.05vw, 18px);
  --lp-label: clamp(10px, .82vw, 13px);
  --lp-serif: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-family: var(--lp-serif);
  background: var(--lp-paper);
  color: var(--lp-ink);
}

.lp section { scroll-margin-top: calc(var(--lp-nav-h) + 28px); }

.lp h1, .lp h2, .lp h3 { font-family: var(--lp-serif); }

/* each phrase is an inline-block, so a line can only end where the writer
   put a phrase boundary — never in the middle of a clause */
.lp h1 span, .lp h2 span { display: inline-block; }

.lp h1, .lp h2, .lp h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  min-width: 0;
}

.lp p { margin: 0; }

.lp-label {
  display: block;
  margin: 0 0 clamp(14px, 1.6vw, 24px);
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--lp-mark);
}

.lp-label::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 10px;
  background: var(--lp-accent);
}

/* ---------- nav: wordmark pill (left) + menu pill (right) ----------
 * The wordmark is its own object so it reads as the mark, not as the first
 * item of the menu. Both keep a pill so they stay legible over the photo. */

.lp-brand,
.lp-nav {
  position: fixed;
  z-index: 60;
  top: clamp(10px, 1.4vw, 20px);
  display: flex;
  align-items: center;
  min-height: var(--lp-nav-h);
}

/* the wordmark carries no plate — it just re-colours itself against whatever
   band is behind it, driven by [data-ground="dark"] in the scroll handler */
.lp-brand {
  left: var(--lp-gutter);
  color: var(--lp-ink);
  text-decoration: none;
  transition: color 280ms var(--ease-out);
}

.lp-brand.on-dark { color: var(--lp-on-surface); }

.lp-nav {
  right: clamp(12px, 2.4vw, 32px);
  gap: clamp(10px, 1.6vw, 26px);
  padding: 8px 8px 8px clamp(18px, 1.8vw, 28px);
  border: 1px solid var(--lp-line-soft);
  border-radius: 999px;
  background: color-mix(in srgb, var(--lp-paper) 84%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, .08);
}

.lp-brand__text {
  font-size: clamp(13px, 1.05vw, 17px);
  letter-spacing: .06em;
  white-space: nowrap;
}

.lp-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 26px);
  font-size: var(--lp-label);
  letter-spacing: .12em;
}

.lp-nav__links a {
  color: var(--lp-ink-soft);
  text-decoration: none;
  white-space: nowrap;
}

.lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 clamp(18px, 1.8vw, 28px);
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--lp-cta-bg);
  color: var(--lp-cta-fg);
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}

.lp-cta--ghost {
  background: transparent;
  color: var(--lp-ink);
  border-color: var(--lp-line);
}

.lp-nav .lp-cta { margin-left: 0; }

/* ---------- diptych rows ---------- */

.lp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--lp-row-gap);
  align-items: center;
  padding: var(--lp-band) var(--lp-gutter);
  max-width: 1600px;
  margin-inline: auto;
}

.lp-row--flip .lp-row__text { order: 2; }
.lp-row--flip .lp-row__aside { order: 1; }

/* ---------- full-bleed hero ----------
 * The photograph is not chosen yet, so legibility cannot depend on it:
 * a graded scrim built from the theme's own ground sits between the image
 * and the copy. At its weakest point under the text the scrim is .88 alpha,
 * which still clears 8.8:1 for the copy even over a pure-white photograph. */

.lp-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(92svh, 840px);
  padding: calc(var(--lp-nav-h) + var(--lp-band)) var(--lp-gutter) clamp(48px, 7vh, 96px);
  overflow: hidden;
  background: var(--lp-surface);
  color: var(--lp-on-surface);
}

.lp-hero__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center end;
  padding: var(--lp-gutter);
  background: var(--lp-paper-2);
}

.lp-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-hero__ph {
  max-width: 30ch;
  padding: 18px 22px;
  border: 1px dashed rgba(var(--lp-surface-rgb), .45);
  border-radius: var(--lp-radius);
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  line-height: 2;
  letter-spacing: .1em;
  text-align: center;
  color: rgba(var(--lp-surface-rgb), .78);
}

.lp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--lp-surface-rgb), .46) 0%,
    rgba(var(--lp-surface-rgb), .30) 42%,
    rgba(var(--lp-surface-rgb), .08) 66%,
    rgba(var(--lp-surface-rgb), 0) 100%
  );
}

.lp-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  width: 100%;
  margin-inline: auto;
}

.lp-hero__inner > * + * { margin-top: clamp(18px, 2vw, 30px); }

.lp-hero .lp-label { color: var(--lp-on-surface); }
.lp-hero .lp-label::after { background: var(--lp-accent); }

/* `.lp .lp-hero` — one class deeper than `.lp h1`, which is declared later */
.lp .lp-hero h1 { font-size: clamp(26px, 3.9vw, 62px); }

/* the opening statement is always two lines, split at the comma */
.lp .lp-hero h1 span { display: block; }

.lp-hero .lp-lead { max-width: 44ch; color: var(--lp-on-surface-soft); }

/* on a dark scrim the deep-ground button disappears; invert it */
.lp-hero .lp-cta { background: var(--lp-paper); color: var(--lp-ink); }

.lp-hero .lp-cta--ghost {
  background: transparent;
  color: var(--lp-on-surface);
  border-color: rgba(var(--lp-surface-rgb), 0);
  box-shadow: inset 0 0 0 1px var(--lp-on-surface-soft);
}

@media (hover: hover) {
  .lp-hero .lp-cta:hover { background: var(--lp-accent); color: var(--lp-ink); }
  .lp-hero .lp-cta--ghost:hover { background: var(--lp-on-surface); color: var(--lp-ink); }
}

.lp-hero .lp-cta:active { background: var(--lp-accent); color: var(--lp-ink); }

.lp-row__text > * + * { margin-top: clamp(18px, 2vw, 30px); }

.lp h1 { font-size: var(--lp-display); line-height: 1.1; }
.lp h2 { font-size: var(--lp-h2); line-height: 1.16; }

.lp-lead {
  max-width: 46ch;
  font-size: var(--lp-body);
  line-height: 1.95;
  letter-spacing: .03em;
  color: var(--lp-ink-soft);
}

.lp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- numbered item list ---------- */

.lp-items {
  margin: clamp(24px, 3vw, 44px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: lp;
}

.lp-items li {
  counter-increment: lp;
  display: grid;
  grid-template-columns: minmax(0, 2.6em) minmax(0, 1fr);
  gap: 6px clamp(12px, 1.4vw, 22px);
  padding: clamp(18px, 2vw, 28px) 0;
  border-top: 1px solid var(--lp-line-soft);
}

.lp-items li::before {
  content: "0" counter(lp);
  grid-row: span 2;
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  letter-spacing: .12em;
  color: var(--lp-mark);
  padding-top: .45em;
}

.lp-items h3 { font-size: var(--lp-h3); line-height: 1.45; letter-spacing: -.02em; }

.lp-items p {
  font-size: var(--lp-body);
  line-height: 1.9;
  letter-spacing: .03em;
  color: var(--lp-ink-soft);
}

/* ---------- section photographs ---------- */

.lp-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--lp-radius);
}

.lp-tint { background: var(--lp-paper-2); }

/* ---------- flow band (deliberate break from the diptych) ---------- */

.lp-band {
  padding: var(--lp-band) var(--lp-gutter);
  background: var(--lp-surface);
  color: var(--lp-on-surface);
}

.lp-band .lp-label { color: var(--lp-accent); }

.lp-band__inner { max-width: 1440px; margin-inline: auto; }

.lp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 44px);
  margin: clamp(32px, 4vw, 60px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.lp-steps li {
  counter-increment: step;
  padding-top: clamp(16px, 1.8vw, 26px);
  border-top: 1px solid var(--lp-on-surface-soft);
}

.lp-steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 12px;
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  letter-spacing: .12em;
  color: var(--lp-accent);
}

.lp-steps h3 { font-size: var(--lp-h3); margin-bottom: 8px; }

.lp-steps p {
  font-size: var(--lp-body);
  line-height: 1.85;
  letter-spacing: .03em;
  color: var(--lp-on-surface-soft);
}

/* ---------- form ---------- */

.lp-form { display: grid; gap: clamp(16px, 1.8vw, 24px); }

.lp-field { display: grid; gap: 8px; }

.lp-field > span {
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  letter-spacing: .12em;
  color: var(--lp-ink-soft);
}

.lp-field input,
.lp-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 15px;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  background: var(--lp-paper);
  color: var(--lp-ink);
  font-family: inherit;
  font-size: max(16px, var(--lp-body));
  line-height: 1.7;
  transition: border-color 180ms var(--ease-out);
}

.lp-field textarea { min-height: 132px; resize: vertical; }

.lp-field input:focus-visible,
.lp-field textarea:focus-visible {
  outline: 2px solid var(--lp-mark);
  outline-offset: 2px;
  border-color: var(--lp-mark);
}

.lp-field input:user-invalid,
.lp-field textarea:user-invalid { border-color: var(--lp-mark); }

.lp-field :disabled { opacity: .5; cursor: not-allowed; }

.lp-form__note {
  font-size: clamp(12px, .95vw, 14px);
  line-height: 1.8;
  color: var(--lp-ink-soft);
}

.lp-form__note a { color: inherit; }

.lp-form button { justify-self: start; border: 0; }

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

.lp-footer {
  padding: clamp(48px, 6vw, 88px) var(--lp-gutter) clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--lp-line-soft);
}

.lp-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(18px, 2.4vw, 40px);
  max-width: 1440px;
  margin-inline: auto;
}

.lp-footer__brand { font-size: clamp(14px, 1.1vw, 18px); letter-spacing: .02em; }

.lp-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(14px, 1.8vw, 28px);
  margin-left: auto;
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  letter-spacing: .1em;
}

.lp-footer a { color: var(--lp-ink-soft); text-decoration: none; white-space: nowrap; }

.lp-footer__meta {
  max-width: 1440px;
  margin: clamp(28px, 3vw, 48px) auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--lp-line-soft);
  font-family: var(--lp-serif);
  font-size: var(--lp-label);
  line-height: 2.1;
  letter-spacing: .1em;
  color: var(--lp-ink-soft);
}

/* ---------- hover only where a pointer exists ---------- */

@media (hover: hover) {
  .lp-cta:hover { background: var(--lp-mark); color: var(--lp-paper); }
  .lp-cta--ghost:hover { background: var(--lp-cta-bg); color: var(--lp-cta-fg); border-color: var(--lp-cta-bg); }
  .lp-nav__links a:hover,
  .lp-footer a:hover { color: var(--lp-ink); }
}

.lp-cta:active { background: var(--lp-mark); color: var(--lp-paper); }

/* ---------- mobile ---------- */

@media (max-width: 860px) {
  /* 10px is below the practical floor for Japanese labels on a phone */
  .lp { --lp-label: 12px; }
  .lp-brand__text { font-size: 12px; letter-spacing: .02em; }
  .lp-nav { gap: 0; padding: 7px; }
  .lp-hero { min-height: min(88svh, 720px); }
  .lp-hero__media img { object-position: 78% 42%; }
  .lp-hero__media { place-items: start end; padding-top: calc(var(--lp-nav-h) + 26px); }
  .lp-hero::after {
    background: linear-gradient(
      to top,
      rgba(var(--lp-surface-rgb), .56) 0%,
      rgba(var(--lp-surface-rgb), .38) 50%,
      rgba(var(--lp-surface-rgb), .10) 74%,
      rgba(var(--lp-surface-rgb), 0) 100%
    );
  }

  .lp-row,
  .lp-row--flip .lp-row__text,
  .lp-row--flip .lp-row__aside { grid-template-columns: minmax(0, 1fr); order: 0; }
  .lp-row { grid-template-columns: minmax(0, 1fr); }
  .lp-row--flip .lp-row__aside { order: 2; }
  .lp-row--flip .lp-row__text { order: 1; }
  .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .lp-nav__links { display: none; }
  .lp-nav { gap: 10px; }
  .lp-footer nav { margin-left: 0; width: 100%; }
  .lp-footer nav a { min-height: 44px; display: flex; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-brand,
  .lp-cta,
  .lp-field input,
  .lp-field textarea { transition: none; }
}

/* ---------- document page (privacy policy) ---------- */

.lp-doc {
  max-width: 760px;
  margin-inline: auto;
  padding: calc(var(--lp-nav-h) + var(--lp-band)) var(--lp-gutter) var(--lp-band);
}

.lp-doc h1 { font-size: var(--lp-h2); margin-bottom: clamp(24px, 3vw, 40px); }

.lp-doc h2 {
  font-size: var(--lp-h3);
  margin: clamp(36px, 4vw, 56px) 0 clamp(12px, 1.4vw, 18px);
  padding-top: clamp(20px, 2.2vw, 30px);
  border-top: 1px solid var(--lp-line-soft);
}

.lp-doc p,
.lp-doc li {
  font-size: var(--lp-body);
  line-height: 2;
  letter-spacing: .03em;
  color: var(--lp-ink-soft);
}

.lp-doc p + p { margin-top: 1em; }
.lp-doc ol { margin: 0; padding-left: 1.4em; }
.lp-doc li + li { margin-top: .5em; }
.lp-doc dl { margin: 0; }
.lp-doc dt { font-weight: 500; color: var(--lp-ink); }
.lp-doc dd { margin: 0 0 .7em; font-size: var(--lp-body); line-height: 2; color: var(--lp-ink-soft); }
.lp-doc__meta { margin-top: clamp(40px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--lp-line-soft); }

/* content the client still has to supply — visible on purpose */
.lp-tbd {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--lp-fill);
  border: 1px dashed var(--lp-line);
  font-family: var(--lp-serif);
  font-size: .9em;
  color: var(--lp-ink);
}

/* ---------- very narrow phones (320px class) ----------
 * At this width the longest phrase no longer fits the heading measure and
 * the two pills collide, so both get their own step down. */
@media (max-width: 400px) {
  .lp { --lp-h2: 20px; --lp-gutter: 16px; }
  .lp .lp-hero h1 { font-size: 23px; }
  .lp-brand { left: 12px; }
  .lp-brand__text { font-size: 12px; letter-spacing: 0; }
  .lp-nav { right: 10px; padding: 6px; }
  .lp-nav .lp-cta { padding: 0 13px; font-size: 12px; }
  /* temporary scaffolding — there is no room for it beside the copy here,
     and it disappears as soon as the real photograph is dropped in */
  .lp-hero__ph { display: none; }
}
