/* jhf.io — shared styles. Tokens mirror jhfresearch.com (css/styles.css) so
   the two sites read as one brand. Pacifico is kept for the tagline only. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/montserrat-var-latin.woff2") format("woff2");
}
:root {
  --dark: #111214;
  --dark-2: #1a1b1e;
  --light: #f5f5f4;
  --white: #ffffff;
  --ink: #111214;
  --muted: rgba(255,255,255,0.65);
  --blue: #1a73e8;
  --blue-solid: #1558b0;
  --blue-bright: #8ab4f8;
  --yellow: #fbbc05;
  --radius-pill: 999px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--dark); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--white);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
/* Starfield: same constellation chart as jhfresearch.com's "One Strategy"
   section, wheeling counterclockwise around Polaris (positive CSS rotation
   is clockwise, so this animates toward -360deg). Oversized and inset so
   the rotation never reveals a corner gap. Pinned to its own GPU layer to
   avoid the faint hairline seam Chromium can show on a large rotating layer. */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  filter: grayscale(0.75) brightness(0.85);
  animation: starfieldRotate 300s linear infinite;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}
/* Only declared here so the image is never fetched below 641px. */
@media (min-width: 641px) {
  body::before { background-image: url("../img/constellation-star-chart.webp"); }
}
@keyframes starfieldRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}
#content, footer { position: relative; z-index: 1; }
#content {
  text-align: center;
  margin: 8vh auto 0;
  max-width: 720px;
  padding: 16px 24px;
}
#content img.logo { max-width: 100%; height: auto; }
h1 {
  font-size: clamp(1.6rem, 5.5vw, 2.5rem);
  white-space: nowrap;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: .75rem 0 .5rem;
}
h2, .lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted);
  margin: .5rem 0;
}
.tagline {
  font-family: 'Pacifico', cursive;
  font-size: 32px;
  font-weight: 400;
  margin: 1.25rem 0;
}
/* Never split the "just have fun" phrase; on narrow screens give it its own line. */
.tagline u { white-space: nowrap; }
.tagline-break { display: none; }
@media (max-width: 480px) {
  .tagline-break { display: inline; }
}
/* Very narrow phones (≤360px): scale the display text down a notch so the
   H1, tagline and button each stay to their intended line count. */
@media (max-width: 360px) {
  h1 { font-size: 6.2vw; }
  .tagline { font-size: 26px; }
  .btn { white-space: nowrap; padding: 16px 28px; font-size: 1.05rem; }
}
.note { color: var(--muted); font-size: .95rem; }
a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 36px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--blue); color: var(--white); text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.cta { padding-top: 12px; }
footer {
  margin: 3rem auto 2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}
footer a { color: var(--muted); }
footer button {
  background: none; border: 0; padding: 0; margin: 0;
  color: var(--muted); font: inherit; cursor: pointer;
}
footer button:hover { text-decoration: underline; }

/* Contact form (native; posts to HubSpot's submission API from js/contact.js) */
.contact-form { max-width: 520px; margin: 12px auto 0; text-align: left; }
.contact-form .form-row { display: flex; gap: 16px; }
.contact-form .form-row .form-field { flex: 1; }
.contact-form .form-field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.contact-form label, .contact-form legend {
  display: block; margin-bottom: 6px;
  font-size: .85rem; font-weight: 600; letter-spacing: .02em; color: var(--muted);
}
.contact-form .req { color: var(--yellow); }
.contact-form input[type="text"], .contact-form input[type="email"] {
  width: 100%; padding: 12px 14px;
  font: inherit; color: var(--white);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.contact-form input:focus { border-color: var(--blue-bright); background: rgba(255,255,255,0.09); }
.contact-form input.invalid { border-color: #ea4335; }
.contact-form label.check {
  display: flex; align-items: center; gap: 10px; margin: 0 0 8px;
  font-size: .95rem; font-weight: 400; letter-spacing: 0; color: var(--white); cursor: pointer;
}
.contact-form input[type="checkbox"] {
  width: 18px; height: 18px; margin: 0; flex: none;
  accent-color: var(--blue-bright); cursor: pointer;
}
.contact-form .form-error { margin: 0 0 14px; font-size: .9rem; color: #f28b82; }
.contact-form .form-submit { text-align: center; margin: 8px 0 0; }
.contact-form .btn { cursor: pointer; font: inherit; font-weight: 700; }
.contact-form .btn[disabled] { opacity: .6; cursor: default; transform: none; }
@media (max-width: 480px) {
  .contact-form .form-row { display: block; }
}

/* Consent banner */
#jhf-consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--dark-2); color: var(--white);
  border-top: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -2px 12px rgba(0,0,0,.4);
  padding: 12px 16px;
  font-size: .9rem;
  text-align: center;
}
#jhf-consent-banner[hidden] { display: none; }
body.has-consent-banner { padding-bottom: 110px; }
#jhf-consent-banner p { margin: 0 0 8px; }
#jhf-consent-banner .consent-btn {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 8px 20px; margin: 0 4px;
  border-radius: var(--radius-pill); border: 1px solid var(--white);
}
#jhf-consent-banner .consent-accept { background: var(--white); color: var(--ink); }
#jhf-consent-banner .consent-accept:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
#jhf-consent-banner .consent-reject { background: transparent; color: var(--white); }
