/* ============================================
   ClippyAI Landing Page
   Notebook paper aesthetic + pixel accents
   ============================================ */

:root {
  --bg: #FDF6E3;            /* warm beige */
  --bg-dark: #F4E8C8;       /* slightly darker paper */
  --line: #D4C5A0;          /* notebook lines */
  --margin-red: #E8A29A;    /* red margin line */
  --ink: #2D2A24;           /* pen ink */
  --ink-light: #5C5448;     /* lighter ink */
  --accent: #4CAF50;        /* Clippy green */
  --accent-dark: #388E3C;
  --yellow: #FFE57F;        /* highlighter yellow */
  --pink: #FFB3BA;          /* sticker pink */
  --blue: #A8D8EA;          /* sticker blue */
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-soft: 3px 3px 12px rgba(45, 42, 36, 0.15);
  --pixel-font: 'Press Start 2P', monospace;
  --hand-font: 'Caveat', cursive;
  --body-font: 'Kalam', 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  font-size: 17px;
}

/* ============================================
   NOTEBOOK PAPER BACKGROUND
   ============================================ */

.paper-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  background-image:
    linear-gradient(to bottom, transparent 0, transparent 31px, var(--line) 31px, var(--line) 32px, transparent 32px);
  background-size: 100% 32px;
  pointer-events: none;
}

.margin-line {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 80px;
  width: 2px;
  background: var(--margin-red);
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 900px) {
  .margin-line { left: 30px; }
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

@media (max-width: 900px) {
  .container { padding: 0 20px; }
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 227, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px dashed var(--line);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(2px 2px 0 rgba(45, 42, 36, 0.2));
}

.logo-icon-img {
  width: 36px;
  height: 36px;
  display: block;
  filter: drop-shadow(2px 2px 0 rgba(45, 42, 36, 0.2));
  image-rendering: pixelated;
}

.logo-text {
  font-family: var(--pixel-font);
  font-size: 18px;
  letter-spacing: -1px;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.15s ease;
}

.nav a:hover {
  transform: rotate(-2deg);
  color: var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

@media (max-width: 700px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 80px 0 100px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.sticker {
  display: inline-block;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--hand-font);
  font-size: 22px;
  font-weight: 700;
  padding: 6px 18px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  transform: rotate(-3deg);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--body-font);
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--ink);
  letter-spacing: -1px;
}

.underline-squiggle {
  position: relative;
  display: inline-block;
}

.underline-squiggle::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q 15 0, 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%234CAF50' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 12px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--ink-light);
  margin-bottom: 36px;
  max-width: 580px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 20px;
  font-family: var(--hand-font);
  font-size: 20px;
  color: var(--ink-light);
  flex-wrap: wrap;
}

.check {
  color: var(--accent);
  font-weight: 700;
  margin-right: 4px;
}

/* Clippy card on hero */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.clippy-card {
  background: #FFFDE7;
  border: 3px solid var(--ink);
  padding: 32px;
  box-shadow: var(--shadow-hard);
  transform: rotate(2deg);
  position: relative;
  max-width: 320px;
}

.clippy-sprite {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  filter: drop-shadow(3px 3px 0 rgba(45, 42, 36, 0.2));
  animation: bobble 3s ease-in-out infinite;
  image-rendering: pixelated;
}

@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}

.speech-bubble {
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 16px 20px;
  margin-top: 16px;
  position: relative;
  box-shadow: 2px 2px 0 var(--ink);
}

.speech-bubble p {
  font-family: var(--hand-font);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}

.bubble-tail {
  position: absolute;
  top: -12px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid var(--ink);
}

.bubble-tail::after {
  content: '';
  position: absolute;
  top: 3px;
  left: -8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid var(--yellow);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 3px solid var(--ink);
  font-family: var(--body-font);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-hard);
  border-radius: 4px;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

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

.btn-secondary {
  background: #fff;
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

.btn-large {
  font-size: 22px;
  padding: 18px 40px;
}

.btn-icon {
  font-size: 22px;
}

/* ============================================
   SECTION STYLES
   ============================================ */

section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-size: 48px;
  text-align: center;
  margin-bottom: 16px;
  color: var(--ink);
}

.section-sub {
  text-align: center;
  font-size: 20px;
  color: var(--ink-light);
  margin-bottom: 56px;
  font-family: var(--hand-font);
}

.handwritten {
  font-family: var(--hand-font);
  font-size: 72px;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  display: inline-block;
  transform: rotate(-1deg);
}

.handwritten::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 6px;
  background: var(--yellow);
  z-index: -1;
  opacity: 0.6;
}

@media (max-width: 700px) {
  .handwritten { font-size: 48px; }
}

/* ============================================
   FEATURES
   ============================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: #fff;
  border: 3px solid var(--ink);
  padding: 32px 28px;
  box-shadow: var(--shadow-hard);
  transition: all 0.2s ease;
  position: relative;
}

.feature-card:nth-child(2) { transform: rotate(0.5deg); }
.feature-card:nth-child(3) { transform: rotate(-0.5deg); }
.feature-card:nth-child(4) { transform: rotate(-0.5deg); }
.feature-card:nth-child(6) { transform: rotate(0.5deg); }

.feature-card:hover {
  transform: translate(-3px, -3px) rotate(0deg);
  box-shadow: 8px 8px 0 var(--ink);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-family: var(--body-font);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.feature-card p {
  font-size: 17px;
  color: var(--ink-light);
  line-height: 1.5;
}

/* ============================================
   HOW IT WORKS
   ============================================ */

.how-it-works {
  background: var(--bg-dark);
  border-top: 3px dashed var(--line);
  border-bottom: 3px dashed var(--line);
}

.steps {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
}

