/* Nifty Access — educational static site */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #1a2332;
  --muted: #5a6a7e;
  --line: #d8e0ea;
  --brand: #0b6e4f;
  --brand-dark: #08543c;
  --brand-soft: #e6f5ef;
  --accent: #e8a317;
  --accent-soft: #fff6e0;
  --warn: #8a4b08;
  --warn-bg: #fff4e5;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(26, 35, 50, 0.08);
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-dark);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand), #18a070);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
}

.logo span {
  font-size: 1.1rem;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

/* Layout */
main {
  flex: 1;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.hero-copy h1 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.hero-art {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--warn);
}

.badge.alt {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

/* Cards */
.section-title {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 42rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: 0 2px 10px rgba(26, 35, 50, 0.04);
}

.card h3 {
  margin: 0.75rem 0 0.4rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card-img {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef3f8;
}

.card-img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* Callouts */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
}

.callout-warn {
  background: var(--warn-bg);
  border-color: #f0d3a0;
  color: var(--warn);
}

.callout-info {
  background: var(--brand-soft);
  border-color: #b9e2d0;
  color: var(--brand-dark);
}

.callout strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* Hierarchy steps */
.steps {
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
  margin: 1.25rem 0 2rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.1rem 4rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.step h3 {
  margin: 0 0 0.35rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

/* Prose */
.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.figure-block {
  margin: 1.5rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.figure-block img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.figure-block figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Form */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 700;
  font-size: 0.92rem;
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

input,
select,
textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(11, 110, 79, 0.35);
  border-color: var(--brand);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
}

.form-success {
  display: none;
  background: var(--brand-soft);
  border: 1px solid #b9e2d0;
  color: var(--brand-dark);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-top: 1rem;
}

.form-success.show {
  display: block;
}

/* Footer */
.site-footer {
  background: #132033;
  color: #d7e0ec;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.6rem;
}

.site-footer p,
.site-footer li {
  font-size: 0.9rem;
  color: #b7c4d6;
  margin: 0 0 0.6rem;
}

.site-footer a {
  color: #9fd9c1;
}

.disclaimer-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.disclaimer-box p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

.footer-meta {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #93a3b8;
}

.inline-disclaimer {
  font-size: 0.88rem;
  margin: 1rem 0 1.5rem;
}

/* Page header */
.page-hero {
  margin-bottom: 1.5rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

/* Responsive */
@media (max-width: 860px) {
  .hero,
  .grid-3,
  .grid-2,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.open {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav ul {
    flex-direction: column;
    width: 100%;
    padding-top: 0.25rem;
  }

  .site-nav a {
    border-radius: 10px;
  }
}
