/* ============================================================================
   BrickWorks.app — one-page site
   Brand-matched to the app: lavender #9370db · teal #008080 · ink #26203a
   Studs motif: 2×4 brick dots via radial gradients. No frameworks.
============================================================================ */
:root {
  --lavender: #9370db;
  --lavender-deep: #7a55c7;
  --lavender-soft: #b9a1ec;
  --lavender-mist: #f3eefb;
  --teal: #008080;
  --teal-deep: #005f5f;
  --teal-mist: #e6f5f5;
  --ink: #26203a;
  --ink-soft: #6b6480;
  --paper: #ffffff;
  --bg: #f6f4fa;
  --line: #e7e2f0;
  --yellow: #ffcf00;
  --red: #d6455d;
  --shadow: 0 10px 40px rgba(60, 40, 110, 0.16);
  --radius: 18px;
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

/* ------------------------------------------------------------- decorations */
/* The 2×4 stud row — BrickWorks' signature. */
.studs, .strip-free::before {
  content: '';
  display: block;
  height: 18px;
  background-image: radial-gradient(circle at 9px 9px, rgba(147, 112, 219, 0.16) 7px, transparent 8px);
  background-size: 44px 18px;
  background-position: center top;
}

/* ------------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(246, 244, 250, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-name strong { color: var(--lavender-deep); }
.brick-logo {
  width: 34px; height: 34px; border-radius: 8px;
  background:
    radial-gradient(circle at 28% 28%, var(--bg) 4.5px, transparent 5px),
    radial-gradient(circle at 72% 28%, var(--bg) 4.5px, transparent 5px),
    radial-gradient(circle at 28% 72%, var(--bg) 4.5px, transparent 5px),
    radial-gradient(circle at 72% 72%, var(--teal) 4.5px, transparent 5px),
    var(--lavender);
  box-shadow: 0 3px 10px rgba(60, 40, 110, 0.3);
  transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1);
  cursor: pointer;
}
.brand:hover .brick-logo { transform: rotate(-8deg) scale(1.08); }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--lavender-deep); }
.nav-donate { color: var(--red) !important; }
.nav-cta { margin-left: 8px; white-space: nowrap; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  border-radius: 999px; border: 2px solid transparent;
  padding: 11px 22px; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--lavender-deep) 100%);
  color: #fff; box-shadow: 0 6px 20px rgba(122, 85, 199, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(122, 85, 199, 0.5); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { border-color: var(--lavender-soft); color: var(--lavender-deep); }
.btn-big { padding: 15px 28px; font-size: 1.05rem; }

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) clamp(16px, 4vw, 48px) clamp(24px, 4vw, 48px);
}
.kicker {
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 10px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: 1.03;
  letter-spacing: -0.03em; margin-bottom: 18px;
}
.grad {
  background: linear-gradient(120deg, var(--lavender-deep) 20%, var(--teal) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 34em; margin-bottom: 26px; }
.lede strong { color: var(--ink); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.badges li { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }

/* the embedded live app in a browser frame */
.browser {
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); background: var(--paper);
  /* Deliberate tilt — enough that it reads as design, not a crooked screen. */
  transform: rotate(1.2deg);
}
.browser-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: linear-gradient(var(--lavender-mist), var(--paper));
  border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: var(--yellow); } .dot.green { background: #28c840; }
.browser-url {
  margin-left: 10px; font-size: 0.78rem; color: var(--ink-soft);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 14px; font-family: ui-monospace, monospace;
}
.browser iframe { width: 100%; height: 620px; border: 0; display: block; background: #fff; }
.browser-note { font-size: 0.85rem; color: var(--ink-soft); text-align: center; margin-top: 12px; }

/* ------------------------------------------------------------------ strips */
.strip { padding: 0 clamp(16px, 4vw, 48px); }
.strip-free { margin: 26px 0 0; }
.strip-free::before { margin-bottom: 20px; }
.strip-inner {
  max-width: 1180px; margin: 0 auto;
  background: linear-gradient(135deg, var(--lavender-deep), var(--teal-deep));
  color: #fff; border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px) clamp(22px, 4vw, 44px);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px;
  box-shadow: var(--shadow);
}
.strip-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; }
.strip-inner span:last-child { font-size: clamp(0.98rem, 1.6vw, 1.12rem); opacity: 0.95; }

/* ------------------------------------------------------------------ stats */
.stats {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(34px, 5vw, 56px) clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.stat { text-align: center; padding: 18px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1;
  background: linear-gradient(120deg, var(--lavender-deep), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }

/* ------------------------------------------------------------------ sections */
.section { max-width: 1180px; margin: 0 auto; padding: clamp(44px, 7vw, 90px) clamp(16px, 4vw, 48px); }
.section-alt {
  max-width: none; background: var(--lavender-mist);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2, .donate-card h2, .built-copy h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.12;
  margin-bottom: 12px;
}
.section-lede { color: var(--ink-soft); font-size: 1.05rem; }

/* ------------------------------------------------------------- features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: 0 2px 10px rgba(60, 40, 110, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--lavender-soft); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.35rem; background: var(--lavender-mist); margin-bottom: 14px;
  border: 1px solid var(--line);
}
.feature h3 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature p { color: var(--ink-soft); font-size: 0.94rem; }

.printer-strip {
  margin-top: clamp(28px, 4vw, 44px); text-align: center;
  padding: 22px; background: var(--paper); border: 1.5px dashed var(--lavender-soft);
  border-radius: var(--radius);
}
.printer-title { font-weight: 700; color: var(--ink-soft); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.printer-models { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin: 6px 0 4px; }
.printer-note { color: var(--ink-soft); font-size: 0.9rem; }

/* ------------------------------------------------------------------ steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.step {
  display: grid; grid-template-columns: 56px 1fr; grid-template-areas: 'num body' 'pic pic';
  gap: 6px 16px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.step-num {
  grid-area: num; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 14px 12px, rgba(255,255,255,0.5) 4px, transparent 5px),
              radial-gradient(circle at 32px 12px, rgba(255,255,255,0.5) 4px, transparent 5px),
              linear-gradient(135deg, var(--lavender), var(--lavender-deep));
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(122, 85, 199, 0.35);
}
.step-body { grid-area: body; }
.step h3 { font-family: var(--font-display); font-size: 1.12rem; margin-bottom: 4px; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }

/* --------------------------------------------------------- photo slots */
.photo-slot {
  grid-area: pic; margin-top: 14px;
  min-height: 170px; border-radius: 14px;
  display: grid; place-items: center; text-align: center;
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
  border: 2px dashed var(--lavender-soft);
  background-image: radial-gradient(circle, rgba(147, 112, 219, 0.09) 6px, transparent 7px);
  background-size: 34px 34px; background-position: center;
}
.photo-slot small { font-weight: 500; opacity: 0.8; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.photo-slot.filled { border: 0; padding: 0; min-height: 0; background: none; }
.photo-slot.filled img { width: 100%; height: 100%; object-fit: cover; }
.photo-portrait { min-height: 220px; }

/* ------------------------------------------------------------------ built */
.crew { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.person {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--lavender-soft); }
.person h3 { font-family: var(--font-display); font-size: 1.12rem; margin: 14px 0 6px; letter-spacing: -0.01em; }
.person-chip {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--teal-deep); background: var(--teal-mist); border-radius: 999px; padding: 3px 12px;
}
.person-chip-ai { color: var(--lavender-deep); background: var(--lavender-mist); }
.photo-avatar { min-height: 150px; max-width: 150px; margin: 0 auto; border-radius: 50% !important; overflow: hidden; }
.photo-avatar.filled { min-height: 150px; width: 150px; height: 150px; max-width: 150px; margin: 0 auto; }
.photo-avatar img { border-radius: 50% !important; width: 100%; height: 100%; object-fit: cover; }
.ai-avatar {
  width: 150px; height: 150px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 3rem;
  background: linear-gradient(135deg, var(--lavender-mist), var(--teal-mist));
  border: 2px dashed var(--lavender-soft);
}

/* ----------------------------------------------------------------- donate */
.section-donate { text-align: center; }
.donate-card {
  max-width: 640px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(30px, 5vw, 52px); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.donate-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 14px;
  background-image: radial-gradient(circle at 8px 7px, rgba(214, 69, 93, 0.25) 5px, transparent 6px);
  background-size: 38px 14px;
}
.donate-card h2 { margin-top: 10px; }
.donate-card > p { color: var(--ink-soft); margin: 10px 0 24px; }
.donate-bricks { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.mini-brick { width: 30px; height: 22px; border-radius: 5px; box-shadow: 0 3px 8px rgba(60, 40, 110, 0.2); }
.mini-brick::before { content: ''; display: block; height: 100%;
  background-image: radial-gradient(circle at 9px 7px, rgba(255,255,255,0.55) 3.5px, transparent 4px),
    radial-gradient(circle at 21px 7px, rgba(255,255,255,0.55) 3.5px, transparent 4px);
}
.lb1 { background: var(--lavender); } .lb2 { background: var(--teal); } .lb3 { background: var(--yellow); }
.donate-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 12px; }

/* ----------------------------------------------------------------- footer */
.footer { background: var(--ink); color: #cfc9e0; margin-top: 40px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 48px) 28px;
  display: grid; gap: 18px;
}
.footer .brand-name, .footer .brand { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #cfc9e0; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.footer-links a:hover { color: var(--lavender-soft); }
.legal { font-size: 0.78rem; line-height: 1.6; color: #9d95b8; max-width: 60em; }
.copyright { font-size: 0.82rem; color: #cfc9e0; }

/* ------------------------------------------------------------ reveal fx */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ stud rain */
.rain-stud {
  position: fixed; top: -30px; z-index: 999; pointer-events: none;
  width: 22px; height: 16px; border-radius: 4px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(var(--spin, 540deg)); opacity: 0.9; }
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-app { order: 2; }
  .browser iframe { height: 480px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .crew { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .steps { grid-template-columns: 1fr; }
  .crew { grid-template-columns: 1fr; }
  .photo-avatar, .ai-avatar { margin: 0 auto; }
  .browser iframe { height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .brand:hover .brick-logo { transform: none; }
}
