/* LabLife — home page: the title over the flowing wave, install banner, menu of sections;
 * and the list of calculators on a section page (#optics, #gases, #units). */
.home-hero {
  position: relative; overflow: hidden;
  min-height: clamp(330px, 46vw, 470px);
  display: grid; align-content: space-between; justify-items: center;
  padding-block: clamp(34px, 6vw, 64px) 18px;
  text-align: center;
}
/* the wave fills the whole width of the screen; its top and bottom fade into the page */
.hero-wave {
  position: absolute; left: 0; right: 0; top: 14%; width: 100%; height: 86%;
  display: block; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 78%, transparent 100%);
}
.hero-text { position: relative; display: grid; justify-items: center; gap: 10px; }
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 7vw, 54px);
  letter-spacing: 0.01em;
  line-height: 1.05;
  display: flex; align-items: center; gap: 0.32em;
  text-shadow: 0 2px 24px rgb(11 7 16 / 90%);
}
.brand-logo { display: block; color: var(--accent); width: 1.45em; flex: none; filter: drop-shadow(0 0 14px var(--glow)); }
.brand-logo svg { display: block; width: 100%; height: auto; }
.tagline {
  color: var(--accent); font-family: var(--font-display); font-weight: 400;
  font-size: clamp(15px, 2.4vw, 18px); letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: 0 1px 16px rgb(11 7 16 / 95%);
}
/* three words, widely spaced, under the wave */
.motto {
  position: relative; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.1em;
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  font-size: clamp(12px, 2.2vw, 15px); letter-spacing: 0.42em; color: var(--ink);
  padding-left: 0.42em;          /* balances the spacing after the last letter, so the line stays centred */
  text-shadow: 0 1px 12px rgb(11 7 16 / 95%);
}
.motto span + span::before { content: "·"; color: var(--amber); margin-right: 1.1em; letter-spacing: 0; }
@media (max-width: 420px) { .motto { letter-spacing: 0.3em; padding-left: 0.3em; gap: 0 0.8em; } .motto span + span::before { margin-right: 0.8em; } }

.home-body { max-width: 800px; }

/* home: the sections, one below the other */
.sections { display: grid; gap: 14px; margin: 0; padding: 14px 0 34px; list-style: none; }
.section-card, .tool {
  display: grid; align-items: center;
  border: 1px solid transparent; border-radius: var(--radius);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--edge) border-box;
  color: inherit; text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .2s ease;
}
.section-card:hover, .tool:hover { box-shadow: var(--shadow), 0 0 0 1px rgb(176 105 247 / 45%), 0 0 26px var(--glow); }
.section-card:active, .tool:active { transform: scale(0.985); }
.section-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; padding: 18px 14px 18px 16px; }
/* icons sit in thin round frames */
.section-icon, .tool-icon {
  border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgb(176 105 247 / 45%);
  background: radial-gradient(circle at 50% 40%, rgb(176 105 247 / 22%), rgb(176 105 247 / 4%) 70%);
  color: var(--accent);
}
.section-icon { width: 60px; height: 60px; }
.section-icon svg { width: 32px; height: 32px; }
.section-text { min-width: 0; display: grid; gap: 3px; }
.section-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: 0.005em; }
.section-desc { font-size: 14.5px; color: var(--ink-2); }
.section-items { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.section-items .sep { color: var(--amber); }
.chev {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--ink);
}
.chev svg { width: 16px; height: 16px; }
/* narrow phones: smaller icon and arrow, so the text keeps its width */
@media (max-width: 380px) {
  .section-card { gap: 12px; padding: 16px 10px 16px 12px; }
  .section-icon { width: 46px; height: 46px; }
  .section-icon svg { width: 26px; height: 26px; }
  .chev { width: 26px; height: 26px; }
}

/* section page: its calculators */
.section-page .tool-list { max-width: 800px; padding-bottom: 40px; }
.tool-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tool { grid-template-columns: auto 1fr auto; gap: 14px; padding: 14px; }
.tool-icon { width: 52px; height: 52px; }
.tool-icon svg { width: 28px; height: 28px; }
.tool-text { min-width: 0; display: grid; gap: 2px; }
.tool-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.25; }
.tool-desc { font-size: 14px; color: var(--ink-2); }
.tool-formula { font-size: 15px; color: var(--ink); margin-top: 4px; }

.install {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius); margin-top: 6px;
  border: 1px solid transparent;
  background: linear-gradient(var(--accent-soft), var(--accent-soft)) padding-box, var(--edge) border-box;
  color: var(--ink);
}
.install p { font-size: 14px; color: var(--ink-2); }
.install strong { display: block; font-size: 15px; color: var(--ink); font-family: var(--font-display); font-weight: 500; }

/* footer: centred small print under a violet-to-amber hairline */
.home-foot {
  color: var(--ink-2); font-size: 13px; padding-block: 20px 40px; display: grid; gap: 6px;
  justify-items: center; text-align: center; position: relative;
}
.home-foot::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(176 105 247 / 60%) 30%, rgb(233 152 79 / 50%) 70%, transparent);
}
.version-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; }
