/* DiffPixel landing page: layout specific to the home/index page. base.css supplies tokens, fonts, header, footer, buttons, and signature components. */

.home-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(520px, 7fr);
  align-items: center;
  gap: clamp(44px, 6vw, 108px);
  padding-block: calc(var(--header-h) + 48px) 48px;
}

/* Layered gradient atmosphere behind the hero: cyan register glow + faint pink drift. */
.home-hero::before {
  position: absolute;
  inset: -8% -18% auto -22%;
  z-index: -1;
  height: 76%;
  background:
    radial-gradient(42% 52% at 22% 34%, rgba(0, 215, 255, .09), transparent 72%),
    radial-gradient(30% 42% at 74% 10%, rgba(255, 69, 109, .05), transparent 70%);
  content: "";
  pointer-events: none;
}

.hero-copy .hud-meta { margin-top: 26px; }

h1 {
  max-width: 7ch;
  margin-bottom: 28px;
  font-size: var(--fs-hero);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

h1 span { color: var(--cyan); }
[data-lang-panel="ja"] h1 { max-width: 8.5ch; font-size: clamp(62px, 7vw, 112px); line-height: .92; }

.hero-lead {
  max-width: 44ch;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.55;
}

.diff-comparison { min-width: 0; margin: 0; }

.diff-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  isolation: isolate;
}

.diff-frame::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 1px solid rgba(0, 215, 255, .35);
  content: "";
  pointer-events: none;
}

.diff-base,
.diff-overlay,
.diff-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.diff-overlay {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.diff-label {
  position: absolute;
  top: 18px;
  z-index: 7;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 9, 16, .88);
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}

.diff-label-before { left: 18px; }
.diff-label-after { right: 18px; border-color: var(--cyan); color: var(--cyan); }

.diff-range {
  position: absolute;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.diff-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 6;
  width: 2px;
  background: var(--cyan);
  pointer-events: none;
  transform: translateX(-1px);
}

.diff-handle i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 2px solid var(--cyan);
  background: var(--bg);
  transform: translate(-50%, -50%);
}

.diff-handle i::before,
.diff-handle i::after {
  position: absolute;
  top: 50%;
  color: var(--cyan);
  font: 700 12px/1 var(--mono);
  transform: translateY(-50%);
}

.diff-handle i::before { left: 7px; content: "‹"; }
.diff-handle i::after { right: 7px; content: "›"; }
.diff-range:focus-visible + .diff-handle i { outline: 3px solid var(--text); outline-offset: 4px; }

.diff-comparison figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workflow { padding-block: clamp(110px, 12vw, 200px) 40px; }

.section-heading h2,
.capabilities h2,
.privacy-stage h2,
.closing h2 {
  margin-bottom: 0;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

.section-heading { padding-bottom: 80px; }
.section-heading h2 { max-width: 10ch; }

.workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(48px, 8vw, 132px);
}

.workflow-steps,
.workflow-step,
.step-copy { min-width: 0; }

.step-copy { width: 100%; flex: 1; }

