/* Tellectra AI — base: reset, ambient background, type, layout helpers. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on;
}

/* Ambient light behind the glass. Fixed so cards always have something to blur. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vmax 50vmax at 8% -8%, var(--bg-ambient-1), transparent 60%),
    radial-gradient(46vmax 40vmax at 100% 6%, var(--bg-ambient-2), transparent 62%),
    radial-gradient(60vmax 46vmax at 70% 110%, var(--bg-ambient-3), transparent 60%),
    var(--bg);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 720; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
code, kbd, pre, .mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; }
code { font-size: 0.88em; background: var(--sunken); padding: 0.12em 0.4em; border-radius: 6px; }
/* Watermarks: a row of houses along the bottom and one large roof edge top-right.
   Both are drawn with the page background so they never compete with content. */
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: clamp(120px, 20vh, 210px);
  z-index: -1;
  pointer-events: none;
  background: var(--wm);
  -webkit-mask: url("../img/watermark-houses.svg") center bottom / auto 100% repeat-x;
  mask: url("../img/watermark-houses.svg") center bottom / auto 100% repeat-x;
}
html::before {
  content: "";
  position: fixed;
  right: -40px;
  top: -30px;
  width: min(520px, 46vw);
  aspect-ratio: 640 / 420;
  z-index: -1;
  pointer-events: none;
  background: var(--wm);
  opacity: 0.75;
  -webkit-mask: url("../img/watermark-roof.svg") center / contain no-repeat;
  mask: url("../img/watermark-roof.svg") center / contain no-repeat;
}

::selection { background: var(--brand-soft); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 1000;
  background: var(--solid); color: var(--ink); padding: 10px 16px;
  border-radius: var(--r-sm); box-shadow: var(--shadow-2);
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* Layout helpers */
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.right { text-align: right; }
.center { text-align: center; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.ico { width: 1.25em; height: 1.25em; flex: none; }