.step {
  flex: 1;
  background: #fff;
  border: 3px solid var(--ink);
  padding: 36px 28px;
  box-shadow: var(--shadow-hard);
  text-align: center;
  max-width: 280px;
  position: relative;
}

.step:nth-child(1) { transform: rotate(-1deg); }
.step:nth-child(5) { transform: rotate(1deg); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  font-family: var(--pixel-font);
  font-size: 20px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 2px 2px 0 var(--ink);
}

.step h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step p {
  font-size: 16px;
  color: var(--ink-light);
}

.step-arrow {
  font-size: 48px;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================
   PRICING
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.price-card {
  background: #fff;
  border: 3px solid var(--ink);
  padding: 36px 32px;
  box-shadow: var(--shadow-hard);
  position: relative;
  transition: all 0.2s ease;
}

.price-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
}

.price-card.featured {
  background: #FFFDE7;
  transform: scale(1.05);
  border-color: var(--accent);
  border-width: 4px;
}

.price-card.featured:hover {
  transform: scale(1.05) translate(-3px, -3px);
}

.featured-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  background: var(--accent);
  color: #fff;
  padding: 6px 18px;
  font-family: var(--pixel-font);
  font-size: 10px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}

.price-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px dashed var(--line);
  margin-bottom: 24px;
}

.price-header h3 {
  font-family: var(--body-font);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.price {
  font-family: var(--body-font);
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.dollar {
  font-size: 32px;
  vertical-align: top;
  position: relative;
  top: 12px;
  margin-right: 2px;
}

.cents {
  font-size: 28px;
}

.per {
  font-family: var(--hand-font);
  font-size: 20px;
  color: var(--ink-light);
  margin-top: 4px;
}

.features-list {
  list-style: none;
  margin-bottom: 28px;
}

.features-list li {
  padding: 8px 0;
  font-size: 16px;
  border-bottom: 1px dashed var(--line);
}

.features-list li:last-child {
  border-bottom: none;
}

.features-list li.dimmed {
  color: #B0A994;
}

.price-card .btn {
  width: 100%;
  justify-content: center;
}

/* ============================================
   DOWNLOAD CTA
   ============================================ */

.download-card {
  background: #FFFDE7;
  border: 4px solid var(--ink);
  padding: 60px 40px;
  text-align: center;
  box-shadow: 8px 8px 0 var(--ink);
  max-width: 700px;
  margin: 0 auto;
  transform: rotate(-0.5deg);
}

.download-card h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
}

.download-card p {
  font-size: 18px;
  color: var(--ink-light);
  margin-bottom: 32px;
}

.system-req {
  font-family: var(--hand-font);
  font-size: 20px;
  color: var(--ink-light);
  margin-top: 20px;
}

/* ============================================
   FAQ
   ============================================ */

.faq {
  background: var(--bg-dark);
  border-top: 3px dashed var(--line);
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 3px solid var(--ink);
  padding: 20px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-hard);
  transition: all 0.15s ease;
}

.faq-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.faq-item[open] {
  background: #FFFDE7;
}

.faq-item summary {
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-light);
  line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 60px 0 30px;
  border-top: 4px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-brand .logo {
  margin-bottom: 16px;
  color: var(--bg);
}

.footer-brand .logo-text {
  color: var(--bg);
}

.footer-brand p {
  font-family: var(--hand-font);
  font-size: 20px;
  color: rgba(253, 246, 227, 0.8);
}

.footer-links h4 {
  font-family: var(--pixel-font);
  font-size: 12px;
  margin-bottom: 16px;
  color: var(--yellow);
}

.footer-links a {
  display: block;
  color: rgba(253, 246, 227, 0.8);
  text-decoration: none;
  padding: 6px 0;
  font-size: 16px;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px dashed rgba(253, 246, 227, 0.2);
  padding-top: 24px;
  text-align: center;
  font-family: var(--hand-font);
  font-size: 18px;
  color: rgba(253, 246, 227, 0.6);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #FFFDE7;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 16px 28px;
  font-family: var(--body-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 420px;
  border-radius: 4px;
}

.toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  background: #FFEBEE;
  border-color: #C62828;
}

.toast-success {
  background: #E8F5E9;
  border-color: var(--accent);
}

/* ============================================
   LEGAL PAGES (Privacy / Terms / Refund)
   ============================================ */

.legal-page {
  padding: 60px 0 100px;
  min-height: 70vh;
}

.legal-title {
  text-align: center;
  font-size: 56px;
  margin-bottom: 8px;
}

.legal-meta {
  text-align: center;
  font-family: var(--hand-font);
  font-size: 20px;
  color: var(--ink-light);
  margin-bottom: 56px;
}

.legal-section {
  background: #fff;
  border: 3px solid var(--ink);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-hard);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.legal-section:nth-child(odd) { transform: rotate(-0.2deg); }
.legal-section:nth-child(even) { transform: rotate(0.2deg); }

.legal-section h2 {
  font-family: var(--body-font);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
}

.legal-section h3 {
  font-family: var(--body-font);
  font-size: 19px;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--ink);
}

.legal-section p {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 14px;
  color: var(--ink);
}

.legal-section ul {
  margin: 14px 0 14px 24px;
}

.legal-section li {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 6px;
  color: var(--ink);
}

.legal-section a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.legal-section a:hover {
  background: var(--yellow);
}

.legal-section code {
  background: var(--bg-dark);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 15px;
  border: 1px solid var(--line);
}

.legal-section strong {
  color: var(--ink);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
  .hero-title, .hero-subtitle, .hero-cta, .hero-meta {
    animation: fadeUp 0.8s ease-out backwards;
  }
  .hero-subtitle { animation-delay: 0.1s; }
  .hero-cta { animation-delay: 0.2s; }
  .hero-meta { animation-delay: 0.3s; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
