/* site.css — Shared design system for Your Handy AI Guide */
/* Links to Google Fonts must be added per-page in <head> */

/* ====== Design Tokens ====== */
:root {
  --base:         #000000;
  --base-deep:    #000000;
  --base-warm:    #050505;
  --surface-1:    #0A0A0A;
  --surface-2:    #111111;
  --surface-3:    #181818;
  --ink-1:        #FFFFFF;
  --ink-2:        #EAEAEA;
  --ink-3:        #9C9C9C;
  --ink-4:        #8A8A8A;
  --rule:         rgba(255,255,255,0.10);
  --rule-strong:  rgba(255,255,255,0.18);
  --rule-soft:    rgba(255,255,255,0.06);
  --royal:        #1E6FE8;
  --royal-deep:   #1957C2;
  --royal-light:  #4189F0;
  --halo:         #5DA8FF;
  --halo-soft:    #7DBBFF;
  --halo-bright:  #A6D0FF;

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans:  'Geist', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --max:       1360px;
  --max-tight: 1040px;
  --max-prose: 680px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ====== Reset ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--base);
  font-feature-settings: 'ss01', 'cv01', 'cv02';
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ====== Scroll Progress ====== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--royal), var(--halo));
  z-index: 300;
  width: 0%;
  transition: width 80ms linear;
  box-shadow: 0 0 14px rgba(93,168,255,0.7);
}

/* ====== Typography ====== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--halo-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .num { color: var(--halo); font-weight: 600; }
.eyebrow .pulse-dot {
  width: 6px; height: 6px;
  background: var(--halo);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 8px var(--halo);
}
.eyebrow .pulse-dot::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--halo);
  opacity: 0.4;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.4); opacity: 0; }
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink-1);
  font-variation-settings: 'opsz' 36, 'SOFT' 0;
}
h1 { font-size: clamp(56px, 8vw, 120px); letter-spacing: -0.045em; }
h2 { font-size: clamp(40px, 5.6vw, 80px); letter-spacing: -0.035em; }
h3 { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.02em; line-height: 1.12; }
h4 { font-size: clamp(18px, 1.4vw, 22px); letter-spacing: -0.01em; line-height: 1.22; }

.lede {
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 600;
  font-variation-settings: 'opsz' 36;
  max-width: 40ch;
}
.body-l { font-size: 19px; line-height: 1.55; color: var(--ink-3); }
.body   { color: var(--ink-3); }
.micro  { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); }

.italic-serif { font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100; }
.brand-emph {
  color: var(--halo);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  text-shadow: 0 0 24px rgba(93,168,255,0.35);
}

/* ====== Wordmark ====== */
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-1);
}
.wordmark .accent {
  color: var(--halo);
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* ====== Layout ====== */
.shell       { max-width: var(--max);        margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; }
.shell-tight { max-width: var(--max-tight);  margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; }
.shell-prose { max-width: var(--max-prose);  margin: 0 auto; padding: 0 40px; position: relative; z-index: 2; }

section           { padding: 120px 0; position: relative; }
section.compact   { padding: 80px 0; }
section.tight     { padding: 56px 0; }
section.hero-pad  { padding-top: 180px; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 280ms var(--ease-soft), background 220ms ease, color 220ms ease, box-shadow 280ms ease, border-color 220ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
}
.btn-primary {
  background: var(--royal);
  color: var(--ink-1);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.12) inset, 0 6px 24px rgba(30,111,232,0.32), 0 0 0 1px rgba(93,168,255,0.18);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--halo), var(--royal-light), var(--halo));
  background-size: 200% 200%;
  z-index: -1; opacity: 0;
  transition: opacity 320ms ease;
  filter: blur(8px);
  animation: shift 4s linear infinite;
}
.btn-primary:hover::before { opacity: 1; }
@keyframes shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.btn-primary:hover {
  background: var(--royal-light);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.16) inset, 0 12px 40px rgba(30,111,232,0.50);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-1);
  border-color: var(--rule-strong);
}
.btn-ghost:hover {
  border-color: var(--halo);
  background: rgba(93,168,255,0.06);
  transform: translateY(-1px);
  color: var(--halo-bright);
}
.btn-large { height: 54px; padding: 0 28px; font-size: 15px; }
.btn-arrow > .arr { display: inline-block; transition: transform 280ms var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }

/* ====== Nav ====== */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 320ms ease, backdrop-filter 320ms ease, border-color 320ms ease;
  border-bottom: 1px solid transparent;
}
.nav-wrap.scrolled {
  background: rgba(10, 14, 31, 0.72);
  backdrop-filter: saturate(160%) blur(22px);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  border-bottom-color: var(--rule);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 48px;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  color: var(--ink-3);
  justify-content: center;
}
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 220ms ease;
}
.nav-links a:hover { color: var(--ink-1); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 0;
  width: 0; height: 1px;
  background: var(--halo);
  box-shadow: 0 0 8px var(--halo);
  transition: width 280ms var(--ease-out);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; gap: 12px; align-items: center; }

