/* English homepage only: developer-led "datasheet" layer on top of english.css.
   Dark zones = how we build (proof, process). Light zone = what we built.
   Everything is scoped under .en-home and every new class carries the gm- prefix. */

.en-home {
  --gm-line: #2c2c33;
  --gm-panel: #0f0f13;
  --gm-card: #111115;
  --gm-dim: #8d92a0;
  --gm-red-ink: var(--red-bright);   /* red text on dark needs the brighter red to clear 4.5:1 */
  --gm-orange-ink: #b84a12;          /* orange text on paper white: #e8601e is only 3.4:1 */
  --gm-brk: 14px;                    /* corner bracket arm length */
}

/* Background circuit board reads a little stronger on the homepage. */
.en-home canvas#bg { opacity: .7; }

/* ---------- shared pieces ---------- */

/* Four red corner brackets: a pseudo layer sitting on top of the 1px border. */
.en-home :is(.gm-readout, .gm-notes) {
  position: relative;
  border: 1px solid var(--gm-line);
  background:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 1.6%) 0 1px, transparent 1px 4px),
    var(--gm-panel);
}
.en-home :is(.gm-readout, .gm-notes)::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--red), var(--red)) left top / var(--gm-brk) 2px no-repeat,
    linear-gradient(var(--red), var(--red)) left top / 2px var(--gm-brk) no-repeat,
    linear-gradient(var(--red), var(--red)) right top / var(--gm-brk) 2px no-repeat,
    linear-gradient(var(--red), var(--red)) right top / 2px var(--gm-brk) no-repeat,
    linear-gradient(var(--red), var(--red)) left bottom / var(--gm-brk) 2px no-repeat,
    linear-gradient(var(--red), var(--red)) left bottom / 2px var(--gm-brk) no-repeat,
    linear-gradient(var(--red), var(--red)) right bottom / var(--gm-brk) 2px no-repeat,
    linear-gradient(var(--red), var(--red)) right bottom / 2px var(--gm-brk) no-repeat;
}

.en-home .gm-overline {
  margin: 0 0 16px;
  font: .8rem/1.5 'Share Tech Mono', monospace;
  letter-spacing: .02em;
  color: var(--gm-red-ink);
}
.en-home .en-paper .gm-overline { color: var(--red); }

.en-home .gm-label {
  display: block;
  margin-bottom: 14px;
  font: .68rem/1.4 'Share Tech Mono', monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver);
}
.en-home .gm-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  background: var(--red);
  vertical-align: .05em;
}

/* ---------- 1. hero ---------- */

.en-home .en-intro.gm-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: 56px;
  padding: 64px 0 60px;
}
.en-home .gm-hero .en-overline { margin-bottom: 24px; letter-spacing: .02em; }

.en-home .gm-hero .gm-hero-title {
  max-width: none;
  margin: 0;
  font-weight: 700;
  font-size: clamp(3.2rem, 5.6vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.03em;
  color: var(--white);
  overflow-wrap: break-word;
}
.en-home .gm-hero-title em { display: block; font-style: normal; color: var(--orange); }
.en-home .gm-hero-title em::after {
  content: "";
  display: inline-block;
  width: .08em;
  height: .74em;
  margin-left: .16em;
  background: var(--red);
  vertical-align: baseline;
  animation: gm-blink 1.1s steps(1, end) infinite;
}
@keyframes gm-blink { 0%, 49.99% { opacity: 1; } 50%, 100% { opacity: 0; } }

.en-home .gm-hero-lead {
  max-width: 58ch;
  margin: 30px 0 0;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--en-muted);
}
.en-home .gm-hero .en-actions { margin-top: 32px; }

/* readout panel */
.en-home .gm-hero-side { min-width: 0; }
.en-home .gm-readout { display: block; margin: 0; }

.en-home .gm-readout-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gm-line);
  font: .72rem/1.4 'Share Tech Mono', monospace;
  letter-spacing: .04em;
  color: var(--silver);
}
.en-home .gm-readout-head span:last-child { color: var(--gm-dim); }

