/* ============================================================================
   Fauxmous — public brand site CSS
   Palette: teal #16b3c0 / gold #cba35a / black #15110f
   Art direction: Cubist / Dada / Matisse — bold, angular, loud.
   Self-contained, no external calls, no build step.
   ============================================================================ */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; font-size: 16px; scroll-behavior: smooth; }

/* ---- Palette tokens ---- */
:root {
  /* surfaces */
  --bg:        #15110f;
  --panel:     #1d1814;
  --panel-2:   #261e18;
  --panel-3:   #130f0c;
  /* borders */
  --border:    #3a2f26;
  --border-2:  #4c3c30;
  /* text */
  --text:      #f3ece2;
  --muted:     #b4a695;
  --faint:     #80715f;
  /* brand */
  --teal:      #16b3c0;
  --teal-2:    #56cdd7;
  --teal-dim:  rgba(22,179,192,0.14);
  --gold:      #cba35a;
  --gold-2:    #e6cc92;
  --gold-dim:  rgba(203,163,90,0.16);
  /* semantic */
  --link:      #56cdd7;
  /* display font stack — matches cubist.css --fx-disp */
  --font-disp: "Helvetica Neue", Helvetica, "Arial Black", Arial, system-ui, sans-serif;
  --font-body: -apple-system, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(22,179,192,0.28); color: var(--text); }

/* ============================================================================
   SHARD CANVAS — fixed SVG background (same motif as base.html's fx-shards,
   scaled up for marketing boldness)
   ============================================================================ */
.fx-shards {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================================
   TOPBAR — angular clip, gold underline, identical structural DNA to app topbar
   ============================================================================ */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  height: 58px;
  background: var(--panel);
  border-bottom: 2px solid var(--gold);
  /* same clip as cubist topbar */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 7% 100%, calc(7% - 20px) calc(100% - 9px), 0 100%);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-disp);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-brand:hover { text-decoration: none; color: var(--text); }
.site-brand svg { display: block; width: 28px; height: 28px; }

.topbar-spacer { flex: 1; }

.site-topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-topbar-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 12px;
  transition: color 140ms;
}
.site-topbar-nav a:hover { color: var(--text); text-decoration: none; }

/* ============================================================================
   HERO — full-viewport, Cubist two-column composition
   ============================================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 80px 28px 100px;
  overflow: hidden;
}

/* Large decorative shard behind the hero type — pure CSS, no image */
.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -120px;
  width: 680px;
  height: 680px;
  background: var(--teal);
  opacity: 0.045;
  clip-path: polygon(30% 0%, 100% 14%, 85% 72%, 48% 100%, 0% 68%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 420px;
  height: 420px;
  background: var(--gold);
  opacity: 0.06;
  clip-path: polygon(0% 22%, 62% 0%, 100% 48%, 74% 100%, 12% 88%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  width: 100%;
}

/* Gold kicker line — mirrors the cubist eyebrow treatment */
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero-kicker::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 2px;
  background: var(--gold);
  transform: skewX(-26deg);
}

/* Display wordmark — maximum weight, maximum size */
.hero-title {
  font-family: var(--font-disp);
  font-size: clamp(3.5rem, 10vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--text);
  margin-bottom: 0;
  /* Cubist angular slice on the text block itself via a decorative pseudo on the wrapper */
}

/* Teal accent rule below the title — a Dada-ish horizontal slice */
.hero-rule {
  display: block;
  width: 100%;
  max-width: 520px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--gold) 55%, transparent 100%);
  transform: skewX(-8deg);
  margin: 22px 0 30px;
}

.hero-tagline {
  font-family: var(--font-disp);
  font-size: clamp(1.5rem, 3.8vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 28px;
}

/* Teal highlight within tagline */
.hero-tagline .hl-teal { color: var(--teal); }
.hero-tagline .hl-gold { color: var(--gold); }

.hero-body {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 44px;
}

/* CTA group */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Primary CTA — angular gold button, mirrors cubist .newbtn */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #1a1206;
  font-family: var(--font-disp);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 13px 28px;
  text-decoration: none;
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: filter 140ms, transform 140ms;
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  color: #1a1206;
  text-decoration: none;
}
.btn-primary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

/* Secondary link CTA */
.btn-ghost-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 140ms;
}
.btn-ghost-link:hover { color: var(--text); text-decoration: none; }

/* ============================================================================
   HERO — portrait column (right side of two-column hero layout)
   ============================================================================ */

/* The portrait stack: primary large + two smaller accent images overlapping */
.hero-portrait {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}

.portrait-stack {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
}

