/* ==========================================================================
   Behaved - behavedsoft.com
   Single stylesheet. No imports, no external fonts, no CDN, no JavaScript.
   Everything below is self-contained and renders offline.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   Dark canvas, frosted-glass surfaces, one chromatic accent (mint).
   Mint matches the CLEAN CAM app. To retune the whole site, change --mint.
   -------------------------------------------------------------------------- */
:root {
  /* Canvas + surfaces */
  --canvas:          #05060f;
  --surface-glass:   rgba(186, 214, 247, 0.03);
  --surface-raised:  rgba(199, 211, 234, 0.06);
  --surface-hover:   rgba(186, 214, 247, 0.12);

  /* Hairlines - the border language is an inset frosted stroke, never a solid rule */
  --hairline:        rgba(186, 215, 247, 0.12);
  --hairline-strong: rgba(186, 215, 247, 0.24);
  --grid-line:       rgba(186, 215, 247, 0.06);

  /* Text ramp: heading -> body -> muted -> helper */
  --text-heading:    #d8ecf8;
  --text-body:       #d1e4fa;
  --text-muted:      #c7d3ea;
  --text-helper:     #9da7ba;

  /* Accent - the single chromatic colour in the system */
  --mint:            #4fe3ab;
  --mint-bright:     #7ff0c8;
  --mint-ink:        #04231a;   /* text colour on a mint fill */
  --mint-soft:       rgba(79, 227, 171, 0.12);
  --mint-glow:       rgba(79, 227, 171, 0.22);

  /* Display gradient - reserved for the wordmark and the largest headings only */
  --gradient-display: linear-gradient(180deg, #f2fffb 0%, #a9edd2 55%, #4fe3ab 100%);

  /* Type - system stacks only. No webfonts are loaded anywhere on this site. */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  /* Spacing + layout */
  --page-max:    1160px;
  --prose-max:   680px;
  --section-gap: clamp(72px, 12vw, 120px);
  --card-pad:    clamp(20px, 4vw, 28px);
  --gutter:      clamp(20px, 5vw, 40px);

  /* Radii - pill for interactive, 16px for cards, 6px for small chips */
  --radius-card:  16px;
  --radius-chip:  6px;
  --radius-pill:  999px;

  /* Elevation - inset frost highlight + soft inner glow + cool dark halo */
  --elev-card:
    inset 0 1px 1px rgba(199, 211, 234, 0.12),
    inset 0 24px 48px rgba(199, 211, 234, 0.05),
    0 24px 32px rgba(6, 6, 14, 0.7);
  --elev-panel:
    inset 0 1px 1px rgba(216, 236, 248, 0.2),
    inset 0 24px 48px rgba(168, 216, 245, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.05rem, 18px);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--mint-bright); }

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

/* --------------------------------------------------------------------------
   3. Ambient background: blueprint grid + mint halo
   Both are pure CSS. No image files, no requests.
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 25%, transparent 78%);
          mask-image: radial-gradient(ellipse 120% 70% at 50% 0%, #000 25%, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  top: -180px;
  left: 50%;
  width: min(1200px, 150vw);
  height: 620px;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, var(--mint-glow) 0%, transparent 62%);
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--mint);
  color: var(--mint-ink);
  border-radius: 0 0 var(--radius-chip) 0;
  font-weight: 600;
  z-index: 10;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-gap); }
.section--tight { padding-block: calc(var(--section-gap) * 0.6); }

.prose { max-width: var(--prose-max); }
.center { text-align: center; margin-inline: auto; }

.divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--hairline) 20%, var(--hairline) 80%, transparent);
}

/* --------------------------------------------------------------------------
   5. Typography
   -------------------------------------------------------------------------- */
.wordmark {
  font-size: clamp(3.6rem, 17vw, 8.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
  background: var(--gradient-display);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  padding-block: 0.06em;   /* stops descenders clipping in the gradient fill */
}

.h-lead {
  font-size: clamp(1.5rem, 5.2vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text-heading);
}

.h-section {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.032em;
  color: var(--text-heading);
}

.h-card {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

.lede {
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-muted);
}

.muted  { color: var(--text-muted); }
.helper { color: var(--text-helper); font-size: 0.9375rem; }

.stack > * + *   { margin-top: 20px; }
.stack-sm > * + * { margin-top: 10px; }

/* Eyebrow: monospace caps flanked by fading hairlines */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline));
}
.eyebrow::after { background: linear-gradient(90deg, var(--hairline), transparent); }
.eyebrow--left { justify-content: flex-start; }
.eyebrow--left::before { display: none; }

/* --------------------------------------------------------------------------
   6. Buttons - every interactive element is a pill
   -------------------------------------------------------------------------- */
