/* Landing page. One job: get somebody to run a count and hand over an email.
   Everything that is not that is deliberately quiet. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* The Moxy ground. fixed so the gradient belongs to the page rather than
     scrolling away and leaving bare white under a long chip list. */
  background: var(--grad);
  background-attachment: fixed;
  color: var(--on-grad);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.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;
}

.ambient { display: none; }
/* A faint grid reads as instrumentation rather than decoration. */
.grid-veil { display: none; }

/* --- chrome ------------------------------------------------------------ */

.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px clamp(16px, 4vw, 40px);
}
/* Shape is theme.css's — every page has this link. What is landing-specific is
   the minimum width: here the wordmark abbreviates to "PSI" on a narrow phone,
   which left a 24px-wide target. */
.brand { min-width: 44px; padding-right: 6px; }
.mark {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  /* White on the gradient. The old crimson-to-navy mark was invisible against a
     crimson-to-navy page — it read as a dark smudge. */
  background: var(--on-grad);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.brand-text { font-weight: 600; letter-spacing: -0.01em; }

/* .topbar-actions is theme.css's — it owns the scrolling one-row behaviour and
   the rule that hides this bar on a phone, where the same five destinations are
   already in the tab bar at the bottom. The copy that used to sit here said
   only `display: flex`, but it loads after theme.css at equal specificity, so
   it beat that `display: none` and left the landing page with two navs and a
   wordmark crushed to 24px between them.

   .ghost-btn below is a real override: white on the gradient, where theme's
   navy-on-white version is invisible. */
.ghost-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px;
  border-radius: 999px; font-size: 13.5px; font-weight: 500; text-decoration: none;
  white-space: nowrap;   /* "Sign in" was breaking across two lines on a phone */
  color: var(--on-grad); background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--on-grad-line);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.ghost-btn:hover { background: rgba(255, 255, 255, 0.19); border-color: rgba(255,255,255,0.45); }

.stage { position: relative; z-index: 1; padding: 0 clamp(16px, 4vw, 40px) 60px; }

/* --- hero -------------------------------------------------------------- */

.hero { max-width: 760px; margin: clamp(26px, 6vw, 66px) auto clamp(24px, 4vw, 40px); text-align: center; }

.eyebrow {
  margin: 0 0 16px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--on-grad-faint);
}
.hero h1 {
  margin: 0 0 16px; font-family: var(--serif); font-weight: 400;
  /* 2.15rem floor, not 2.5: at 375px the old floor pushed the italic line into
     the edge and the question mark was clipped off the screen. */
  font-size: clamp(2.15rem, 7.4vw, 4.6rem);
  line-height: 1.06; letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--on-grad);
  /* An italic glyph leans past its own advance width. Without this the tail of
     the "?" was sheared off by the line box — which is what was happening, not
     a wrapping problem. */
  display: inline-block;
  padding-right: 0.14em;
  margin-right: -0.06em;
}
.lede {
  margin: 0 auto; max-width: 46ch; color: var(--on-grad-dim);
  font-size: clamp(0.98rem, 2.2vw, 1.14rem);
}

/* --- the counter ------------------------------------------------------- */

.counter {
  max-width: 640px; margin: 0 auto; border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Solid white on purpose: everything a client types lives in here, and typing
     into a translucent panel over a gradient is where legibility goes to die. */
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px -20px rgba(16, 24, 40, 0.45), 0 4px 12px rgba(16, 24, 40, 0.12);
  overflow: hidden;
}

/* the number gets the most space on the page, because it is the product */
.counter-face {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: clamp(26px, 5vw, 40px) 20px clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 100% at 50% 0%, var(--crimson-soft), transparent 70%);
}
.counter-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faint);
}
.counter-number {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.1rem, 12vw, 5.2rem); line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
  color: var(--text);
  transition: color .5s var(--ease), text-shadow .5s var(--ease);
}
.counter-number.is-counting { color: var(--text-faint); }
.counter-number.is-settled {
  background: linear-gradient(96deg, var(--crimson), var(--navy));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: land .6s var(--ease) both;
}
@keyframes land {
  0%   { transform: scale(1.06); filter: blur(3px); opacity: .6; }
  100% { transform: none; filter: none; opacity: 1; }
}
.counter-sub { font-size: 13.5px; color: var(--text-dim); min-height: 20px; text-align: center; }

.counter-form { padding: clamp(18px, 3.4vw, 26px); }

.row { display: flex; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-grow { flex: 1 1 auto; }
.field-kind { flex: 0 0 132px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--text-faint); letter-spacing: .01em; }
.opt { color: var(--text-faint); font-weight: 400; }

.control {
  width: 100%; min-height: 50px; padding: 12px 15px; font: inherit; font-size: 15.5px;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.control:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--crimson-soft);
}
.control::placeholder { color: var(--text-faint); }
select.control {
  appearance: none; cursor: pointer; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
                    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.hint { margin: 9px 2px 0; font-size: 12.5px; color: var(--text-faint); }
.hint em { font-style: normal; color: var(--text-dim); }

.chips-set { margin: 20px 0 0; padding: 0; border: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }

.chip {
  /* 44px tall so it is a real touch target — at 9px padding these came out at
     42, which is the sort of two-pixel miss that turns into a mis-tap on a
     moving bus. inline-flex rather than extra padding so the label stays
     centred. */
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--text-dim);
  background: transparent; border: 1px solid var(--line);
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-on {
  color: var(--text); font-weight: 500;
  border-color: var(--accent); background: var(--crimson-soft);
}

.go-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; margin-top: 22px; padding: 15px 24px;
  border: 0; border-radius: var(--radius); cursor: pointer;
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--on-dark);
  background: linear-gradient(140deg, var(--crimson), var(--navy));
  box-shadow: 0 16px 40px -16px var(--accent-glow);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.go-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 22px 50px -18px var(--accent-glow); }
