@import url("fonts/fonts.css");

/* ---------- tokens ---------- */
:root {
  --ink:            #080B0A;
  --ink-raised:     #0D1211;
  --surface:        rgba(255, 255, 255, 0.028);
  --surface-hover:  rgba(255, 255, 255, 0.05);
  --hairline:       rgba(255, 255, 255, 0.09);
  --hairline-soft:  rgba(255, 255, 255, 0.055);

  --text:           #EFF3EF;
  --text-dim:       #A3ADA7;
  /* #7C8681 clears WCAG AA (>=4.5:1) on both --ink and the card surface;
     the previous #6E7873 measured 4.33:1 / 4.12:1 and failed. */
  --text-faint:     #7C8681;

  --accent:         #4ADE9B;
  --accent-deep:    #14A35E;
  --accent-wash:    rgba(74, 222, 155, 0.09);
  --cool:           #7FB2FF;

  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --shell: 1120px;
  --radius: 16px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

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

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient field: subtle, never busy */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58rem 34rem at 12% -8%, rgba(74, 222, 155, 0.10), transparent 62%),
    radial-gradient(46rem 30rem at 92% 4%, rgba(127, 178, 255, 0.065), transparent 60%),
    radial-gradient(70rem 44rem at 50% 108%, rgba(20, 163, 94, 0.055), transparent 66%);
}

/* ---------- typography ---------- */
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--text);
  text-wrap: balance;
  /* long words like "understanding." overflow a 320px viewport otherwise */
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.15rem, 6.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.24rem; letter-spacing: -0.01em; }

p { text-wrap: pretty; }
p + p { margin-top: 1.05em; }

a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: #7FF0BC; }

strong { font-weight: 600; color: var(--text); }

.lede {
  font-size: clamp(1.1rem, 1.9vw, 1.32rem);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: var(--measure);
}

.eyebrow {
  font-size: 0.735rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.15rem;
}
.eyebrow.cool { color: var(--cool); }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); font-size: 0.9rem; }

/* ---------- layout ---------- */
.shell {
  width: min(100% - 2.75rem, var(--shell));
  margin-inline: auto;
}

section { padding-block: clamp(4rem, 8.5vw, 7rem); }
section + section { border-top: 1px solid var(--hairline-soft); }

.section-head { max-width: var(--measure); margin-bottom: 3rem; }
.section-head p { margin-top: 1rem; color: var(--text-dim); }

.grid { display: grid; gap: 1.25rem; }
/* min() keeps the track from forcing a floor wider than the container.
   a bare minmax(310px,1fr) overflows a 320px viewport (WCAG 1.4.10). */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr)); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 10, 0.76);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 66px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); }
.brand:hover { color: var(--text); }
/* the glyph sits in the middle band of its 32-box, so it reads smaller than
   its frame; 34px balances it against the 1.13rem wordmark. */
.brand svg { width: 34px; height: 34px; flex: none; margin-right: -0.15rem; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.13rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.brand-name em { font-style: normal; color: var(--accent); }

.site-nav ul { display: flex; align-items: center; gap: 1.15rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  /* keeps the hit area >= 24px tall per WCAG 2.5.8 */
  min-height: 32px;
  padding-inline: 0.45rem;
  border-radius: 8px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-dim);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 640px) {
  .site-header .shell { flex-direction: column; align-items: flex-start; padding-block: 0.85rem; gap: 0.7rem; }
  .site-nav ul { gap: 1.15rem; flex-wrap: wrap; }
  .site-nav a { font-size: 0.875rem; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(3.5rem, 7vw, 6rem); }
.hero h1 { max-width: 17ch; }
.hero .app-icon { margin-bottom: 1.6rem; }
.hero .lede { margin-top: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  font-family: var(--sans);
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #05130C; }
.btn-primary:hover { background: #6BEDB0; color: #05130C; }

/* The border is this button's only boundary, so WCAG 1.4.11 requires >=3:1
   against the page. --hairline (0.09 alpha) measures 1.22:1; 0.36 gives 3.2:1. */
.btn-ghost { border-color: rgba(255,255,255,0.36); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.52); background: var(--surface-hover); color: var(--text); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.7rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--text-dim); font-size: 0.96rem; }

.card-num {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

a.card { display: block; color: inherit; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
a.card:hover { border-color: rgba(74, 222, 155, 0.42); background: var(--surface-hover); transform: translateY(-2px); color: inherit; }

/* app icon, used in the product card and on the Clutch hero */
.app-icon {
  width: 76px; height: 76px;
  border-radius: 18px;
  border: 1px solid var(--hairline);
}

/* tag row */
.meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }

/* product card */
.product {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem;
  /* without this the copy runs to ~130 characters at full shell width */
  max-width: 60rem;
}
.product p { max-width: 62ch; }
@media (max-width: 560px) {
  .product { grid-template-columns: 1fr; }
}

.pill {
  display: inline-block;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.02);
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.pill.accent { border-color: rgba(74,222,155,0.3); background: var(--accent-wash); color: var(--accent); }

/* ---------- prose (support / privacy / legal) ---------- */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 3rem; margin-bottom: 0.9rem; font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { margin-top: 0.9rem; display: grid; gap: 0.6rem; }
.prose ul li { position: relative; padding-left: 1.4rem; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem; top: 0.72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.prose ol { margin-top: 0.9rem; display: grid; gap: 0.6rem; counter-reset: step; }
.prose ol li { position: relative; padding-left: 1.9rem; counter-increment: step; }
.prose ol li::before {
  content: counter(step) ".";
  position: absolute; left: 0; top: 0;
  font-family: var(--serif); font-weight: 600;
  color: var(--accent);
}

.callout {
  margin-top: 1.6rem;
  padding: 1.25rem 1.4rem;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 155, 0.26);
  background: var(--accent-wash);
}
.callout p { color: var(--text); font-size: 0.96rem; }

.contact-line {
  margin-top: 1.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
}
.contact-line .label {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 0.35rem;
}
.contact-line .value { font-size: 1.12rem; font-weight: 500; }

/* ---------- screenshot rail ---------- */
.shots {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding-bottom: 1.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots figure { flex: none; width: 216px; scroll-snap-align: start; }
.shots img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--hairline);
  background: var(--ink-raised);
}
.shots figcaption {
  margin-top: 0.7rem;
  font-size: 0.83rem;
  color: var(--text-faint);
  text-align: center;
}
.shots::-webkit-scrollbar { height: 6px; }
.shots::-webkit-scrollbar-track { background: var(--hairline-soft); border-radius: 3px; }
.shots::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 3px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline-soft);
  padding-block: 3.25rem 2.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.75rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

.footer-brand p { margin-top: 0.9rem; color: var(--text-faint); font-size: 0.9rem; max-width: 34ch; }
.footer-col h4 {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-faint);
  margin-bottom: 0.9rem;
}
.footer-col ul { display: grid; gap: 0.15rem; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;      /* comfortable hit area, WCAG 2.5.8 */
  font-size: 0.925rem;
  color: var(--text-dim);
}
.footer-col a:hover { color: var(--text); }

.footer-legal {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.855rem;
  color: var(--text-faint);
}

/* ---------- a11y ---------- */
.skip {
  position: absolute; left: -9999px;
  padding: 0.7rem 1.1rem; border-radius: 8px;
  background: var(--accent); color: #05130C; font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
