/* home.css: the homepage only, in the product's UI language.
 *
 * Values follow the Metergraph app's design system
 * (metergraph-internal app/web/src/system.css): the grey-10 field, white
 * 16px cards with a grey-100 hairline, pill buttons with the black primary,
 * mono uppercase labels, green-700 as the one accent, and the dot-matrix
 * face for headline figures. landing.css is shared with the blog, tools and
 * case studies, so everything here is scoped to body.home.
 */

body.home {
  --h-field: #f7f6f5;
  --h-raised: #ffffff;
  --h-well: #f0efee;
  --h-border: #e7e6e5;
  --h-border-strong: #dbdbd9;
  --h-text: #111111;
  --h-text-2: #616060;
  --h-text-3: #b1b1b0;
  --h-accent: #18614e;
  --h-accent-soft: #def0eb;
  --h-radius-card: 16px;
  --h-radius-inner: 10px;
  --h-pill: 999px;

  background: var(--h-field);
  color: var(--h-text);
}

/* ——— buttons: the app's pills ——— */
body.home .btn {
  border-radius: var(--h-pill);
  background: var(--h-text);
  color: var(--h-raised);
  border-color: transparent;
}
body.home .btn:hover { background: #353534; }
body.home .btn-outline {
  background: var(--h-raised);
  border-color: var(--h-border-strong);
  color: var(--h-text);
}
body.home .btn-outline:hover { background: var(--h-well); }

/* ——— nav ——— */
body.home .nav { border-bottom-color: var(--h-border); background: var(--h-field); }

/* ——— shared pieces ——— */
.h-card {
  background: var(--h-raised);
  border: 1px solid var(--h-border);
  border-radius: var(--h-radius-card);
}
.h-eyebrow,
.h-tag,
.h-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.h-eyebrow,
.h-tag { color: var(--h-accent); }
.h-label { color: var(--h-text-2); }

.h-band { padding-top: 96px; }
.h-band > .wrap { border-top: 1px solid var(--h-border); padding-top: 64px; }
.h-section { border-top: 1px solid var(--h-border); margin-top: 96px; padding-top: 64px; }

.h-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-top: 16px; }
.h-head h2 {
  font-size: 44px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 500;
}
.h-sub { font-size: 17px; line-height: 1.55; color: var(--h-text-2); }
.h-head:has(> h2:only-child) { grid-template-columns: 1fr; }

.h-grid { display: grid; gap: 16px; margin-top: 16px; }
.h-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.h-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.h-point { padding: 24px; }
.h-point h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 8px; }
.h-point p { font-size: 15px; line-height: 1.55; color: var(--h-text-2); }
.h-point a,
.h-more a,
.h-link,
.h-note a { color: var(--h-accent); }

.h-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.h-link { font-size: 15px; font-weight: 500; }
.h-more { margin-top: 16px; font-size: 15px; font-weight: 500; }

/* ——— hero ——— */
.h-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
  padding-top: 88px;
}
.h-hero h1 {
  margin-top: 16px;
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.h-lede { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--h-text-2); max-width: 34em; }
.h-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.h-note { margin-top: 14px; font-size: 13px; color: var(--h-text-2); }

.h-finding { margin: 0; padding: 28px; }
.h-figure { display: flex; align-items: flex-end; gap: 10px; margin-top: 24px; }
.h-figure-unit { font-family: var(--font-mono); font-size: 20px; color: var(--h-text-2); line-height: 1; }
.dot-figure { display: block; width: 100%; max-width: 300px; }
.dot-figure svg { display: block; width: 100%; height: auto; }
.h-finding-title { margin-top: 24px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.h-finding-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--h-border);
}
.h-finding-stats dt {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--h-text-2);
}
.h-finding-stats dd { margin: 4px 0 0; font-size: 15px; font-weight: 500; }

/* ——— finance proof ——— */
.h-proof {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px;
  margin-top: 40px; padding: 32px;
}
.h-proof-stat { display: flex; flex-direction: column; gap: 8px; }
.h-stat { font-size: 56px; line-height: 1; letter-spacing: -0.04em; font-weight: 500; color: var(--h-accent); }
.h-stat-label { font-size: 16px; line-height: 1.45; color: var(--h-text-2); max-width: 24em; }

/* ——— tour ——— */
.h-tour { margin-top: 40px; padding: 8px; overflow: hidden; }
.h-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.h-step {
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 4px;
  align-items: baseline; text-align: left;
  padding: 14px 16px; border: 0; border-radius: var(--h-radius-inner);
  background: transparent; color: var(--h-text); cursor: pointer;
  font: inherit;
}
.h-step:hover { background: var(--h-field); }
.h-step[aria-selected="true"] { background: var(--h-field); }
.h-step-n { font-family: var(--font-mono); font-size: 12px; color: var(--h-text-3); }
.h-step[aria-selected="true"] .h-step-n { color: var(--h-accent); }
.h-step-verb { font-size: 15px; font-weight: 500; }
.h-step-title { grid-column: 2; font-size: 13px; line-height: 1.35; color: var(--h-text-2); }
.h-panel { padding: 24px 16px 8px; }
.h-panel-text { font-size: 17px; line-height: 1.55; max-width: 44em; }
.h-panel img {
  display: block; width: 100%; height: auto; margin-top: 20px;
  /* One frame for every step, so the tour does not jump between tabs; a
     taller screen is cropped from the bottom, keeping its header. */
  aspect-ratio: 1847 / 1230; object-fit: cover; object-position: top;
  border: 1px solid var(--h-border); border-radius: var(--h-radius-inner);
}