.go-btn:disabled { opacity: .55; cursor: default; }

.fine { margin: 11px 0 0; font-size: 12.5px; color: var(--text-faint); text-align: center; }
.go-error {
  margin: 12px 0 0; padding: 10px 13px; border-radius: 10px; font-size: 13.5px;
  color: var(--danger); background: #FDEBEF; border: 1px solid rgba(255,139,139,0.28);
}
.go-error button { margin-top: 8px; }

.spinner {
  width: 17px; height: 17px; border-radius: 50%; flex: none;
  border: 2px solid rgba(10,12,18,0.28); border-top-color: var(--on-dark);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- proof and footer -------------------------------------------------- */

.proof {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px;
  max-width: 640px; margin: 30px auto 0;
}
.proof-item { display: flex; align-items: baseline; gap: 7px; font-size: 13px; color: var(--on-grad-faint); }
.proof-item strong {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 400; color: var(--on-grad);
}

.next { max-width: 560px; margin: 34px auto 0; text-align: center; font-size: 14.5px; color: var(--on-grad-dim); }
.next a { color: var(--on-grad); text-decoration: none; border-bottom: 1px solid var(--on-grad-line); }
.next a:hover { border-bottom-color: var(--on-grad); }

.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  max-width: 900px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) 40px;
  border-top: 1px solid var(--on-grad-line); font-size: 12px; color: var(--on-grad-faint);
}

/*
 * Stacked and centred on a phone.
 *
 * space-between across three items that wrap put the wordmark hard left, the
 * links hard right on the same line, and the disclaimer alone underneath —
 * which read as three pieces of a footer that had come apart rather than one
 * footer. There is no room to justify anything at 390px.
 */
@media (max-width: 560px) {
  .foot {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
  }
  .foot-links { display: flex; gap: 18px; }
}

/* Vertical padding so each of these is something you can hit — they were 20px
   tall words. inline-block keeps them on one line. */
.foot a { display: inline-block; padding: 13px 0; }

/* Shown or hidden by width so the header can say "Talk to a strategist" on a
   desktop and just "Strategist" on a phone, where the long version wrapped the
   button onto two lines and squeezed "Sign in" into "Sign / in". */
.sm-only { display: none; }

@media (max-width: 620px) {
  .lg-only { display: none; }
  .sm-only { display: inline; }

  .brand-text { font-size: 15px; }

  .stage { padding-left: 18px; padding-right: 18px; }
  .hero { margin-top: 22px; }
}

@media (max-width: 520px) {
  .row { flex-wrap: wrap; }
  .field-kind { flex: 1 1 100%; }
  .foot { justify-content: center; text-align: center; }
}

/* Only the genuinely tiny ones. Nav button sizing now lives in theme.css —
   this measurement was made when the bar held two buttons and went stale the
   moment a third and fourth were added. */
@media (max-width: 344px) {
  /*
   * Below this the full wordmark cannot share the bar with four nav items, so
   * it shrinks to its initials rather than disappearing. `display: none` left a
   * 12px invisible link where the logo had been — still tappable, still the way
   * home, and impossible to see. An abbreviated mark is honest about being
   * abbreviated; an invisible one is just a trap.
   *
   * font-size: 0 rather than display: none keeps "PolitiSizeIt" in the
   * accessibility tree, so the link is still announced by its real name.
   */
  .brand-text { font-size: 0; }
  .brand-text::before {
    content: 'PSI';
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Turnstile lives in the page rather than off-screen: Managed mode normally
   shows nothing, but when it does show a challenge the person has to be able to
   reach it. Empty slot, no space. */
.human-slot:not(:empty) { margin-top: 18px; display: flex; justify-content: center; }

/* Secondary action, shown once a count has landed. Quieter than "Access my data"
   because the breakdown is the better next step for somebody who just arrived. */
/* Shape and colour come from theme.css. On the landing panel the secondary
   action sits under a full-width primary, so only the layout differs here. */
.panel .second-btn { width: 100%; margin-top: 10px; min-height: 48px; font-size: 15px; }


/* --- place suggestions ---------------------------------------------------- */

/* Place field styling now lives in theme.css, with the shared component. */

/* ---------------------------------------------------------------- community

   The professional network is half the product and the half nobody finds by
   accident. It gets a full section rather than a link in a paragraph. */

.community {
  max-width: 1000px;
  margin: clamp(48px, 9vw, 90px) auto 0;
  padding: 0 clamp(16px, 4vw, 32px);
}

.community-inner {
  padding: clamp(28px, 5vw, 46px) clamp(22px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.community-eyebrow {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.community-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 4.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.community-title em { font-style: italic; color: var(--accent-2); }

.community-lede {
  margin: 0 0 30px;
  max-width: 62ch;
  font-size: clamp(15px, 1.7vw, 16.5px);
  line-height: 1.65;
  color: var(--text-dim);
}

.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.community-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.community-ico { font-size: 26px; line-height: 1; }

.community-card h3 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.community-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* Pushed to the bottom so both buttons line up even when the descriptions run
   to different lengths. */
.community-btn {
  margin-top: auto;
  padding-top: 0;
  align-self: flex-start;
  text-decoration: none;
  min-height: 44px;
}

.community-card .primary-btn.community-btn {
  width: auto;
  padding: 0 20px;
  min-height: 44px;
}

.community-fine {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .community-grid { grid-template-columns: 1fr; }
  .community-btn { align-self: stretch; }
}

/* One card instead of two: the member feed card was removed with the feed, and
   a two-column grid holding one item leaves it stranded at half width. */
.community-grid-solo { grid-template-columns: minmax(0, 34rem); justify-content: center; }
