/* ========== CUSTOM FONT ========== */
@font-face {
  font-family: 'Myfont';
  src: url('../fonts/Myfont-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ========== RESET ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== VARIABLES ========== */
:root {
  --bg: #F2F0EB;
  --bg-card: #ECEAE5;
  --bg-card-alt: #E4E2DD;
  --bg-white: #FAF9F6;
  --orange: #D97757;
  --orange-hover: #c4663f;
  --green: #2D5A3D;
  --green-hover: #367347;
  --text-primary: #1A1A1A;
  --text-secondary: #5C5C57;
  --text-muted: #999994;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.10);
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-hand: 'Myfont', cursive;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  --max-width: 720px;
}

/* ========== BASE ========== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
}

/* Subtle grid lines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Paper grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

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

a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .fade-up.visible { opacity: 1; transform: none; }
  .toolbar, .faq-item, .faq-icon, .signup-form button, .skip-link { transition: none !important; }
}

/* ========== SKIP LINK ========== */
.skip-link {
  position: fixed;
  top: 0;
  left: 12px;
  z-index: 10001;
  padding: 10px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  transform: translateY(-120%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skip-link:focus { transform: translateY(72px); outline: none; }
.skip-link:focus-visible { box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.35); }

/* ========== LAYOUT ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
}

/* ========== FLOATING TOOLBAR ========== */
.toolbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(242, 240, 235, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}

.toolbar:hover { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); }

.toolbar a {
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.toolbar a:hover {
  color: var(--green);
  background: rgba(0, 0, 0, 0.04);
}

.toolbar__cta {
  background: var(--green) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 6px 18px !important;
}

.toolbar__cta:hover { background: var(--green-hover) !important; }
.toolbar__cta:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 3px var(--green), 0 0 0 5px var(--orange);
}

/* ========== FADE-UP ANIMATION ========== */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== UTILITIES ========== */

/* Pill label (e.g. "Free Resource", "Limited") */
.label-tag {
  display: inline-block;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid var(--orange);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
}

/* Primary CTA button */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--green);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--green-hover); color: #fff; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 3px var(--green), 0 0 0 5px rgba(217, 119, 87, 0.55);
}

/* Secondary / ghost button */
.btn-secondary {
  display: inline-block;
  padding: 13px 28px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}

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

/* Horizontal divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Section heading */
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

/* Numbered row label (01, 02, 03) */
.row-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* Visually hidden but accessible to screen readers */
.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;
}