.workflow-hud {
  display: none;
  gap: 18px;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

/* Inactive states use --quiet at full opacity: 4.8:1 on --bg (AA). */
.workflow-hud span { color: var(--quiet); transition: color .2s ease; }
.workflow-hud span.active { color: var(--cyan); }

.workflow-stage {
  position: sticky;
  top: calc(var(--header-h) + 30px);
  height: calc(100svh - var(--header-h) - 60px);
  align-self: start;
  display: flex;
  align-items: center;
}

.workflow-frame {
  position: absolute;
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: opacity .35s ease, clip-path .55s cubic-bezier(.2, .8, .2, 1);
}

.workflow-frame.active { z-index: 2; opacity: 1; clip-path: inset(0); }
.workflow-frame img { width: 100%; height: 100%; object-fit: cover; }

.workflow-progress {
  position: absolute;
  right: -26px;
  display: grid;
  gap: 10px;
}

.workflow-progress span { width: 5px; height: 44px; background: var(--line); transition: background-color .2s ease; }
.workflow-progress span.active { background: var(--cyan); }

.workflow-step {
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding-block: 80px;
}

.step-number {
  display: block;
  margin-bottom: 24px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.workflow-step h3 {
  max-width: 9ch;
  margin-bottom: 28px;
  font-size: var(--fs-h3);
  line-height: .95;
  letter-spacing: -.045em;
}

.workflow-step p,
.capabilities-copy > p:last-child,
.privacy-copy > p {
  max-width: 46ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 20px);
}

.workflow-mobile-image { display: none; }

.capabilities { padding-block: clamp(84px, 7vw, 110px); }

.capabilities-inner {
  min-height: calc(100svh - clamp(168px, 14vw, 220px));
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(520px, 7fr);
  align-items: center;
  column-gap: clamp(50px, 8vw, 132px);
  row-gap: 40px;
}

.capabilities h2 { max-width: 9ch; margin-bottom: 30px; }
.capabilities-visual { margin: 0; border: 1px solid var(--line-strong); background: var(--surface); }
.capabilities-visual img { width: 100%; height: auto; }

.capability-index {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--line);
  list-style: none;
}

.capability-index li {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-right: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  transition: background-color .25s var(--ease-out);
}

.capability-index li:hover { background: var(--surface); }
.capability-index li:nth-child(4n) { border-right: 0; }
.capability-index span { color: var(--quiet); font-size: 9px; transition: color .25s var(--ease-out); }
.capability-index li:hover span { color: var(--cyan); }

.privacy-stage { padding-block: clamp(100px, 12vw, 190px); }

.privacy-stage-inner {
  min-height: calc(100svh - clamp(200px, 24vw, 380px));
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(480px, 7fr);
  align-items: center;
  gap: clamp(52px, 9vw, 150px);
}

.privacy-copy,
.privacy-mark,
.privacy-facts,
.capabilities-copy,
.capabilities-visual { min-width: 0; }

.privacy-stage h2 { max-width: 9ch; margin-bottom: 32px; }
.privacy-copy > p { margin-bottom: 28px; }

.privacy-mark {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 64px);
  border: 1px solid var(--cyan);
  background: var(--surface);
  font-family: var(--display);
  font-size: clamp(64px, 9vw, 146px);
  font-weight: 800;
  line-height: .76;
  letter-spacing: -.07em;
  text-transform: uppercase;
}

.privacy-mark strong { align-self: flex-end; color: var(--cyan); }

.privacy-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-block: 1px solid var(--line);
}