/* Primary portrait — angular crop, teal tint (mirrors cubist.css filter) */
.portrait-main {
  position: absolute;
  top: 0;
  right: 0;
  width: 82%;
  aspect-ratio: 1;
  clip-path: polygon(0 6%, 100% 0, 100% 88%, 18% 100%, 0 92%);
  overflow: hidden;
}
.portrait-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.3) sepia(0.2) hue-rotate(150deg) saturate(1.3) contrast(1.04);
}

/* Accent portrait — bottom-left, gold-tinted, slight rotation */
.portrait-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36%;
  aspect-ratio: 1;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
  overflow: hidden;
  box-shadow: 4px 4px 0 2px rgba(203,163,90,0.35);
}
.portrait-accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* gold tint for contrast against the teal main */
  filter: grayscale(0.4) sepia(0.5) hue-rotate(10deg) saturate(1.2) contrast(1.02);
}

/* Ghost portrait — top-left overlap, very subtle */
.portrait-ghost {
  position: absolute;
  top: 12%;
  left: 2%;
  width: 26%;
  aspect-ratio: 1;
  clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%);
  overflow: hidden;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}
.portrait-ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gold corner-shard accent on the portrait block — mirrors cubist .stat::after */
.portrait-stack::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 36px 36px 0;
  border-style: solid;
  border-color: transparent var(--gold) transparent transparent;
  z-index: 2;
  pointer-events: none;
}

/* Teal shard ornament: bottom-left of portrait block */
.portrait-stack::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 8%;
  width: 60px;
  height: 4px;
  background: var(--teal);
  transform: skewX(-20deg);
  z-index: 2;
}

/* Screen reader only (utility) */
.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;
}

/* Portrait column responsive handled in the global @media blocks below */

/* ============================================================================
   STATEMENT SECTION — the one evocative paragraph below the fold
   ============================================================================ */
.statement-section {
  padding: 100px 28px;
  position: relative;
  overflow: hidden;
}

/* Left angular stripe accent */
.statement-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--teal) 0%, var(--gold) 100%);
  transform: skewY(-4deg);
}

.statement-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

.statement-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 2;
}

/* Angular shard ornament left of label */
.statement-label::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: var(--gold);
  transform: skewX(-20deg);
  margin-bottom: 12px;
}

.statement-pillars {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.pillar {
  border-left: 3px solid var(--border);
  padding-left: 20px;
  position: relative;
  transition: border-color 220ms;
}
.pillar::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 40px;
  background: var(--teal);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}
.pillar:nth-child(2)::before { background: var(--gold); }
.pillar:nth-child(3)::before { background: var(--teal-2); }

.pillar-title {
  font-family: var(--font-disp);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.pillar-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 46ch;
}

/* ============================================================================
   MARK DISPLAY — large brand mark, full-bleed Dada composition
   ============================================================================ */

/* ============================================================================
   FOOTER
   ============================================================================ */
.site-footer {
  padding: 44px 28px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-disp);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  text-decoration: none;
}
.footer-brand:hover { text-decoration: none; color: var(--text); }
.footer-brand svg { width: 20px; height: 20px; display: block; }

.footer-copy {
  font-size: 0.78rem;
  color: var(--faint);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 4px 10px;
  transition: color 140ms;
}
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-links .sep {
  color: var(--faint);
  font-size: 0.7rem;
  padding: 0 2px;
}

/* ============================================================================
   LEGAL PAGES — clean document layout
   ============================================================================ */
.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  height: 54px;
  background: var(--panel);
  border-bottom: 2px solid var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 7% 100%, calc(7% - 20px) calc(100% - 9px), 0 100%);
}

.legal-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-disp);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  text-decoration: none;
}
.legal-topbar-brand:hover { text-decoration: none; color: var(--text); }
.legal-topbar-brand svg { width: 22px; height: 22px; display: block; }

.legal-topbar-back {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 140ms;
}
.legal-topbar-back:hover { color: var(--text); text-decoration: none; }

/* Document body */
.legal-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 56px 28px 100px;
}

.legal-eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.legal-eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transform: skewX(-26deg);
}

.legal-title {
  font-family: var(--font-disp);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 10px;
}

