/* CogniPage — Student Grants (/grants, /grants/apply). Builds on brand.css + landing.css. */

.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;
}
/* Honeypot: off-screen rather than display:none, which some bots skip. */
.g-hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.g-hero {
  max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.5rem 3rem;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start;
}
.g-copy h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.05; font-weight: 800;
  margin: 0 0 1.1rem; letter-spacing: -0.02em;
}
.g-copy .lead { margin-bottom: 1.75rem; }

.g-stats {
  list-style: none; padding: 0; margin: 0 0 2rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem;
}
.g-stats li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.g-stats b { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.g-stats span { color: var(--muted); font-size: 0.82rem; font-weight: 500; }

.g-founder {
  margin: 0; padding: 1.25rem 1.4rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--secondary) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--secondary) 35%, var(--border));
}
.g-founder blockquote { margin: 0 0 0.75rem; font-size: 1.02rem; line-height: 1.6; font-style: italic; }
.g-founder figcaption { display: flex; flex-direction: column; line-height: 1.35; font-size: 0.9rem; }
.g-founder figcaption span { color: var(--muted); }

/* ── Action card ──────────────────────────────────────────────────────────── */
.g-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 2rem; box-shadow: var(--shadow);
}
.g-hero .g-card { position: sticky; top: 6.5rem; }
.g-card h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.g-card-sub { color: var(--muted); margin: 0 0 1.25rem; }

.g-seats { margin-bottom: 1.5rem; }
.g-seats-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  font-size: 0.92rem; margin-bottom: 0.5rem;
}
.g-seats-row b { font-size: 1.1rem; }
.g-bar { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, transparent); overflow: hidden; }
.g-bar span {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.8s var(--ease);
}
.g-countdown { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.g-countdown-lg { font-size: 1.6rem; margin: 0 0 1.25rem; letter-spacing: -0.01em; }

.g-inline-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.g-inline-form input[type="email"] { flex: 1 1 220px; }
.g-inline-form .btn-primary { flex: 1 1 auto; }

.g-card input[type="email"], .g-card input[type="text"], .g-card select, .g-card textarea {
  width: 100%; min-width: 0; padding: 0.8rem 0.95rem; font: inherit; font-size: 1rem;
  color: var(--fg); background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.g-card select { appearance: auto; }
.g-card textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }
.g-card input:focus, .g-card select:focus, .g-card textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.g-card [aria-invalid="true"] { border-color: #d14343; }
.btn-primary[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.g-msg { font-size: 0.9rem; margin: 0.75rem 0 0; min-height: 1.2em; }
.g-msg:empty { min-height: 0; margin: 0; }
.g-msg.ok { color: #1f9d57; }
.g-msg.err { color: #d14343; }
.g-fine { color: var(--muted); font-size: 0.82rem; margin: 1rem 0 0; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.g-section { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.5rem; }
.g-section .section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.g-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.g-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.g-steps h3 { margin: 0.9rem 0 0.4rem; font-size: 1.1rem; }
.g-steps p { margin: 0; color: var(--muted); }
.g-step-n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 800;
}

.g-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.25rem; padding-top: 0; }
.g-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.g-panel h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.g-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.g-checks li { padding-left: 1.7rem; position: relative; }
.g-checks li::before { content: "✓"; position: absolute; left: 0; color: #1f9d57; font-weight: 800; }
.g-panel details { border-top: 1px solid var(--border); padding: 0.8rem 0; }
.g-panel details:first-of-type { border-top: 0; padding-top: 0; }
.g-panel summary { cursor: pointer; font-weight: 600; }
.g-panel details p { color: var(--muted); margin: 0.5rem 0 0; }
.g-panel a { color: var(--primary); }

/* ── Application page ─────────────────────────────────────────────────────── */
.g-apply { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.g-apply-head { text-align: center; margin-bottom: 2rem; }
.g-apply-head h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.g-apply-sub { color: var(--muted); margin: 0; }
.g-apply-sub:empty { display: none; }

.g-loading { display: flex; align-items: center; justify-content: center; gap: 0.75rem; color: var(--muted); margin: 1rem 0; }
.g-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--primary) 20%, transparent); border-top-color: var(--primary);
  animation: g-spin 0.8s linear infinite;
}
@keyframes g-spin { to { transform: rotate(360deg); } }

.g-result { text-align: center; padding: 1rem 0.5rem; }
.g-result-ic { font-size: 2.6rem; display: block; margin-bottom: 0.5rem; }
.g-result h2 { margin-bottom: 0.6rem; }
.g-result p { color: var(--muted); max-width: 32rem; margin: 0 auto 1.5rem; }

.g-verified {
  margin: 0 0 1.5rem; padding: 0.65rem 0.9rem; border-radius: 10px; font-size: 0.9rem;
  background: color-mix(in srgb, #1f9d57 10%, transparent); color: var(--fg);
}
.g-form fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
.g-form legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 0.9rem; padding: 0; }
.g-form legend small { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.g-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.g-span-2 { grid-column: span 2; }
.g-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.g-grid .g-field { margin-bottom: 0; }
.g-field > span { font-weight: 600; font-size: 0.9rem; }
.g-narrow { max-width: 22rem; }

.g-consents { display: grid; gap: 0.8rem; margin: 0 0 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.g-check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.92rem; cursor: pointer; }
.g-check input { width: 18px; height: 18px; margin: 0.15rem 0 0; flex: none; accent-color: var(--primary); }
.g-check a { color: var(--primary); }
.g-submit { width: 100%; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .g-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 2rem; }
  .g-hero .g-card { position: static; }
  .g-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .g-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g-hero, .g-section, .g-apply { padding-left: 1rem; padding-right: 1rem; }
  .g-card { padding: 1.4rem; border-radius: 18px; }
  .g-stats { grid-template-columns: 1fr; }
  .g-stats li { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
  .g-grid { grid-template-columns: 1fr; }
  .g-span-2 { grid-column: auto; }
}
