/*
 * Home page. The hero is drawn on the ground Lens 2 participants see
 * (#16171b), so the screenshots sit in their own surroundings; the rest of
 * the page is plain and light.
 */
.home-page {
  --ink: #1c1f24;
  --muted: #5d6470;
  --line: #e2e5ea;
  --accent: #1f5fd1;
  --stage: #16171b;
  --stage-raised: #2b2e35;
  --stage-text: #f3f4f6;
  --stage-muted: #a6acb8;
  --stage-accent: #5aa9ff;
  --wide: min(1080px, calc(100vw - 32px));
}

/* Sections wider than minima's 800px column, centered on the page */
.home-page .tool,
.home-page .try {
  width: var(--wide);
  margin-inline: calc((100% - var(--wide)) / 2);
}

/* ---- Hero ---- */
.home-page .hero {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: -19px; /* sit right under the fixed header */
  background: var(--stage);
  color: var(--stage-text);
}
.home-page .hero-inner {
  width: var(--wide);
  margin: 0 auto;
  padding: 72px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: end;
}
.home-page .hero-text {
  align-self: center;
  padding-bottom: 72px;
}
.home-page .hero h1 {
  font-size: 46px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  max-width: 14em;
}
.home-page .hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--stage-muted);
  max-width: 32em;
  margin: 0 0 32px;
}
.home-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}
.home-page .button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.home-page .button-primary { background: var(--stage-accent); color: #0b1526; }
.home-page .button-primary:hover { background: #7cbcff; text-decoration: none; }
.home-page .button-quiet { color: var(--stage-text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.home-page .button-quiet:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); text-decoration: none; }
.home-page .button:focus-visible { outline: 3px solid var(--stage-accent); outline-offset: 3px; }

/* Three phones, the middle one in front; the band clips them at the bottom */
.home-page .hero-phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 470px;
  padding-top: 8px;
  clip-path: inset(-200px -200px 0 -200px);
}
.home-page .phone {
  margin: 0;
  flex: 0 0 auto;
  width: 196px;
  padding: 7px;
  border-radius: 30px;
  background: var(--stage-raised);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.home-page .phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}
.home-page .phone:nth-child(1),
.home-page .phone:nth-child(3) { margin-top: 56px; opacity: 0.92; }
.home-page .phone:nth-child(1) { margin-right: -22px; }
.home-page .phone:nth-child(3) { margin-left: -22px; }
.home-page .phone:nth-child(2) { position: relative; z-index: 1; }

/* ---- Tools ---- */
.home-page .tool {
  display: grid;
  gap: 24px 56px;
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}
.home-page .tool h2 {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.home-page .tool h2 a { color: var(--ink); }
.home-page .tool-text p {
  font-size: 17px;
  line-height: 1.6;
  max-width: 36em;
  margin: 0 0 16px;
}
.home-page .tool .tool-status {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 20px;
}
.home-page .tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 24px !important;
  font-weight: 700;
}
.home-page .tool-links a { color: var(--accent); }

.home-page .shot { margin: 0; }
.home-page .shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(28, 31, 36, 0.12);
}
.home-page .shot figcaption {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Lens: heading and first paragraph on the left, what's new on the right, the builder full width below */
.home-page .tool-lens .tool-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "title ." "status ." "about new" "links links";
  gap: 0 56px;
}
.home-page .tool-lens h2 { grid-area: title; }
.home-page .tool-lens .tool-status { grid-area: status; }
.home-page .tool-lens .tool-text > p:nth-of-type(2) { grid-area: about; }
.home-page .tool-lens .tool-text > p:nth-of-type(3) { grid-area: new; }
.home-page .tool-lens .tool-links { grid-area: links; }
.home-page .tool-lens .shot { margin-top: 24px; }

/* Jamasp: text beside the dashboard */
.home-page .tool-jamasp {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
}

/* Cut: smaller, archival */
.home-page .tool-cut {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
}
.home-page .tool-cut .shot img { filter: saturate(0.75); }

/* ---- Try it ---- */
.home-page .try { padding: 80px 0 40px; }
.home-page .try h2 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.home-page .try > p { font-size: 17px; color: var(--muted); max-width: 40em; }
.home-page .demo-list {
  list-style: none;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}