.en-home .gm-metric {
  display: block;
  padding: 20px 20px 16px;
  color: var(--white);
  text-decoration: none;
  box-shadow: inset 2px 0 0 transparent;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.en-home .gm-metric + .gm-metric { border-top: 1px solid var(--gm-line); }
.en-home .gm-metric:focus-visible { outline-offset: -4px; }

.en-home .gm-bars { display: grid; gap: 10px; }
.en-home .gm-bar-row {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr) 4.6rem;
  align-items: center;
  gap: 12px;
  font: .84rem/1.2 'Share Tech Mono', monospace;
}
.en-home .gm-bar-name { color: var(--silver); }
.en-home .gm-bar-val { text-align: right; color: var(--white); font-variant-numeric: tabular-nums; }
.en-home .gm-bar-track {
  display: block;
  height: 10px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgb(255 255 255 / 7%) calc(10% - 1px) 10%),
    rgb(255 255 255 / 3%);
}
.en-home .gm-bar {
  display: block;
  width: var(--w, 100%);
  height: 100%;
  transform-origin: left center;
  animation: gm-grow .9s cubic-bezier(.2, .7, .2, 1) both;
}
.en-home .gm-bar--hot { background: var(--orange); box-shadow: 0 0 10px rgb(232 96 30 / 35%); }
.en-home .gm-bar--cold { background: #3a3a42; animation-delay: .15s; }
@keyframes gm-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.en-home .gm-figure { display: flex; align-items: baseline; gap: 16px; }
.en-home .gm-num {
  flex: none;
  font: 700 3rem/1 'Chakra Petch', sans-serif;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}
.en-home .gm-num small {
  margin-left: 4px;
  font: .9rem/1 'Share Tech Mono', monospace;
  letter-spacing: 0;
  color: var(--silver);
}
.en-home .gm-text { font-size: .95rem; line-height: 1.45; color: var(--en-muted); }

.en-home .gm-metric-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 14px;
  font: .7rem/1.4 'Share Tech Mono', monospace;
  letter-spacing: .04em;
}
.en-home .gm-note { color: var(--gm-dim); }
.en-home .gm-note { min-width: 0; }
.en-home .gm-read { flex: none; white-space: nowrap; color: var(--silver); transition: color .15s ease; }

.en-home .gm-caption {
  margin: 14px 0 0;
  font: .72rem/1.5 'Share Tech Mono', monospace;
  letter-spacing: .03em;
  color: var(--gm-dim);
}

/* ---------- 2. lead product cards ---------- */

.en-home .gm-spec-card {
  position: relative;
  overflow: visible;
  border-color: var(--gm-line);
  border-radius: 0;
  background: var(--gm-card);
}
.en-home .gm-spec-card::before,
.en-home .gm-spec-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: var(--gm-brk);
  height: var(--gm-brk);
  border: 0 solid var(--red);
  pointer-events: none;
}
.en-home .gm-spec-card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.en-home .gm-spec-card::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }

.en-home .gm-spec-card .en-lead-image img { border-radius: 4px 4px 0 0; }

.en-home .gm-idx {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
  padding-right: 12px;
  border-right: 1px solid var(--gm-line);
  font: .85rem/1 'Share Tech Mono', monospace;
  color: var(--orange);
}
.en-home .gm-spec-card .en-status { letter-spacing: .02em; }

.en-home .gm-spec {
  margin: 22px 0 0;
  font: .78rem/1.5 'Share Tech Mono', monospace;
}
.en-home .gm-spec > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 9px 0;
  border-top: 1px dashed var(--gm-line);
}
.en-home .gm-spec > div:last-child { border-bottom: 1px dashed var(--gm-line); }
.en-home .gm-spec dt { margin: 0; letter-spacing: .08em; text-transform: uppercase; color: var(--silver); }
.en-home .gm-spec dd { margin: 0; color: var(--white); }

/* ---------- 3. light zone: the bench ---------- */

.en-home .en-paper { counter-reset: gm-fig; }

.en-home .en-section-heading .gm-heading-copy { min-width: 0; }
.en-home .en-section-heading .gm-heading-copy h2 { max-width: none; }

.en-home .en-task-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border-radius: 0;
  font: .86rem/1.4 'Share Tech Mono', monospace;
  letter-spacing: .01em;
}
.en-home .en-task-links a::before { content: ">"; color: var(--red); }

.en-home .en-feature .en-meta,
.en-home .en-more-tools .en-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: .8rem;
  letter-spacing: .01em;
  color: var(--sy-ink-2);
}