/* ——— code ——— */
.h-code { margin-top: 40px; padding: 8px; }
.h-code-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; }
.h-code-tab {
  height: 32px; padding: 0 14px; border: 0; border-radius: var(--h-pill);
  background: transparent; color: var(--h-text-2); font: 500 14px/1 var(--font-core); cursor: pointer;
}
.h-code-tab:hover { color: var(--h-text); }
.h-code-tab[aria-selected="true"] { background: var(--h-text); color: var(--h-raised); }
.h-code-panel {
  margin: 4px; padding: 20px 24px; border-radius: var(--h-radius-inner);
  background: var(--h-field); overflow-x: auto;
}
.h-code-panel pre { margin: 0; font: 14px/1.7 var(--font-mono); color: var(--h-text); }
.h-code-panel .c { color: var(--h-text-2); }
.h-code-text { font-size: 16px; line-height: 1.55; color: var(--h-text); max-width: 44em; }

/* ——— plans ——— */
.h-plan { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.h-plan h3 { font-size: 17px; }
.h-price { font-size: 36px; letter-spacing: -0.03em; font-weight: 500; }
.h-price span { font-size: 15px; color: var(--h-text-2); letter-spacing: 0; font-weight: 400; }
.h-plan p:not(.h-price) { font-size: 15px; line-height: 1.55; color: var(--h-text-2); flex: 1; }
.h-plan .btn { align-self: flex-start; }

/* ——— final card ——— */
.h-final { padding: 40px; }
.h-final-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.h-final h2 { font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; }
.h-final .h-sub { margin-top: 8px; }
.h-final .cta-form input[type="email"] {
  border-radius: var(--h-pill); border: 1px solid var(--h-border-strong); background: var(--h-raised);
}
.h-final .cta-fine { color: var(--h-text-2); }

body.home .footer { margin-top: 96px; border-top: 1px solid var(--h-border); }


/* ——— hero proof and offers ——— */
.h-proof-line { margin-top: 20px; font-size: 15px; line-height: 1.5; color: var(--h-text-2); max-width: 34em; }
.h-proof-line strong { color: var(--h-text); font-weight: 500; }
.h-offer { margin-top: 32px; font-size: 17px; line-height: 1.5; color: var(--h-text); }
.h-actions-tight { margin-top: 16px; }
.h-story-small { margin-top: 16px; }
.h-story-small h2 { font-size: 28px; }

/* ——— finance proof point ——— */
.h-proof-point {
  grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--h-border);
  font-size: 16px; line-height: 1.55; color: var(--h-text-2);
}
.h-proof-point strong { color: var(--h-text); font-weight: 500; }
.h-proof-point a { color: var(--h-accent); white-space: nowrap; }

/* ——— builder tools: Pricing API and skills ——— */
.h-lead { margin-top: 40px; }
.h-feature { padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.h-feature h3 { font-size: 22px; letter-spacing: -0.02em; }
.h-feature > p:not(.h-label) { font-size: 15px; line-height: 1.55; color: var(--h-text-2); }
.h-well {
  margin-top: 4px; padding: 16px 18px; border-radius: var(--h-radius-inner);
  background: var(--h-field); overflow-x: auto; flex: 1;
}
.h-well pre { margin: 0; font: 13px/1.7 var(--font-mono); color: var(--h-text); }

/* ——— story and moments ——— */
.h-story { margin-top: 16px; padding: 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 56px; }
.h-story h2 { grid-column: 1 / -1; font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; max-width: 18em; }
.h-story-body p { font-size: 17px; line-height: 1.6; color: var(--h-text-2); }
.h-story-body p + p { margin-top: 12px; }
.h-story-stats { display: grid; gap: 24px; align-content: start; }
.h-story-stats > div { display: flex; flex-direction: column; gap: 6px; }
.h-tag-spaced { margin-top: 56px; }
.h-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
a.h-moment { color: inherit; transition: border-color var(--dur-1) var(--ease-swift); }
a.h-moment:hover { text-decoration: none; border-color: var(--h-border-strong); }

/* ——— narrow screens ——— */
.h-quote { margin: 24px 0 0; padding: 28px 32px; }
.h-quote blockquote { margin: 0; }
.h-quote blockquote p { font-size: 22px; line-height: 1.4; letter-spacing: -0.01em; }
.h-quote figcaption {
  margin-top: 12px; font-family: var(--font-mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--h-text-2);
}

@media (max-width: 960px) {
  .h-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .h-hero h1 { font-size: 44px; }
  .h-head { grid-template-columns: 1fr; gap: 16px; }
  .h-head h2 { font-size: 34px; }
  .h-grid-3, .h-grid-2, .h-grid-4, .h-proof, .h-story { grid-template-columns: minmax(0, 1fr); }
  .h-story { padding: 24px; }
  .h-story h2 { font-size: 28px; }
  .h-steps { display: flex; overflow-x: auto; scrollbar-width: none; }
  .h-step { flex: 0 0 auto; }
  .h-step-title { display: none; }
  .h-section, .h-band { padding-top: 56px; }
  .h-section { margin-top: 56px; }
  body.home .nav .nav-link { display: none; }
}
@media (max-width: 560px) {
  .h-quote { padding: 22px; }
  .h-quote blockquote p { font-size: 19px; }
  .h-hero h1 { font-size: 38px; }
  .h-final { padding: 24px; }
  .h-finding-stats { grid-template-columns: 1fr 1fr; }
  .h-stat { font-size: 44px; }
}