.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btns--center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: var(--mint);
  color: var(--mint-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 34px rgba(79, 227, 171, 0.16);
}
.btn--primary:hover { background: var(--mint-bright); color: var(--mint-ink); }

.btn--ghost {
  background: rgba(186, 214, 247, 0.06);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn--ghost:hover { background: var(--surface-hover); color: #ffffff; }

/* Inline text link with a mint underline */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  border-bottom: 1px solid var(--mint-soft);
  padding-bottom: 2px;
}
.link-arrow:hover { border-bottom-color: var(--mint); }

/* --------------------------------------------------------------------------
   7. Header + footer
   -------------------------------------------------------------------------- */
.site-head {
  position: relative;
  z-index: 2;
  padding-block: 22px;
}
.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.brand:hover { color: #ffffff; }
.brand__mark { width: 22px; height: 22px; flex: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.site-nav a:hover { background: rgba(186, 214, 247, 0.06); color: #ffffff; }

.site-foot {
  margin-top: var(--section-gap);
  padding-block: 44px 56px;
  border-top: 1px solid var(--hairline);
}
.site-foot__tag {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.site-foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 0.9375rem;
  margin-bottom: 22px;
}
.site-foot__links .sep { color: var(--hairline-strong); }
.site-foot__copy { font-size: 0.875rem; color: var(--text-helper); }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(56px, 12vw, 104px) clamp(56px, 10vw, 96px);
  text-align: center;
}
.hero__tag {
  margin: 22px auto 0;
  max-width: 34ch;
  font-size: clamp(1.375rem, 5vw, 2rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--text-heading);
}
.hero__body {
  margin: 26px auto 0;
  max-width: 52ch;
  font-size: clamp(1.0625rem, 2.4vw, 1.1875rem);
  line-height: 1.68;
  color: var(--text-muted);
}
.hero .btns { margin-top: 38px; }

/* --------------------------------------------------------------------------
   9. Cards + grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  padding: var(--card-pad);
  border-radius: var(--radius-card);
  background: var(--surface-glass);
  box-shadow: var(--elev-card);
}
.card__title { margin-bottom: 8px; }
.card__body { color: var(--text-muted); font-size: 0.9875rem; line-height: 1.6; }

/* Circular frosted icon tile with a line-art mint glyph */
.tile {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: rgba(186, 214, 247, 0.06);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.tile svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Feature block: larger card used on the CLEAN CAM page */
.feature { display: flex; gap: 18px; align-items: flex-start; }
.feature .tile { margin-bottom: 0; }
.feature__text { flex: 1; min-width: 0; }

/* Panel: the highest-elevation surface, used for callouts */
.panel {
  padding: clamp(26px, 5vw, 40px);
  border-radius: var(--radius-card);
  background: rgba(5, 6, 15, 0.97);
  box-shadow: var(--elev-panel);
}

/* Small chip */
.chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--radius-chip);
  background: rgba(199, 211, 234, 0.12);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-body);
}

/* --------------------------------------------------------------------------
   10. Screenshot placeholder (CLEAN CAM page)
   -------------------------------------------------------------------------- */
.shots {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.shot {
  position: relative;
  aspect-ratio: 9 / 18;
  border-radius: var(--radius-card);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(186, 215, 247, 0.035) 0 10px,
      transparent 10px 20px
    ),
    var(--surface-glass);
  box-shadow: inset 0 0 0 1px var(--hairline);
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
}
.shot__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-helper);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. Long-form prose (privacy policy)
   -------------------------------------------------------------------------- */
.doc { max-width: var(--prose-max); }
.doc h2 {
  margin-top: 44px;
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}
.doc p { margin-bottom: 16px; color: var(--text-muted); }
.doc ul { margin: 0 0 16px; }
.doc li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.doc li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--mint);
}
.doc strong { color: var(--text-heading); font-weight: 600; }

/* --------------------------------------------------------------------------
   12. Responsive - mobile first, widening upward
   -------------------------------------------------------------------------- */
@media (min-width: 620px) {
  .grid--2,
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .shots   { grid-template-columns: repeat(3, 1fr); }
  .btn     { padding: 15px 30px; }
}

@media (min-width: 900px) {
  .grid    { gap: 20px; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  /* .grid--4 is declared last so it wins over .grid--2 at equal specificity */
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------------------------
   13. Motion + print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
  .site-head, .site-foot, .btns { display: none; }
  .doc h2, .doc p, .doc li, .h-section { color: #000; }
}

/* --------------------------------------------------------------------------
   14. Page-specific display sizes
   -------------------------------------------------------------------------- */
.wordmark--app {
  font-size: clamp(2.75rem, 12vw, 6rem);
  letter-spacing: -0.035em;
}