.en-home .en-proof-image { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; margin: 0; }
.en-home .en-proof-image > :is(img, button) { grid-area: 1 / 1; min-width: 0; }  /* site.js wraps the img in a zoom button */
.en-home .en-proof-image img { border-radius: 4px; }
.en-home .en-proof-image::before,
.en-home .en-proof-image::after {
  content: "";
  grid-area: 1 / 1;
  z-index: 1;
  width: var(--gm-brk);
  height: var(--gm-brk);
  border: 0 solid var(--red);
  pointer-events: none;
}
.en-home .en-proof-image::before { align-self: start; justify-self: start; margin: -2px 0 0 -2px; border-width: 2px 0 0 2px; }
.en-home .en-proof-image::after { align-self: end; justify-self: end; margin: 0 -2px -2px 0; border-width: 0 2px 2px 0; }
.en-home .en-proof-image figcaption {
  grid-area: 2 / 1;
  counter-increment: gm-fig;
  font: .78rem/1.6 'Share Tech Mono', monospace;
  color: var(--sy-ink-2);
}
.en-home .en-proof-image figcaption::before {
  content: "fig. " counter(gm-fig, decimal-leading-zero) " ";
  color: var(--gm-orange-ink);
}

.en-home .en-more-tools { counter-reset: gm-tool 2; }
.en-home .en-more-tools article { counter-increment: gm-tool; }
.en-home .en-more-tools .en-product-name::before {
  content: counter(gm-tool, decimal-leading-zero);
  margin-right: 2px;
  padding-right: 12px;
  border-right: 1px solid #d5d7da;
  font: .85rem/1.6 'Share Tech Mono', monospace;
  color: var(--gm-orange-ink);
}

/* ---------- 4. the workshop ---------- */

.en-home .gm-workshop {
  position: relative;
  z-index: 5;
  margin-top: 0;
  padding: 120px 0 0;
}
.en-home .gm-workshop h2 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  color: var(--white);
}
.en-home .gm-workshop-lead {
  max-width: 62ch;
  margin: 22px 0 0;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--en-muted);
}
/* pipeline: five stages on one red trace (circuit-seam style) */
.en-home .gm-pipeline {
  --gm-pad: 12px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 28px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.en-home .gm-pipeline::before,
.en-home .gm-pipeline::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
}
.en-home .gm-pipeline::before { background: var(--red); }
.en-home .gm-pipeline::after {
  top: 4px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--orange) 55%, #ffb46a) no-repeat;
  background-size: 90px 100%;
  animation: gm-pulse-x 7s linear infinite;
}
@keyframes gm-pulse-x { from { background-position: -90px 0; } 60%, to { background-position: calc(100% + 90px) 0; } }
@keyframes gm-pulse-y { from { background-position: 0 -90px; } 60%, to { background-position: 0 calc(100% + 90px); } }

.en-home .gm-pipeline li { position: relative; padding-top: 38px; }
.en-home .gm-pipeline li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: var(--gm-pad);
  height: var(--gm-pad);
  background: var(--red);
  box-shadow: 0 0 0 4px var(--bg);   /* breaks the trace around the pad */
}
.en-home .gm-pipeline li:nth-child(even)::before { border-radius: 50%; }
.en-home .gm-pipeline li:last-child::before {
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--red), 0 0 0 6px var(--bg);
}
.en-home .gm-stage {
  display: block;
  margin-bottom: 10px;
  font: .72rem/1.4 'Share Tech Mono', monospace;
  letter-spacing: .12em;
  color: var(--orange);
}
.en-home .gm-pipeline h3 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.25; font-weight: 600; color: var(--white); }
.en-home .gm-pipeline p { margin: 0; font-size: .95rem; line-height: 1.65; color: var(--en-muted); }
.en-home .gm-pipeline a { color: var(--silver); text-underline-offset: 3px; }
@media (hover: hover) { .en-home .gm-pipeline a:hover { color: var(--orange); } }

.en-home .gm-principles-line {
  margin: 44px 0 0;
  font: .8rem/1.6 'Share Tech Mono', monospace;
  letter-spacing: .02em;
  color: var(--gm-dim);
}

.en-home .gm-notes { display: block; margin: 0; padding: 0; }
.en-home .gm-notes h3 {
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gm-line);
  font: .72rem/1.4 'Share Tech Mono', monospace;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--silver);
}
.en-home .gm-notes { margin-top: 36px; }
.en-home .gm-notes ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--gm-line);   /* 1px gaps draw the inner rules at any column count */
}
.en-home .gm-notes li { background: var(--gm-panel); }
.en-home .gm-notes li a {
  display: grid;
  align-content: start;
  height: 100%;
  gap: 6px;
  padding: 16px 20px;
  color: var(--white);
  text-decoration: none;
  box-shadow: inset 2px 0 0 transparent;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.en-home .gm-notes li a:focus-visible,
.en-home .gm-notes > .en-link:focus-visible { outline-offset: -4px; }
.en-home .gm-notes time { font: .72rem/1.4 'Share Tech Mono', monospace; letter-spacing: .04em; color: var(--silver); }
.en-home .gm-notes li span {
  font: 600 1rem/1.4 'Chakra Petch', sans-serif;
  letter-spacing: -.01em;
  transition: color .15s ease;
}
.en-home .gm-notes > .en-link {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--gm-line);
  font: .78rem/1.4 'Share Tech Mono', monospace;
  color: var(--silver);
  text-decoration: none;
}