.privacy-facts div {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.privacy-facts div:last-child { border-right: 0; }
.privacy-facts dt { color: var(--quiet); font-size: 9px; letter-spacing: .08em; }
.privacy-facts dd { margin: 0; color: var(--text); font-size: clamp(19px, 2vw, 30px); font-weight: 700; }

.closing { padding-block: 100px; }

.closing-inner {
  min-height: calc(84svh - 200px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.closing h2 { width: 100%; max-width: min(10ch, 100%); margin-bottom: 42px; font-size: clamp(68px, 11vw, 174px); }

.site-footer {
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  padding-block: 80px 0px;
}

@media (prefers-reduced-motion: reduce) {
  .workflow-layout { grid-template-columns: 1fr; }
  .workflow-stage { display: none; }
  .workflow-hud { display: flex; }
  .workflow-step {
    min-height: auto;
    display: grid;
    gap: 38px;
    padding-block: 84px;
    border-top: 1px solid var(--line);
  }
  .workflow-mobile-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line-strong);
  }
}

@media (prefers-reduced-motion: reduce) and (min-width: 1101px) {
  .workflow-hud { display: none; }
  .workflow-step {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(48px, 6vw, 100px);
  }
}

@media (max-width: 1100px) {
  :root { --shell: min(100% - 40px, 880px); }
  .home-hero,
  .capabilities-inner,
  .privacy-stage-inner { grid-template-columns: 1fr; gap: 60px; min-height: auto; }
  .home-hero { padding-top: calc(var(--header-h) + 74px); padding-bottom: 90px; }
  h1, [data-lang-panel="ja"] h1 { max-width: 9ch; }
  .workflow-layout { grid-template-columns: 1fr; }
  .workflow-stage { display: none; }
  .workflow-hud { display: flex; }
  .workflow-step { min-height: auto; display: grid; gap: 38px; padding-block: 84px; border-top: 1px solid var(--line); }
  .workflow-mobile-image { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); }
  .workflow-step h3 { max-width: 12ch; }
  .capabilities-copy, .privacy-copy { max-width: 680px; }
  .capability-index { grid-template-columns: repeat(2, 1fr); }
  .capability-index li:nth-child(2n) { border-right: 0; }
  .capability-index li:nth-child(4n + 1), .capability-index li:nth-child(4n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 700px) {
  .header-inner { gap: 12px; }
  .brand span, .site-nav { display: none; }
  .header-actions { margin-left: auto; gap: 8px; }
  /* Keep the install CTA reachable from any scroll position on mobile. */
  .header-cta { min-height: 44px; padding-inline: 12px; font-size: 10px; letter-spacing: .02em; }
  h1 { font-size: clamp(58px, 18vw, 86px); line-height: .88; }
  [data-lang-panel="ja"] h1 { font-size: clamp(52px, 15vw, 72px); line-height: .94; }
  .home-hero { gap: 50px; padding-top: calc(var(--header-h) + 70px); }
  .hero-lead { font-size: 17px; }
  .diff-label { top: 10px; padding: 5px 7px; font-size: 8px; }
  .diff-label-before { left: 10px; }
  .diff-label-after { right: 10px; }
  .diff-handle i { width: 36px; height: 36px; }
  .section-heading { padding-bottom: 40px; }
  .section-heading h2, .capabilities h2, .privacy-stage h2 { font-size: clamp(50px, 15vw, 72px); }
  html[lang="ja"] .section-heading h2,
  html[lang="ja"] .capabilities h2,
  html[lang="ja"] .privacy-stage h2 {
    font-size: clamp(44px, 12vw, 56px);
    line-height: .94;
    letter-spacing: -.035em;
    line-break: strict;
    text-wrap: balance;
  }
  .workflow { padding-top: 100px; }
  .workflow-step { padding-block: 74px; }
  .workflow-step h3 { font-size: clamp(44px, 13vw, 64px); }
  html[lang="en"] .workflow-step h3 { font-size: clamp(42px, 12vw, 58px); }
  .capabilities, .privacy-stage { padding-block: 100px; }
  .capability-index li { min-height: 86px; padding: 14px; font-size: 10px; }
  .privacy-mark {
    min-height: 350px;
    padding: 24px;
    font-size: clamp(54px, 15.5vw, 68px);
  }
  .privacy-facts { grid-template-columns: 1fr; }
  .privacy-facts div { min-height: 96px; border-right: 0; border-bottom: 1px solid var(--line); }
  .privacy-facts div:last-child { border-bottom: 0; }
  .closing-inner { min-height: 58svh; }
  .closing h2 { font-size: clamp(64px, 20vw, 96px); }
  html[lang="en"] .closing h2 { max-width: 100%; font-size: clamp(44px, 11.5vw, 54px); line-height: .92; }
  html[lang="ja"] .closing h2 { font-size: clamp(58px, 17vw, 78px); }
  .site-footer { min-height: 38svh; padding-top: 54px; }
  .footer-meta { flex-direction: column; margin-bottom: 44px; }
}

@media (max-width: 360px) {
  .privacy-mark { font-size: 48px; }
  html[lang="en"] .closing h2 { font-size: 37px; }
}
