/* ============================================================
   Team of Silicons — landing picker (root /)
   Minimal: centered title + question + 5 tiles, with ambient warmth
   ============================================================ */

:root {
  --bg: #ede8e0;
  --bg-2: #e5e0d7;
  --bg-3: #f4efe7;
  --fg: #1a1a1a;
  --fg-muted: #5a5a5a;
  --fg-dim: #8b8b8b;
  --border: #d4cfc7;
  --border-soft: #e2ddd4;
  --terminal-bg: #1a1a1a;
  --terminal-fg: #ede8e0;
  --green: #5a9a6b;
  --transition: 0.22s ease;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --c-tech:    #2e6f8e;
  --c-growth:  #b96a3a;
  --c-ops:     #5a7d5a;
  --c-finance: #a06c2a;
  --c-revenue: #7a4d8e;

  --page-pad: clamp(20px, 4vw, 56px);
  --nav-h:    clamp(54px, 5.5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

*:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

/* Clip horizontal overflow on BOTH html and body — body's overflow-x:hidden
   alone doesn't always suppress the html-level scrollbar when an absolutely
   positioned child (e.g. the ambient orbs) extends past the viewport. */
html, body { height: 100%; max-width: 100%; overflow-x: clip; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  position: relative;
  overflow-y: auto;
}

/* ---------- Site head ---------- */
.site-head {
  height: var(--nav-h);
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 5;
  animation: head-in 0.5s ease both;
}

@keyframes head-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(13px, 1vw, 15px);
}
.site-logo img {
  display: block;
  width: 26px;
  height: 26px;
  background: var(--terminal-bg);
  padding: 3px;
}

/* ---------- Shell — vertically centered hero + grid ---------- */
.picker-shell {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 40px) var(--page-pad);
  gap: clamp(20px, 4vh, 48px);
  position: relative;
  z-index: 1;
}

/* Ambient warm orbs — barely-there atmosphere. Capped to viewport width
   minus the visible offset so they never push the page wider than 100vw. */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  max-width: 100vw;
}
.bg-orb-a {
  width: min(540px, 95vw); height: min(540px, 95vw);
  background: radial-gradient(circle, rgba(46, 111, 142, 0.18), transparent 70%);
  top: -140px; left: -140px;
}
.bg-orb-b {
  width: min(620px, 95vw); height: min(620px, 95vw);
  background: radial-gradient(circle, rgba(122, 77, 142, 0.13), transparent 70%);
  bottom: -200px; right: -180px;
}

/* ---------- Hero ---------- */
.picker-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 1.6vw, 22px);
  max-width: 780px;
  animation: hero-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: 100ms;
  position: relative;
  z-index: 1;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.picker-title {
  font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--fg);
  position: relative;
}
.picker-title::after {
  content: "";
  display: block;
  width: clamp(36px, 3.4vw, 48px);
  height: 2px;
  background: var(--fg);
  margin: clamp(10px, 1.2vw, 16px) auto 0;
  border-radius: 2px;
}

.picker-question {
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 58ch;
}

/* ---------- Niche grid: 3 in row 1, 2 in row 2 ---------- */
.niche-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 1.6vw, 22px);
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1120px;
  position: relative;
  z-index: 1;
}

.niche-tile {
  --accent: var(--fg);
  flex: 0 1 calc(33.333% - clamp(14px, 1.6vw, 22px) * 2 / 3);
  min-width: 240px;
  min-height: clamp(140px, 20vh, 220px);
  padding: clamp(16px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 22px);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color var(--transition),
              box-shadow 0.32s ease;
  opacity: 0;
  animation: tile-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms + 280ms);
}

/* Accent vertical bar on the left edge — fills in on hover */
.niche-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.42s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* Soft accent wash — bleeds in from the top-right */
.niche-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--accent), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.niche-tile:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 28px 60px -30px rgba(0, 0, 0, 0.34);
}
.niche-tile:hover::before { transform: scaleY(1); }
.niche-tile:hover::after  { opacity: 0.08; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tile-icon {
  width: clamp(54px, 5vw, 68px);
  height: clamp(54px, 5vw, 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  color: var(--accent);
  border: 1px solid var(--border-soft);
  font-size: clamp(28px, 2.8vw, 34px);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 1;
}
.niche-tile:hover .tile-icon {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: scale(1.06) rotate(-2deg);
}

.tile-name {
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fg);
  text-align: center;
  padding: 0 16px;
  z-index: 1;
  transition: color var(--transition);
}

/* Stagger keys (CSS-only, in case JS is disabled). */
.niche-tile:nth-child(1) { --i: 0; }
.niche-tile:nth-child(2) { --i: 1; }
.niche-tile:nth-child(3) { --i: 2; }
.niche-tile:nth-child(4) { --i: 3; }
.niche-tile:nth-child(5) { --i: 4; }

/* Responsive — 2 per row on medium, 1 per row on small */
@media (max-width: 880px) {
  .niche-tile {
    flex: 0 1 calc(50% - clamp(14px, 1.6vw, 22px) / 2);
    min-height: clamp(120px, 16vh, 180px);
  }
}

@media (max-width: 540px) {
  .niche-tile {
    flex: 0 1 100%;
    min-width: 0;
    min-height: 88px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 18px;
  }
  .tile-icon { width: 44px; height: 44px; font-size: 22px; }
  .tile-name { text-align: left; padding: 0; }
}

/* ---------- Site foot ---------- */
.site-foot {
  padding: 14px var(--page-pad) clamp(14px, 2.5vw, 22px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 5;
}

.site-foot-label {
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.email-copy {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 5px 11px;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.email-copy:hover {
  background: var(--terminal-bg);
  color: var(--terminal-fg);
  border-color: var(--terminal-bg);
}

.email-icon { font-size: 13px; opacity: 0.7; }

.site-foot-flash {
  position: absolute;
  right: var(--page-pad);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.site-foot-flash.is-on {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
  /* Footer collapses to one full-width email chip on mobile — the
     "mail us at" prefix isn't worth the space, and the separate "copied"
     flash text is replaced by the in-button icon swap (ph-copy → ph-check). */
  .site-foot { padding: 12px 16px 16px; gap: 6px; }
  .site-foot-label, .site-foot-flash { display: none; }
  .site-foot .email-copy {
    flex: 1;
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13px;
  }
  .site-foot .email-copy.copied {
    background: var(--terminal-bg);
    color: var(--terminal-fg);
    border-color: var(--terminal-bg);
  }
}
