/* Landing page only (#148). Loaded after styles.css, which still supplies the
   consent banner, the skip link and the base resets. Everything here is scoped
   to body.home so the detail, legal, story and construction pages keep their look. */

.home {
  /* Re-point the shared tokens so the consent banner and focus ring follow the page. */
  --paper: #ffffff;
  --ink: #101010;
  --body: #373737;
  --muted: #6e6e6e; /* 5.1:1 on white */
  --accent: #2f5bea;
  --sans: 'Albert Sans', system-ui, sans-serif;
  --display: var(--sans);
  --mono: var(--sans);

  --hm-tint: #eff1f7;
  --hm-line: #e2e2e2;
  --hm-gutter: clamp(20px, 2.3vw, 32px);
  --hm-ease: cubic-bezier(0.19, 1, 0.22, 1);

  font-size: 17px;
  line-height: 1.45;
}
.home ::selection { background: rgba(47, 91, 234, .18); }
.home a { color: var(--ink); text-decoration: none; }

.hm-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--hm-gutter);
}
/* The tilted screenshots bleed past the right edge on purpose. The clip sits on a
   full-width wrapper, so on very wide screens they end in the margin instead of
   being cut at the page column. */
.hm-clip { overflow-x: clip; }

/* top bar */
.hm-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  min-height: 96px;
  padding: 12px 0;
  box-sizing: border-box;
}
.hm-mark { font-size: 17px; padding: 10px 0; }
.hm-mark b { font-weight: 500; }
.hm-mark span { margin: 0 10px; color: var(--muted); }
.hm-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(12px, 3.4vw, 32px);
  /* Shrinks just enough for the four links to share one row at 390 px. */
  font-size: clamp(15px, 3.86vw, 17px);
}
.hm-nav a { padding: 12px 0; transition: color .2s ease; }
.hm-nav a:hover { color: var(--accent); }

/* pills */
.home .hm-pill {
  display: inline-block;
  border: 1.5px solid var(--ink);
  border-radius: 1000px;
  padding: 11.5px 24px;
  line-height: 1.3;
  transition: background-color .2s ease, color .2s ease, transform .3s var(--hm-ease);
}
.home .hm-pill:hover { background: var(--ink); color: var(--paper); }
.home .hm-pill--solid { background: var(--ink); color: var(--paper); }
.home .hm-pill--solid:hover { background: var(--accent); border-color: var(--accent); }
.home .hm-pill:active { transform: translateY(1px); }
.home .hm-nav .hm-pill { padding: 11px clamp(14px, 4vw, 22px); }

/* hero */
.hm-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 24px;
  padding: clamp(32px, 4.5vw, 64px) 0 clamp(48px, 5vw, 72px);
}
.hm-hero-copy { flex: 1.5 1 560px; min-width: 0; }
.home .hm-title {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 13.5em;
}
.hm-lede { margin: 20px 0 0; font-size: clamp(17px, 1.35vw, 19px); color: var(--body); max-width: 36em; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 28px; }

/* Two real screenshots, tilted and stacked. Positions are percentages so the
   block keeps its composition from 1440 px down to a phone. */
.hm-shots {
  flex: 1 1 360px;
  min-width: 0;
  position: relative;
  aspect-ratio: 13 / 10;
  /* Capped by width, not height: the images scale with the block, so a height cap
     let them spill onto the next section once the hero wraps. */
  max-width: 600px;
  margin-left: auto;
  margin-right: calc(-1 * var(--hm-gutter));
}
.hm-shots img {
  position: absolute;
  height: auto;
  border-radius: 12px;
  transform: rotate(-6deg);
  max-width: none;
}
.hm-shot-back { left: 18%; top: 0; width: 92%; box-shadow: 0 30px 60px -30px rgba(16, 16, 16, .35); }
.hm-shot-front { left: 0; top: 34%; width: 78%; box-shadow: 0 30px 60px -30px rgba(16, 16, 16, .45); }

/* The one authored motion: the two screenshots rise into their tilt, once. */
@media (prefers-reduced-motion: no-preference) {
  .hm-shots img { animation: hm-rise .9s var(--hm-ease) backwards; }
  .hm-shots .hm-shot-front { animation-delay: .14s; }
}
@keyframes hm-rise {
  from { transform: translateY(18%) rotate(-1.5deg); opacity: 0; }
  40% { opacity: 1; }
}

/* divider with a centred caption */
.hm-rule { display: flex; align-items: center; gap: 20px; margin: 0; color: var(--muted); font-size: 15px; }
.hm-rule::before, .hm-rule::after { content: ''; flex: 1 1 0; height: 1px; background: var(--hm-line); }

