/* ─── Academic Scribble Theme ────────────────────────────────────────────── */

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

:root {
  /* Paper palette */
  --paper:          #FBF8EF;
  --paper2:         #F5F0DC;
  --card:           #FFFEF6;
  --card2:          #FFF9E6;

  /* Pencil text */
  --pencil:         #252118;
  --pencil-mid:     #574F42;
  --pencil-light:   #897E72;
  --pencil-faint:   #C5BFB4;

  /* Ink colors */
  --ink-blue:       #1A4ED8;
  --ink-blue-dark:  #1038A8;
  --ink-red:        #C43028;
  --ink-green:      #1C7A38;

  /* Highlighter accents */
  --hl-yellow:      #FFE566;
  --hl-pink:        #FFB3C6;
  --hl-blue:        #B8D8F8;
  --hl-green:       #B2EFD4;

  /* Ruled line */
  --ruled:          #C8DDF4;
  --ruled-dark:     #A8C4E8;

  /* Margin line */
  --margin-red:     rgba(210,70,60,.28);

  /* Borders */
  --border:         rgba(37,33,24,.14);
  --border-dark:    rgba(37,33,24,.42);

  /* Soft shadows */
  --shadow-sm:      0 1px 3px rgba(37,33,24,.08), 0 1px 2px rgba(37,33,24,.06);
  --shadow-md:      0 2px 8px rgba(37,33,24,.08), 0 1px 3px rgba(37,33,24,.06);
  --shadow-lg:      0 4px 16px rgba(37,33,24,.10), 0 2px 4px rgba(37,33,24,.06);
  --shadow-hover:   0 6px 20px rgba(37,33,24,.12), 0 2px 6px rgba(37,33,24,.08);

  --radius:         6px;
  --radius-lg:      12px;

  --font-sketch:    'Caveat', cursive;
  --font-body:      'Lato', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--pencil);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--ink-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--paper2);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  border: 1px solid var(--border);
}

/* ── Ruled-paper background helper ───────────────────────────────────────── */
.ruled-bg {
  background-image: repeating-linear-gradient(
    transparent,
    transparent 27px,
    var(--ruled) 27px,
    var(--ruled) 28.5px
  );
}

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,248,239,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(37,33,24,.08);
  box-shadow: 0 1px 3px rgba(37,33,24,.04);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-sketch);
  font-size: 22px; font-weight: 700;
  color: var(--pencil);
  letter-spacing: .01em;
}
.nav-logo svg rect { fill: var(--ink-blue); }

.nav-cta {
  padding: 8px 20px;
  background: var(--hl-yellow);
  color: var(--pencil);
  border: 1.5px solid rgba(37,33,24,.2);
  border-radius: 20px;
  font-family: var(--font-sketch);
  font-size: 17px; font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
  line-height: 1;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--pencil);
  text-decoration: none;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  max-width: 1100px; margin: 0 auto;
  padding: 72px 24px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-inner { position: relative; }

.hero-badge {
  display: inline-block;
  background: var(--hl-blue);
  border: 1.5px solid var(--ink-blue);
  color: var(--ink-blue-dark);
  font-family: var(--font-sketch);
  font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 4px 14px; border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: 2px 2px 0 rgba(26,78,216,.2);
}

.hero-title {
  font-family: var(--font-sketch);
  font-size: 58px; font-weight: 700;
  line-height: 1.1; letter-spacing: -.01em;
  color: var(--pencil);
  margin-bottom: 22px;
}

/* Highlighter-marker underline effect */
.hero-accent {
  position: relative;
  display: inline;
  background: linear-gradient(transparent 55%, var(--hl-yellow) 55%);
  padding: 0 3px;
  color: var(--pencil);
  -webkit-text-fill-color: var(--pencil);
}

.hero-sub {
  font-size: 16px; color: var(--pencil-mid); line-height: 1.7;
  margin-bottom: 32px;
}
.hero-sub strong { color: var(--pencil); }