.legal-updated {
  font-size: 0.82rem;
  color: var(--faint);
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* Content body — readable measure */
.legal-body h2 {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 40px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-body h2::after {
  content: "";
  flex: 1;
  height: 2px;
  transform: skewX(-24deg);
  background: linear-gradient(90deg, var(--gold), transparent);
}

.legal-body p,
.legal-body li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
}
.legal-body p { margin-bottom: 12px; }
.legal-body p:last-child { margin-bottom: 0; }

.legal-body ul,
.legal-body ol {
  padding-left: 24px;
  margin-bottom: 12px;
}
.legal-body li { margin-bottom: 8px; }
.legal-body li:last-child { margin-bottom: 0; }

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

.legal-body a { color: var(--link); }
.legal-body a:hover { color: var(--gold-2); }

/* Placeholder block — clearly marked, easy to replace */
.legal-placeholder {
  border: 2px dashed var(--border-2);
  padding: 28px 24px;
  margin: 20px 0;
  background: var(--panel-3);
  /* angular cut on placeholder so it reads as brand-aware, not raw dev */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.legal-placeholder-label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.legal-placeholder p {
  font-size: 0.82rem;
  color: var(--faint);
  line-height: 1.6;
  margin: 0;
}

/* Draft banner — gold-tinted notice; stays visible until counsel sign-off */
.draft-banner {
  background: rgba(203,163,90,0.10);
  border: 1px solid rgba(203,163,90,0.32);
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  margin-bottom: 32px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.draft-banner strong { color: var(--gold); font-weight: 700; }
.draft-banner p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* Sub-section headings within legal body (### level in markdown) */
.legal-body h3 {
  font-family: var(--font-disp);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 28px 0 8px;
}

/* code within legal body */
.legal-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82em;
  color: var(--teal-2);
  background: rgba(22,179,192,0.10);
  padding: 1px 5px;
  border-radius: 2px;
}

/* Legal footer nav */
.legal-footer-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.legal-footer-nav a {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 4px 10px;
  transition: color 140ms, background 140ms;
  border-radius: 2px;
}
.legal-footer-nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.legal-footer-nav .sep { color: var(--faint); font-size: 0.7rem; padding: 0 2px; }
.legal-footer-nav a[aria-current="page"] { color: var(--teal); }

/* ============================================================================
   MOTION
   ============================================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shard-drift { 0% { transform: translateY(0) rotate(0deg); } 100% { transform: translateY(-18px) rotate(1.5deg); } }

.hero-inner { animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-kicker { animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both; }

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

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Tablet / medium: collapse hero to single column */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding: 60px 28px 80px;
  }
  .hero-portrait {
    justify-content: center;
    order: -1; /* portrait above text on smaller screens */
  }
  .portrait-stack {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* Narrow / mobile */
@media (max-width: 680px) {
  .site-topbar { padding: 0 16px; gap: 12px; }
  .hero { padding: 44px 16px 64px; }
  .statement-section { padding: 64px 16px; }
  .statement-inner { grid-template-columns: 1fr; gap: 36px; }
  .statement-label { display: none; } /* drop sidebar label on mobile */
  .site-footer { padding: 32px 16px 40px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .legal-wrap { padding: 36px 16px 72px; }
  .legal-topbar { padding: 0 16px; }
}

/* Small phones */
@media (max-width: 480px) {
  .site-topbar-nav { display: none; } /* minimal chrome on very narrow */
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn-primary { width: 100%; justify-content: center; }
  .portrait-stack { max-width: 260px; }
  .portrait-ghost { display: none; } /* simplify on tiny screens */
}


/* ===== Hero portrait: facet assembly on load ===== */
/* Shard layer sits inside .portrait-main; each shard is the full portrait
   clipped to one painted facet, faded in (scatter) on load, then the crisp
   <img> takes over and the layer is removed. Filter mirrors .portrait-main img. */
.portrait-main .fx-asm { position: absolute; inset: 0; z-index: 1;
  filter: grayscale(0.3) sepia(0.2) hue-rotate(150deg) saturate(1.3) contrast(1.04); }
.portrait-main .fx-asm-shard { position: absolute; inset: 0;
  background-size: cover; background-position: center; opacity: 0; will-change: opacity;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.portrait-main.fx-assembling img { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .portrait-main .fx-asm { display: none; }
  .portrait-main.fx-assembling img { opacity: 1; }
}

/* ===== Scroll-driven brand mark (left of "what we build") ===== */
.statement-side { position: relative; }
.statement-mark {
  position: sticky; top: 120px; margin-top: 28px;
  width: 100%; max-width: 230px; aspect-ratio: 1 / 1;
}
.statement-mark svg { width: 100%; height: 100%; overflow: visible; }
.statement-mark .frag { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .statement-mark .frag { opacity: 1; } }
@media (max-width: 720px) {
  .statement-mark { position: static; max-width: 150px; margin: 0 auto 8px; }
}