/* what a build takes */
.hm-facts { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
/* A plain text row since the critique of 2026-11-26: no glyph tiles. */
.hm-fact {
  flex: 1 1 260px;
  border-top: 1px solid var(--hm-line);
  padding: 16px 24px 0 0;
}
.hm-fact small { display: block; margin-bottom: 4px; font-size: 15px; color: var(--muted); }
.hm-fact strong { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }

/* sections */
.hm-section { padding-top: clamp(72px, 8.4vw, 120px); scroll-margin-top: 8px; }
.home .hm-h2 {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hm-panel {
  margin-top: clamp(28px, 2.8vw, 40px);
  background: var(--hm-tint);
  border-radius: 24px;
  padding: clamp(24px, 3.4vw, 48px);
}
.hm-panel-lede { margin: 0; font-size: clamp(19px, 1.55vw, 22px); line-height: 1.35; max-width: 30em; color: var(--body); }

.hm-panel-more { margin: clamp(20px, 2vw, 28px) 0 0; }
.hm-product, .hm-panel { scroll-margin-top: 16px; }

/* how it ships: five steps, the owner's two gates marked */
/* A grid, so a wrapped last step keeps the width of the others. */
/* The five steps as one track: a line joins them, the owner's two gates sit on it as
   solid ink dots, the automated steps as hollow ones. */
.hm-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 32px 0;
  margin: clamp(32px, 3.4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}
.hm-step { position: relative; min-width: 0; padding: 32px 24px 0 0; }
.hm-step::before { content: ''; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: #c3c8d6; }
.hm-step:last-child::before { right: auto; width: 16px; }
.hm-step::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid #9aa0ad;
  background: var(--hm-tint);
}
.hm-step--gate::after { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 5px var(--hm-tint), 0 0 0 6px var(--ink); }
.hm-step-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; color: var(--muted); font-size: 15px; }
.hm-step-top span:last-child { font-size: 14px; }
.hm-step-top .hm-go { background: var(--ink); color: var(--paper); border-radius: 1000px; padding: 5px 13px; }
.home .hm-step h3 { margin-top: 18px; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.hm-step p { margin: 8px 0 0; font-size: 16px; color: var(--body); max-width: 16em; }
.hm-step--gate p { color: var(--ink); }

/* Section and product titles link to their case or write-up (#158). The underline
   draws in on hover so the titles read as headings at rest. */
.home .hm-title-link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .14em;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.home .hm-title-link:hover { color: var(--accent); text-decoration-color: currentColor; }

/* products: one tinted panel each, copy left, tilted screenshot right */
.hm-product {
  display: flex;
  flex-wrap: wrap;
  margin-top: clamp(24px, 3.3vw, 48px);
  border-radius: 24px;
  overflow: hidden;
  background: var(--hm-tint);
}
.hm-h2 + .hm-product { margin-top: clamp(28px, 2.8vw, 40px); }
.hm-product--wattlas { background: #e5efff; }
.hm-product--fieldwork { background: #dfe9e4; }
.hm-product-copy {
  flex: 1 1 420px;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(28px, 3.4vw, 48px) clamp(24px, 3.4vw, 48px);
}
.hm-product-name { margin: 0; font-weight: 500; }
.home .hm-product h3 {
  margin-top: 16px;
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.015em;
  max-width: 16em;
}
.hm-product-lede { margin: 16px 0 0; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.35; color: var(--body); max-width: 28em; }
.hm-product-feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px clamp(20px, 2.2vw, 32px);
  margin: clamp(24px, 3vw, 40px) 0 0;
  padding: clamp(20px, 1.9vw, 28px) 0 0;
  border-top: 1px solid rgba(16, 16, 16, .14);
  list-style: none;
  font-size: 16px;
  line-height: 1.4;
  color: var(--body);
}
.hm-product-feats b { display: block; margin-bottom: 4px; font-size: 18px; font-weight: 500; color: var(--ink); }
.hm-product-stats { display: flex; flex-wrap: wrap; gap: 20px clamp(28px, 3.9vw, 56px); margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; list-style: none; color: var(--body); }
.hm-product-stats b { display: block; font-size: 34px; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.hm-product-shot { flex: 1.1 1 420px; min-width: 0; position: relative; min-height: clamp(230px, 56vw, 330px); }
.hm-product-shot img {
  position: absolute;
  left: 7%;
  top: 12%;
  width: 104%;
  max-width: none;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 30px 60px -30px rgba(16, 16, 16, .4);
  transform: rotate(-7deg);
}

/* my story: a small portrait beside five stations */
.hm-story { display: flex; flex-wrap: wrap; gap: 32px clamp(32px, 5.5vw, 80px); margin-top: clamp(28px, 2.8vw, 40px); }
.hm-story-side { flex: 0 1 240px; min-width: 0; color: var(--body); }
.hm-story-side img { display: block; width: clamp(128px, 17vw, 240px); height: auto; border-radius: 20px; }
.hm-story-side p { margin: 16px 0 0; max-width: 15em; }
.home .hm-link { display: inline-block; padding: 12px 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s ease; }
.home .hm-link:hover { color: var(--accent); }
.hm-stations { flex: 1 1 560px; min-width: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--hm-line); }
.hm-stations li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 32px; padding: 22px 0; border-top: 1px solid var(--hm-line); }
.home .hm-stations h3 { flex: 1 1 280px; font-size: clamp(21px, 1.8vw, 26px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }
.hm-station-place { flex: 0 1 200px; color: var(--muted); line-height: 1.35; }
.hm-station-place b { display: block; font-weight: 500; color: var(--ink); }
.hm-stations p { flex: 1.5 1 320px; min-width: 0; margin: 0; color: var(--body); }

/* contact */
.hm-contact { padding: clamp(96px, 11vw, 160px) 0 clamp(24px, 3vw, 40px); text-align: center; scroll-margin-top: 8px; }
.hm-contact-note { margin: 16px auto 0; font-size: clamp(18px, 1.45vw, 21px); color: var(--body); }
.hm-contact .hm-actions { justify-content: center; margin-top: clamp(28px, 2.8vw, 40px); }

/* footer */
.hm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  border-top: 1px solid var(--hm-line);
  margin-top: clamp(40px, 5vw, 64px);
  padding: 20px 0 28px;
  color: var(--body);
  font-size: 15px;
}
.home .foot-links { gap: 0 24px; font-family: var(--sans); font-size: 15px; align-items: center; }
.home .foot-links a, .home .consent-reopen { padding: 13px 0; font-family: var(--sans); font-size: 15px; }
.home .foot-links a:hover { color: var(--accent); }

/* The shared consent banner, in this page's shapes. */
.home .consent-btn { border-radius: 1000px; font-family: var(--sans); letter-spacing: 0; }
.home .consent-text { font-size: 15px; }
