@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Amiri:wght@400;700&display=swap');

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

:root {
  --paper-white: #fdfbf7;
  --paper-cream: #faf8f3;
  --paper-warm: #f5f0e8;
  --ink-dark: #2c2c2c;
  --ink-medium: #4a4a4a;
  --ink-light: #6b6b6b;
  --ink-faded: #999;
  --accent-terracotta: #c46a4c;
  --accent-sage: #7a9e7e;
  --accent-blue: #5a7fb8;
  --line-color: #e8e4dc;
  --shadow-paper: 0 20px 60px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
  --shadow-lift: 0 30px 80px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper-white: #1e1e1e;
    --paper-cream: #252525;
    --paper-warm: #2d2a26;
    --ink-dark: #f0ebe6;
    --ink-medium: #d4cfc8;
    --ink-light: #a8a39a;
    --ink-faded: #7a7670;
    --line-color: #3a3632;
    --shadow-paper: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.02);
    --shadow-lift: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  }
}

body {
  font-family: 'Cairo', sans-serif;
  background: linear-gradient(135deg, #f0ebe6 0%, #e8e4dc 50%, #ded9d2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 50%, #252525 100%);
  }
}

.paper-sheet {
  width: 100%;
  max-width: 720px;
  background: var(--paper-white);
  border-radius: 4px;
  box-shadow: var(--shadow-paper);
  position: relative;
  overflow: hidden;
  animation: paperEnter 0.6s ease-out;
}

@keyframes paperEnter {
  from { opacity: 0; transform: translateY(20px) rotate(-0.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.paper-texture {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' 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)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 10;
}

.paper-clip {
  position: absolute;
  top: -12px;
  right: 40px;
  width: 36px;
  height: 36px;
  background: var(--accent-terracotta);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 4px 12px rgba(196, 106, 76, 0.3);
  z-index: 5;
}

.paper-clip::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: var(--paper-white);
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.header {
  padding: 60px 40px 40px;
  text-align: center;
  border-bottom: 1px solid var(--line-color);
  position: relative;
  z-index: 1;
}

.title {
  font-family: 'Amiri', serif;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--ink-dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--ink-light);
  font-weight: 400;
}

.divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-terracotta), transparent);
  margin: 24px auto 0;
  border-radius: 1px;
}

.content {
  padding: 40px;
  position: relative;
  z-index: 1;
}

.intro {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px dashed var(--line-color);
}

.intro h2,
.concept h2,
.card h3 {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--ink-dark);
  margin-bottom: 16px;
  padding-right: 16px;
  border-right: 3px solid var(--accent-terracotta);
}

.intro p,
.card p,
.concept p {
  color: var(--ink-medium);
  line-height: 1.85;
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.highlight {
  background: linear-gradient(120deg, rgba(196, 106, 76, 0.15) 0%, rgba(122, 158, 126, 0.15) 100%);
  padding: 12px 16px;
  border-radius: 8px;
  border-right: 3px solid var(--accent-sage);
  margin: 16px 0;
}

.card {
  background: var(--paper-cream);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  font-size: 1.5rem;
  background: var(--paper-warm);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card h3 {
  font-size: 1.25rem;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--ink-dark);
}

.card ul,
.concept ul {
  list-style: none;
  padding-right: 8px;
}

.card li,
.concept li {
  position: relative;
  padding: 10px 0 10px 28px;
  color: var(--ink-medium);
  line-height: 1.7;
  border-bottom: 1px solid var(--line-color);
}

.card li:last-child,
.concept li:last-child {
  border-bottom: none;
}

.card li::before,
.concept li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--accent-terracotta);
  border-radius: 50%;
  opacity: 0.8;
}

.concept {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-color);
}

.concept:last-of-type {
  border-bottom: none;
  margin-bottom: 24px;
  padding-bottom: 0;
}

.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 14px 32px;
  background: var(--ink-dark);
  color: var(--paper-white);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s ease;
  border: 2px solid var(--ink-dark);
}

.btn:hover {
  background: transparent;
  color: var(--ink-dark);
  transform: translateY(-2px);
}

.footer {
  padding: 32px 40px;
  text-align: center;
  border-top: 1px solid var(--line-color);
  color: var(--ink-faded);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.footer strong {
  color: var(--ink-medium);
}

.page-number {
  margin-top: 8px;
  font-family: 'Amiri', serif;
  font-size: 1.1rem;
  color: var(--accent-terracotta);
}

@media (max-width: 600px) {
  .paper-sheet {
    border-radius: 0;
    min-height: 100vh;
  }
  
  .content, .header, .footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .paper-clip {
    right: 24px;
  }
}

/* Print styles */
@media print {
  body { background: white; padding: 0; }
  .paper-sheet { box-shadow: none; border: 1px solid #ddd; }
  .paper-texture { display: none; }
  .paper-clip { display: none; }
  .btn { display: none; }
  .card { break-inside: avoid; }
}