/* ====== Nav Dropdowns ====== */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 220ms ease;
}
.nav-dropdown-trigger:hover { color: var(--ink-1); }
.nav-dropdown-trigger .caret {
  font-size: 9px;
  opacity: 0.5;
  transition: transform 220ms ease;
}
.nav-dropdown.open .nav-dropdown-trigger { color: var(--ink-1); }
.nav-dropdown.open .caret { transform: rotate(180deg); opacity: 0.8; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 240px;
  background: rgba(10, 14, 31, 0.95);
  backdrop-filter: saturate(140%) blur(24px);
  -webkit-backdrop-filter: saturate(140%) blur(24px);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(93,168,255,0.06);
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: rgba(10,14,31,0.95);
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
  rotate: 45deg;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 180ms ease, color 180ms ease;
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover {
  background: rgba(93,168,255,0.08);
  color: var(--ink-1);
}
.dd-text { display: flex; flex-direction: column; gap: 2px; }
.dd-text strong { font-size: 13px; font-weight: 500; color: var(--ink-2); display: block; }
.dd-text em     { font-size: 11px; font-style: normal; color: var(--ink-4); display: block; }
.nav-dropdown-menu a:hover .dd-text strong { color: var(--ink-1); }

/* ====== Reveal Animations ====== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise { to { transform: translateY(0); } }

/* ====== Page Hero (shared across inner pages) ====== */
.page-hero {
  padding-top: 180px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-hero-mesh {
  position: absolute;
  inset: 0; z-index: 0;
  pointer-events: none;
}
.page-hero-mesh .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}
.page-hero-mesh .blob-1 {
  width: 700px; height: 700px;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(93,168,255,0.4), transparent 65%);
}
.page-hero-inner { position: relative; z-index: 2; }
.page-hero h1 {
  font-size: clamp(48px, 7vw, 100px);
  margin-top: 24px;
  animation: fade-up 900ms var(--ease-out) 100ms both;
}
.page-hero .page-hero-sub {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--ink-3);
  font-weight: 400;
  font-variation-settings: 'opsz' 36;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  animation: fade-up 900ms var(--ease-out) 220ms both;
}
.page-hero .page-hero-ctas {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fade-up 900ms var(--ease-out) 360ms both;
}

/* ====== Grid helpers ====== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ====== Card ====== */
.card {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 260ms ease, transform 260ms var(--ease-soft), box-shadow 260ms ease;
}
.card:hover {
  border-color: rgba(93,168,255,0.28);
  transform: translateY(-2px);
  box-shadow: 0 16px 56px rgba(0,0,0,0.3), 0 0 0 1px rgba(93,168,255,0.1);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(93,168,255,0.1);
  border: 1px solid rgba(93,168,255,0.18);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}
.card h4 { margin-bottom: 8px; }
.card p  { font-size: 16px; color: var(--ink-3); line-height: 1.5; }

/* Card title weight: redundant with the shared h1-h4 rule above as of 2026-07-21
   (that rule now uses the same weight 700 / opsz 36 sitewide, per Dylan's direct
   request that every heading read bold, not just card titles). Left in place
   as an explicit, harmless override so this selector list stays a stable anchor
   for anyone extending it. */
.card h4, .channel-card h4, .guide-card h4, .prompt-card h4, .featured-body h3, .uc-card h4, .topic-card h4, .course-card h3, .inside-card h4, .resource-card h4 {
  font-weight: 700;
  font-variation-settings: 'opsz' 36;
  letter-spacing: -0.01em;
}

/* ====== Tag / Pill ====== */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(93,168,255,0.1);
  color: var(--halo-soft);
  border: 1px solid rgba(93,168,255,0.18);
}

/* ====== Divider ====== */
.rule-line {
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ====== Section head (reusable pattern) ====== */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}
.section-head h2 { margin-top: 20px; }
.section-head p  { margin-top: 20px; font-family: var(--serif); font-size: clamp(18px, 1.5vw, 22px); color: var(--ink-3); font-weight: 400; font-variation-settings: 'opsz' 36; }

/* ====== Newsletter inline form ====== */
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin-top: 32px;
}
.newsletter-form input[type="email"] {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-1);
  outline: none;
  transition: border-color 220ms ease;
}
.newsletter-form input[type="email"]:focus { border-color: var(--halo); }
.newsletter-form input[type="email"]::placeholder { color: var(--ink-4); }

/* ====== Social icons ====== */
.social-icons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.social-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-3);
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}
.social-icon:hover {
  border-color: rgba(93,168,255,0.4);
  color: var(--ink-1);
  background: rgba(93,168,255,0.06);
}

/* ====== Footer ====== */
.footer {
  border-top: 1px solid var(--rule);
  padding: 80px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .body { font-size: 14px; line-height: 1.6; max-width: 28ch; }
.footer-newsletter { display: flex; gap: 8px; margin-top: 4px; }
.footer-newsletter input[type="email"] {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-1);
  outline: none;
  transition: border-color 220ms ease;
}
.footer-newsletter input:focus { border-color: var(--halo); }
.footer-newsletter input::placeholder { color: var(--ink-4); }
.footer-newsletter .btn { height: 38px; font-size: 13px; }

.footer-col { display: flex; flex-direction: column; gap: 16px; }
.footer-col h5 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--ink-3); transition: color 200ms ease; }
.footer-col a:hover { color: var(--ink-1); }

.footer-base {
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-4);
}
.footer-base .social-row { display: flex; gap: 24px; }
.footer-base a { color: var(--ink-4); transition: color 200ms ease; }
.footer-base a:hover { color: var(--ink-1); }

/* ====== Mobile ====== */
.mobile-only { display: none; }
.desktop-only { display: flex; }

@media (max-width: 900px) {
  .shell, .shell-tight, .shell-prose { padding: 0 24px; }
  .nav { padding: 16px 24px; gap: 24px; }
  .nav-links.desktop-only { display: none; }
  .desktop-only { display: none; }
  .mobile-only { display: flex; }

  section { padding: 80px 0; }
  section.hero-pad { padding-top: 120px; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-base { flex-direction: column; gap: 16px; text-align: center; }

  .page-hero { padding-top: 130px; padding-bottom: 64px; }
}

@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h2 { font-size: clamp(34px, 9vw, 52px); }
  .newsletter-form { flex-direction: column; }
  .social-icons { gap: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
