/* MeasuringLens — RealTek Labs LLC
   Accent colours sampled directly from Icon.png (teal #01CFC5 -> blue #0565D7). */

:root {
  --bg: #ffffff;
  --ink: #0b1524;
  --muted: #5a6675;
  --hairline: #e6eaf0;
  --accent: #0565d7;
  --accent-teal: #01cfc5;
  --shot-w: clamp(190px, 20vw, 236px);
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow { max-width: 720px; }

/* ---------------------------------------------------------------- buttons */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  background: linear-gradient(115deg, var(--accent-teal) 0%, var(--accent) 62%);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(5, 101, 215, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.badge:hover,
.badge:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(5, 101, 215, 0.34);
}

.badge:active { transform: translateY(0); }

/* The App Store buttons carry no href until the store page is live, so they
   must not offer a click affordance. Adding the href restores all of the
   above with no other change. */
.badge:not([href]) { cursor: default; }

.badge:not([href]):hover {
  transform: none;
  box-shadow: 0 6px 22px rgba(5, 101, 215, 0.28);
}

.badge svg { flex: none; }

.badge--sm {
  padding: 12px 24px;
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------- top nav */

.topbar { padding: clamp(14px, 2.2vw, 20px) 0 0; }

.topbar .wrap { display: flex; justify-content: flex-end; }

.topbar a {
  padding: 7px 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.topbar a:hover,
.topbar a:focus-visible {
  color: var(--accent);
  border-color: rgba(5, 101, 215, 0.45);
}

/* ------------------------------------------------------------------- hero */

/* Top padding is lighter than it looks: the top nav above contributes the
   rest of the gap between the top of the page and the app icon. */
.hero {
  text-align: center;
  padding: clamp(30px, 6vw, 62px) 0 clamp(40px, 6vw, 64px);
}

.hero-icon {
  width: clamp(96px, 15vw, 124px);
  margin: 0 auto clamp(24px, 4vw, 34px);
  filter: drop-shadow(0 14px 30px rgba(5, 101, 215, 0.26));
  will-change: transform, opacity;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.tagline {
  margin: clamp(14px, 2.4vw, 20px) 0 0;
  font-size: clamp(1.2rem, 3.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--accent);
}

/* Gradient wordmark, but only where the text clip is genuinely supported —
   otherwise the solid accent above stands, so the line can never render blank. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .tagline {
    background: linear-gradient(100deg, var(--accent-teal) 0%, var(--accent) 58%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.hero-intro {
  max-width: 34em;
  margin: clamp(16px, 2.6vw, 22px) auto clamp(28px, 4vw, 38px);
  color: var(--muted);
  font-size: 1.06rem;
}

/* -------------------------------------------------------------- showcase */

.showcase { padding: clamp(16px, 3vw, 32px) 0 clamp(32px, 5vw, 48px); }

/* Columns are sized to their content rather than stretched, and the pair is
   centered — otherwise the capped text measure leaves a dead gutter on the
   outer edge of every row. */
.feature {
  display: grid;
  grid-template-columns: var(--shot-w) minmax(0, 46ch);
  justify-content: center;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(20px, 3vw, 30px) 0;
}

.feature.alt { grid-template-columns: minmax(0, 46ch) var(--shot-w); }
.feature.alt .shot { grid-column: 2; grid-row: 1; }
.feature.alt .copy { grid-column: 1; grid-row: 1; }

.shot img {
  width: 100%;
  border-radius: 6px;
}

.copy h3 {
  margin: 0 0 10px;
  font-size: clamp(1.28rem, 2.6vw, 1.55rem);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.copy p {
  margin: 0;
  color: var(--muted);
}

/* Reveal-on-scroll. Base state doubles as the faded out-of-view state. */
.reveal {
  opacity: 0.2;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Once a block has entered, it keeps its final position — only opacity
   dips again on the way out, which avoids a jolt when scrolling back up. */
.reveal.seen { transform: translateY(0); }
.reveal.is-visible { opacity: 1; }

/* ------------------------------------------------------------ value props */

.values {
  border-top: 1px solid var(--hairline);
  padding: clamp(48px, 7vw, 76px) 0;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 56px);
  text-align: center;
}

.value .glyph {
  font-size: 1.9rem;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
}

.value h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.value p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: clamp(48px, 7vw, 72px) 0 44px;
  text-align: center;
}

.footer-icon {
  width: 46px;
  margin: clamp(30px, 4vw, 40px) auto 0;
  border-radius: 10px;
}

.footer-links {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  font-size: 0.95rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.copyright {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Developer mark — deliberately understated so it doesn't compete with the
   app icon and wordmark above it. */
.dev-mark {
  width: 104px;
  margin: 14px auto 0;
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.dev-mark:hover { opacity: 0.7; filter: grayscale(0.3); }

/* ------------------------------------------------------- legal doc pages */

.site-header {
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.brand img { width: 32px; border-radius: 7px; }

.doc { padding: clamp(40px, 6vw, 64px) 0 clamp(48px, 7vw, 72px); }

.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  letter-spacing: -0.03em;
}

.doc .updated {
  margin: 12px 0 2.2em;
  color: var(--muted);
  font-size: 0.92rem;
}

.doc h2 {
  margin: 2.2em 0 0.55em;
  font-size: 1.18rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.doc p { margin: 0 0 1.05em; }

.doc ul { margin: 0 0 1.05em; padding-left: 1.3em; }

.doc li { margin-bottom: 0.7em; }

.doc .contact {
  margin-top: 1.8em;
  padding-top: 1.8em;
  border-top: 1px solid var(--hairline);
}

.doc address {
  font-style: normal;
  margin: 0;
}

/* ------------------------------------------------------- support page */

.doc .lead {
  margin: 12px 0 2.2em;
  color: var(--muted);
  font-size: 1.06rem;
}

/* The three things most people arrive on the support page needing, so they
   sit above the FAQ rather than inside it. */
.support-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 2.6em;
}

.action-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.action-card:hover,
.action-card:focus-visible {
  border-color: rgba(5, 101, 215, 0.4);
  box-shadow: 0 8px 22px rgba(5, 101, 215, 0.1);
  transform: translateY(-2px);
}

.action-card .glyph {
  display: block;
  margin-bottom: 10px;
  font-size: 1.3rem;
  line-height: 1;
}

.action-card strong {
  display: block;
  font-size: 0.99rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.action-card span:not(.glyph) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.87rem;
  overflow-wrap: anywhere;
}

.faq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 2.6em;
}

.faq-nav a {
  padding: 7px 15px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.faq-nav a:hover,
.faq-nav a:focus-visible {
  color: var(--accent);
  border-color: rgba(5, 101, 215, 0.45);
}

.faq { scroll-margin-top: 20px; }

.faq h2 {
  margin: 2.6em 0 0.9em;
  font-size: 1.26rem;
  font-weight: 650;
  letter-spacing: -0.022em;
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 20px;
}

.faq-item:first-of-type { border-top: 1px solid var(--hairline); }

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.012em;
  transition: color 0.15s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { color: var(--accent); }

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Chevron drawn from two borders — no icon font, no extra request. */
.faq-item summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin: 6px 4px 0 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.faq-item[open] summary::after {
  margin-top: 10px;
  transform: rotate(-135deg);
}

.faq-answer {
  padding: 0 32px 20px 2px;
  color: var(--muted);
}

.faq-answer p { margin: 0 0 0.9em; }

.faq-answer ul,
.faq-answer ol {
  margin: 0 0 0.9em;
  padding-left: 1.3em;
}

.faq-answer li { margin-bottom: 0.5em; }

.faq-answer > :last-child { margin-bottom: 0; }

.faq-answer strong { color: var(--ink); }

/* -------------------------------------------------------- contact block */

.contact-card {
  margin-top: 3.4em;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(1, 207, 197, 0.08), rgba(5, 101, 215, 0.08));
  text-align: center;
  scroll-margin-top: 20px;
}

.contact-card h2 {
  margin: 0 0 12px;
  font-size: 1.32rem;
  font-weight: 650;
  letter-spacing: -0.022em;
}

.contact-card p {
  max-width: 46ch;
  margin: 0 auto 1.1em;
  color: var(--muted);
}

.contact-email {
  font-size: clamp(1.05rem, 3vw, 1.24rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.contact-email a { text-decoration: none; }

.contact-email a:hover,
.contact-email a:focus-visible { text-decoration: underline; }

.contact-card .contact-note { font-size: 0.92rem; }

.contact-card address {
  margin: 1.6em 0 0;
  padding-top: 1.4em;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.5;
}

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

@media (max-width: 760px) {
  body { font-size: 16px; }

  .support-actions { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .feature,
  .feature.alt {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    justify-items: center;
    text-align: center;
    padding: 26px 0;
  }

  .feature.alt .shot,
  .feature.alt .copy {
    grid-column: 1;
    grid-row: auto;
  }

  .shot { width: min(200px, 62vw); }

  .copy p { max-width: 42ch; margin-inline: auto; }

  .values-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }

  .badge { transition: none; }

  /* JS also skips the hero-icon scroll effect under this setting. */
}