.home-page .demo-list li {
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-page .demo-list a { font-size: 18px; font-weight: 700; color: var(--accent); }
.home-page .demo-list span { font-size: 15px; color: var(--muted); }
.home-page .try-classic { font-size: 16px; color: var(--muted); max-width: 46em; }
.home-page .try-classic a { color: var(--accent); }
.home-page code { font-size: 0.9em; background: #f1f3f6; border: 0; padding: 1px 5px; border-radius: 4px; }

/* ---- Narrow screens ---- */
@media (max-width: 860px) {
  .home-page .hero-inner { grid-template-columns: 1fr; gap: 8px; padding-top: 48px; }
  .home-page .hero-text { padding-bottom: 24px; }
  .home-page .hero h1 { font-size: 36px; }
  .home-page .hero-phones { height: 300px; }
  .home-page .phone { width: 36%; max-width: 196px; padding: 5px; border-radius: 22px; }
  .home-page .phone img { border-radius: 18px; }
  .home-page .phone:nth-child(1), .home-page .phone:nth-child(3) { margin-top: 36px; }
  .home-page .phone:nth-child(1) { margin-right: -6%; }
  .home-page .phone:nth-child(3) { margin-left: -6%; }
  .home-page .tool { padding: 56px 0; }
  .home-page .tool h2, .home-page .try h2 { font-size: 28px; }
  .home-page .tool-lens .tool-text,
  .home-page .tool-jamasp,
  .home-page .tool-cut { grid-template-columns: 1fr; }
  .home-page .tool-lens .tool-text { grid-template-areas: "title" "status" "about" "new" "links"; }
  .home-page .tool-cut .shot { order: 2; }
  .home-page .demo-list { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .home-page .hero h1 { font-size: 31px; }
  .home-page .button { flex: 1 1 100%; justify-content: center; }
}

/* Line the header up with the wider home page */
body:has(.home-page) .site-header .wrapper,
body:has(.home-page) .site-footer .wrapper {
  max-width: 1080px;
}

/* ---- Case studies: drawers that open downward ---- */
.home-page .cases {
  scroll-margin-top: 72px;
  width: var(--wide);
  margin-inline: calc((100% - var(--wide)) / 2);
  padding: 80px 0 24px;
}
.home-page .cases h2 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.home-page .cases > p { font-size: 17px; color: var(--muted); margin-bottom: 24px; }
.home-page .case { border-top: 1px solid var(--line); }
.home-page .case:last-of-type { border-bottom: 1px solid var(--line); }
.home-page .case summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title chevron" "meta chevron";
  column-gap: 16px;
  align-items: center;
  padding: 20px 4px;
}
.home-page .case summary::-webkit-details-marker { display: none; }
.home-page .case summary::after {
  content: "";
  grid-area: chevron;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 160ms ease;
}
.home-page .case[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.home-page .case summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.home-page .case-title { grid-area: title; font-size: 21px; font-weight: 700; color: var(--ink); }
.home-page .case-meta { grid-area: meta; font-size: 15px; color: var(--muted); margin-top: 2px; }
.home-page .case-meta cite, .home-page .case-cite cite { font-style: italic; }
.home-page .case-body { padding: 0 4px 28px; max-width: 46em; }
.home-page .case-body p { font-size: 17px; line-height: 1.6; margin: 0 0 16px; }
.home-page .case-body a { color: var(--accent); }
.home-page .case-cite { font-size: 15px !important; color: var(--muted); }
.home-page .case-figures {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 2fr);
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}
.home-page .case-figures figure { margin: 0; }
.home-page .case-figures img { display: block; width: 100%; height: auto; border-radius: 8px; }
.home-page .case-figures figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .home-page .case summary::after { transition: none; }
}
@media (max-width: 860px) {
  .home-page .cases { padding-top: 56px; }
  .home-page .cases h2 { font-size: 28px; }
  .home-page .case-figures { grid-template-columns: 1fr; }
  .home-page .case-figures figure:last-child { max-width: 220px; }
}