/* ---------- hover (pointer devices only) ---------- */

@media (hover: hover) {
  .en-home .gm-metric:hover,
  .en-home .gm-notes li a:hover { background-color: rgb(255 255 255 / 3%); box-shadow: inset 2px 0 0 var(--red); }
  .en-home .gm-metric:hover .gm-read { color: var(--orange); }
  .en-home .gm-notes li a:hover span { color: var(--orange); }
  .en-home .en-paper .en-task-links a:hover { border-color: var(--red); }
}
.en-home .gm-metric:focus-visible,
.en-home .gm-notes li a:focus-visible { background-color: rgb(255 255 255 / 3%); box-shadow: inset 2px 0 0 var(--red); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .en-home .en-intro.gm-hero { grid-template-columns: minmax(0, 1fr); gap: 44px; padding: 44px 0 48px; }
  .en-home .gm-hero-side { max-width: 560px; }
  .en-home .gm-workshop { padding-top: 96px; }
}

/* pipeline turns vertical, notes drop to two columns */
@media (max-width: 999px) {
  .en-home .gm-pipeline { display: block; margin-top: 44px; }
  .en-home .gm-pipeline::before { display: none; }
  .en-home .gm-pipeline::after {
    top: 6px;
    bottom: 40px;
    left: 5px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, transparent, var(--orange) 55%, #ffb46a) no-repeat;
    background-size: 100% 90px;
    animation-name: gm-pulse-y;
  }
  .en-home .gm-pipeline li { padding: 0 0 36px 40px; }
  .en-home .gm-pipeline li:last-child { padding-bottom: 0; }
  .en-home .gm-pipeline li::before { top: 1px; }
  .en-home .gm-pipeline li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 7px;
    bottom: -6px;
    left: 5px;
    width: 2px;
    background: var(--red);
  }
  .en-home .gm-notes ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .en-home .gm-spec > div { grid-template-columns: 13ch minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 760px) {
  .en-home .en-intro.gm-hero { gap: 36px; padding: 28px 0 36px; }
  .en-home .gm-hero-lead { font-size: 1.05rem; margin-top: 24px; }
  .en-home .gm-hero .en-actions { margin-top: 26px; }
  .en-home .gm-workshop { padding-top: 72px; }
  .en-home .gm-workshop-lead { font-size: 1.02rem; }
  .en-home .gm-principles-line { margin-top: 36px; }
}

@media (max-width: 520px) {
  .en-home .gm-hero .gm-hero-title { font-size: clamp(2.5rem, 11.5vw, 3.2rem); }
  .en-home .gm-hero-side { max-width: none; }
  .en-home .gm-spec-card .en-lead-top { flex-wrap: wrap; gap: 8px 20px; }
  .en-home .gm-spec-card .en-status { flex: 1 0 100%; text-align: left; }
  .en-home .gm-readout-head { padding: 11px 16px; }
  .en-home .gm-metric { padding: 18px 16px 14px; }
  .en-home .gm-bar-row { grid-template-columns: 3.9rem minmax(0, 1fr) 4.2rem; gap: 10px; font-size: .78rem; }
  .en-home .gm-num { font-size: 2.6rem; }
  .en-home .gm-figure { gap: 14px; }
  .en-home .gm-spec > div { grid-template-columns: 13ch minmax(0, 1fr); gap: 12px; }
  .en-home .gm-notes ol { grid-template-columns: minmax(0, 1fr); }
  .en-home .gm-notes h3, .en-home .gm-notes li a, .en-home .gm-notes > .en-link { padding-inline: 16px; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .en-home .gm-hero-title em::after { animation: none; opacity: 1; }
  .en-home .gm-bar { animation: none; transform: none; }
  .en-home .gm-pipeline::after { display: none; }   /* ambient pulse removed, not paused */
  .en-home .gm-metric,
  .en-home .gm-notes li a,
  .en-home .gm-notes li span,
  .en-home .gm-read { transition: none; }
}