.hero-actions {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn-primary {
  padding: 13px 28px;
  background: var(--ink-blue);
  color: #fff;
  border: 1.5px solid var(--ink-blue);
  border-radius: 24px;
  font-family: var(--font-sketch);
  font-size: 18px; font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, background .15s;
  line-height: 1;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: var(--ink-blue-dark);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  padding: 13px 20px;
  color: var(--pencil-mid);
  font-family: var(--font-sketch);
  font-size: 18px; font-weight: 600;
  border: 1.5px solid var(--pencil-faint);
  border-radius: 24px;
  transition: color .15s, border-color .15s, background .15s;
  line-height: 1;
}
.btn-ghost:hover {
  color: var(--pencil);
  border-color: var(--pencil-mid);
  background: rgba(37,33,24,.03);
  text-decoration: none;
}

.btn-demo {
  padding: 13px 20px;
  color: var(--pencil-light);
  font-size: 14px; font-weight: 500;
  transition: color .15s;
}
.btn-demo:hover { color: var(--ink-blue); text-decoration: none; }

.hero-note {
  font-size: 12px;
  color: var(--pencil-light);
  font-style: italic;
}

/* ─── Preview mockup ──────────────────────────────────────────────────────── */
.hero-preview {
  background: var(--card);
  border: 1px solid rgba(37,33,24,.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(0.6deg);
}
.preview-bar {
  background: var(--paper2);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(37,33,24,.10);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.preview-url {
  margin-left: 8px; font-size: 11px; color: var(--pencil-light);
  flex: 1; text-align: center; font-style: italic;
}
.preview-body {
  display: flex; min-height: 310px;
  background-image: repeating-linear-gradient(
    transparent, transparent 24px, var(--ruled) 24px, var(--ruled) 25px
  );
}
.preview-sidebar {
  width: 110px; flex-shrink: 0;
  background: var(--paper2);
  border-right: 1px solid rgba(37,33,24,.10);
  padding: 12px 8px;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px;
  font-family: var(--font-sketch);
}
.preview-nav-item {
  padding: 6px 8px; border-radius: 3px;
  color: var(--pencil-light); cursor: default;
  font-size: 12px;
}
.preview-nav-item.active {
  background: rgba(26,78,216,.12);
  color: var(--ink-blue);
  font-weight: 700;
}
.preview-sep { height: 1.5px; background: var(--border-dark); margin: 6px 0; }
.preview-course-dot {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--pencil-mid);
  padding: 3px 6px;
}
.preview-course-dot::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c);
  flex-shrink: 0;
}
.preview-main {
  flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 5px;
}
.preview-section-label {
  font-family: var(--font-sketch);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 4px 0 2px;
}
.preview-section-label.overdue { color: var(--ink-red); }
.preview-section-label.today   { color: #B8620A; }
.preview-section-label.week    { color: var(--ink-blue); }
.preview-card {
  background: var(--card);
  border: 1px solid rgba(37,33,24,.08);
  border-radius: 4px;
  padding: 6px 10px 6px 13px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.preview-stripe {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}
.preview-name { flex: 1; font-weight: 600; color: var(--pencil); }
.preview-badge {
  font-family: var(--font-sketch);
  font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 20px; color: #fff;
}
.preview-badge.syllabus-badge {
  background: rgba(184,98,10,.15);
  color: #B8620A;
  border: 1px solid rgba(184,98,10,.3);
}
.preview-due { font-size: 10px; font-weight: 700; color: var(--pencil-light); }
.preview-due.overdue { color: var(--ink-red); }
.preview-due.today   { color: #B8620A; }
.overdue-card { opacity: .8; }

/* ─── Section shared ──────────────────────────────────────────────────────── */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 80px 24px; }

.section-title {
  font-family: var(--font-sketch);
  font-size: 42px; font-weight: 700;
  text-align: center; margin-bottom: 8px;
  color: var(--pencil);
  letter-spacing: -.01em;
}
/* Pencil underline stroke */
.section-title::after {
  content: '';
  display: block;
  width: 80px; height: 2.5px;
  background: var(--ink-blue);
  margin: 10px auto 0;
  border-radius: 2px;
  opacity: 0.4;
  transform: rotate(-0.8deg);
}
.section-sub {
  text-align: center; font-size: 16px; color: var(--pencil-mid);
  margin-bottom: 48px;
  font-style: italic;
}

/* ─── Features ────────────────────────────────────────────────────────────── */
.features {
  background: var(--paper2);
  border-top: 1px solid rgba(37,33,24,.08);
  border-bottom: 1px solid rgba(37,33,24,.08);
  background-image: repeating-linear-gradient(
    transparent, transparent 27px, var(--ruled) 27px, var(--ruled) 28px
  );
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
/* 7th card centered */
.features-grid .feature-card:last-child:nth-child(7) {
  grid-column: 2 / 3;
}
.feature-card {
  background: var(--card);
  border: 1px solid rgba(37,33,24,.10);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
/* Red margin line on left, like notebook */
.feature-card::before {
  content: '';
  position: absolute;
  left: 36px; top: 0; bottom: 0;
  width: 1.5px;
  background: var(--margin-red);
}
/* Dog-ear page fold */
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 20px;
  background: linear-gradient(225deg, var(--paper2) 50%, rgba(37,33,24,.08) 50%, rgba(37,33,24,.08) 52%, var(--card) 52%);
  border-bottom-left-radius: 4px;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  border: 1.5px solid var(--border-dark);
  background: var(--paper) !important;
}
.feature-card h3 {
  font-family: var(--font-sketch);
  font-size: 19px; font-weight: 700;
  margin-bottom: 8px;
  color: var(--pencil);
}
.feature-card p  { font-size: 14px; color: var(--pencil-mid); line-height: 1.65; }

/* ─── How it works ────────────────────────────────────────────────────────── */
.how {
  background: var(--paper);
}
.steps {
  display: flex; align-items: flex-start; gap: 16px;
}
.step {
  flex: 1;
  background: var(--card);
  border: 1px solid rgba(37,33,24,.10);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.step-num {
  width: 44px; height: 44px;
  background: var(--hl-yellow);
  border: 2px solid var(--pencil);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sketch);
  font-size: 22px; font-weight: 700; color: var(--pencil);
  margin: 0 auto 16px;
  box-shadow: none;
  transform: rotate(-2deg);
}
.step h3 {
  font-family: var(--font-sketch);
  font-size: 19px; font-weight: 700;
  margin-bottom: 8px; color: var(--pencil);
}
.step p  { font-size: 14px; color: var(--pencil-mid); line-height: 1.65; }
.step em { color: var(--ink-blue); font-style: normal; font-weight: 700; }
.step-arrow {
  font-family: var(--font-sketch);
  font-size: 32px; color: var(--pencil-faint);
  padding-top: 38px; flex-shrink: 0;
}

/* ─── Pricing ─────────────────────────────────────────────────────────────── */
.pricing {
  background: var(--paper2);
  border-top: 1px solid rgba(37,33,24,.08);
  background-image: repeating-linear-gradient(
    transparent, transparent 27px, var(--ruled) 27px, var(--ruled) 28px
  );
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}
.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  background: var(--hl-yellow);
  border: 1px solid rgba(37,33,24,.12);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: rotate(-0.5deg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pricing-card .pricing-features { flex: 1; }
.pricing-card--lifetime {
  background: #fff7d6;
  transform: rotate(0.5deg);
  border-color: rgba(67, 97, 238, .35);
}
.pricing-badge {
  position: absolute;
  top: 14px; right: -36px;
  background: #4361ee;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 40px;
  transform: rotate(35deg);
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
/* Corner page curl */
.pricing-card::before {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 40px; height: 40px;
  background: linear-gradient(315deg, var(--paper2) 45%, rgba(37,33,24,.10) 45%, rgba(37,33,24,.10) 48%, var(--hl-yellow) 48%);
  border-top-left-radius: 6px;
}
.pricing-top { margin-bottom: 24px; }
.pricing-price {
  font-family: var(--font-sketch);
  font-size: 80px; font-weight: 700;
  color: var(--ink-blue);
  line-height: 1;
  text-shadow: 1px 2px 4px rgba(26,78,216,.12);
}
.pricing-period {
  font-size: 15px; color: var(--pencil-mid);
  margin-top: 4px; font-style: italic;
}
.pricing-features {
  list-style: none;
  margin-bottom: 28px;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.pricing-features li {
  font-family: var(--font-sketch);
  font-size: 17px; color: var(--pencil);
  display: flex; align-items: center; gap: 10px;
}
.pricing-features .check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--ink-blue);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(26,78,216,.06);
  position: relative;
}
.pricing-features .check::after {
  content: '';
  width: 6px; height: 10px;
  border: solid var(--ink-blue);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.btn-buy {
  display: block;
  padding: 14px;
  background: var(--ink-blue);
  color: #fff;
  border: 1.5px solid var(--ink-blue);
  border-radius: 24px;
  font-family: var(--font-sketch);
  font-size: 20px; font-weight: 700;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-buy:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: var(--ink-blue-dark);
  color: #fff;
  text-decoration: none;
}
.pricing-note {
  font-size: 12px; color: var(--pencil-mid); line-height: 1.6; font-style: italic;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(37,33,24,.08);
  background: var(--paper2);
  padding: 28px 24px;
}
.footer .section-inner {
  padding: 0; max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-sketch);
  font-size: 16px; font-weight: 700;
  color: var(--pencil);
}
.footer-note { font-size: 12px; color: var(--pencil-light); font-style: italic; }
.footer-links { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.footer-links a { color: var(--pencil-mid); }
.footer-links a:hover { color: var(--ink-blue); }
.footer-links span { color: var(--pencil-faint); }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-title { font-size: 44px; }
  .hero-preview { transform: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .steps { flex-direction: column; }
  .step-arrow { display: none; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 36px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid .feature-card:last-child:nth-child(7) { grid-column: 1; }
  .footer .section-inner { flex-direction: column; gap: 10px; text-align: center; }
  .pricing-card { transform: none; }
  .pricing-card::before { display: none; }
}
