/* Maryumm — pocket art journal */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Patrick+Hand&family=Shadows+Into+Light&family=Gloock&family=Caveat+Brush&display=swap');

:root {
  --paper: #faf2e1;
  --paper-warm: #f6e9c8;
  --paper-shadow: #e8d8b3;
  --ink: #2b2419;
  --ink-soft: #4a3f2c;
  --ink-faded: #7a6a4f;

  --peach: #ffc7a8;
  --peach-deep: #ff9d75;
  --butter: #ffe49a;
  --butter-deep: #f6c84a;
  --mint: #b9e6cf;
  --mint-deep: #6fc99c;
  --lavender: #d6c5ee;
  --lavender-deep: #9b7fd0;
  --coral: #ff8e7e;
  --coral-deep: #e85a48;
  --sky: #b9d6f2;
  --sky-deep: #6ea3d8;

  --tape-yellow: rgba(255, 226, 130, 0.78);
  --tape-pink: rgba(255, 168, 180, 0.7);
  --tape-mint: rgba(149, 220, 188, 0.72);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Patrick Hand', cursive;
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* paper texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(232,202,140,0.18), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(220,180,140,0.16), transparent 55%),
    repeating-radial-gradient(circle at 30% 40%, transparent 0 2px, rgba(140,110,70,0.012) 2px 3px);
  mix-blend-mode: multiply;
}

/* fine grain noise */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.14 0 0 0 0 0.08 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.18'/></svg>");
  mix-blend-mode: multiply;
}

#root { position: relative; z-index: 3; }

/* type */
h1, h2, h3, h4 { font-family: 'Caveat', cursive; font-weight: 700; margin: 0; line-height: 1; color: var(--ink); }
.script  { font-family: 'Shadows Into Light', cursive; }
.brush   { font-family: 'Caveat Brush', cursive; }
.serif   { font-family: 'Gloock', serif; font-weight: 400; }
.hand    { font-family: 'Patrick Hand', cursive; }

/* underline scribble */
.scribble { position: relative; display: inline-block; }
.scribble::after {
  content: '';
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -8px;
  height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M2 9 C 30 2, 60 13, 90 6 S 150 12, 198 5' stroke='%232b2419' stroke-width='2.4' fill='none' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
}

/* washi tape */
.tape {
  position: absolute;
  width: 110px;
  height: 28px;
  background: var(--tape-yellow);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.25);
  z-index: 4;
  pointer-events: none;
}
.tape::before, .tape::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 6px;
  background:
    linear-gradient(45deg, transparent 33%, currentColor 33% 66%, transparent 66%) 0 0/6px 6px;
  color: var(--paper);
  opacity: 0.65;
}
.tape::before { left: 0; }
.tape::after  { right: 0; transform: scaleX(-1); }
.tape.pink { background: var(--tape-pink); }
.tape.mint { background: var(--tape-mint); }

/* polaroid */
.polaroid {
  background: #fff;
  padding: 14px 14px 46px;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.04),
    0 14px 24px -10px rgba(80, 60, 30, 0.35),
    0 30px 50px -20px rgba(80, 60, 30, 0.25);
  position: relative;
  display: inline-block;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.4);
  cursor: grab;
}
.polaroid:hover { cursor: default; } /* 3D tilt handled by JS */
.polaroid .frame {
  background: #efe9dd;
  overflow: hidden;
  position: relative;
}
.polaroid .caption {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--ink-soft);
}

/* claymation puffy button / blob — multi-layer 3D feel */
.clay {
  position: relative;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  color: var(--ink);
  padding: 18px 32px;
  font-size: 28px;
  background: var(--peach);
  box-shadow:
    inset 0 -8px 12px rgba(0,0,0,0.08),
    inset 0 8px 14px rgba(255,255,255,0.55),
    inset 6px 4px 10px rgba(255,255,255,0.55),
    0 6px 0 rgba(180,120,80,0.35),
    0 14px 26px -8px rgba(120, 80, 40, 0.45),
    0 28px 40px -16px rgba(120, 80, 40, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
  user-select: none;
}
.clay:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 -6px 10px rgba(0,0,0,0.12),
    inset 0 6px 12px rgba(255,255,255,0.45),
    0 2px 0 rgba(180,120,80,0.35),
    0 6px 14px -6px rgba(120, 80, 40, 0.45);
}
.clay.butter { background: var(--butter); box-shadow:
    inset 0 -8px 12px rgba(0,0,0,0.06),
    inset 0 8px 14px rgba(255,255,255,0.65),
    inset 6px 4px 10px rgba(255,255,255,0.6),
    0 6px 0 rgba(190,150,40,0.35),
    0 14px 26px -8px rgba(140, 110, 30, 0.45),
    0 28px 40px -16px rgba(140, 110, 30, 0.3);
}
.clay.mint { background: var(--mint); box-shadow:
    inset 0 -8px 12px rgba(0,0,0,0.06),
    inset 0 8px 14px rgba(255,255,255,0.65),
    inset 6px 4px 10px rgba(255,255,255,0.6),
    0 6px 0 rgba(80,160,120,0.35),
    0 14px 26px -8px rgba(50, 120, 90, 0.45),
    0 28px 40px -16px rgba(50, 120, 90, 0.3);
}
.clay.lavender { background: var(--lavender); box-shadow:
    inset 0 -8px 12px rgba(0,0,0,0.06),
    inset 0 8px 14px rgba(255,255,255,0.7),
    inset 6px 4px 10px rgba(255,255,255,0.6),
    0 6px 0 rgba(130,100,180,0.35),
    0 14px 26px -8px rgba(100, 70, 150, 0.45),
    0 28px 40px -16px rgba(100, 70, 150, 0.3);
}
.clay.coral { background: var(--coral); color: #fff; box-shadow:
    inset 0 -8px 12px rgba(0,0,0,0.10),
    inset 0 8px 14px rgba(255,255,255,0.45),
    inset 6px 4px 10px rgba(255,255,255,0.4),
    0 6px 0 rgba(170,60,50,0.45),
    0 14px 26px -8px rgba(170, 60, 50, 0.45),
    0 28px 40px -16px rgba(170, 60, 50, 0.3);
}

/* claymation BLOB (decorative) */
.blob {
  position: absolute;
  border-radius: 50% 60% 55% 45% / 60% 50% 50% 40%;
  filter: blur(0.2px);
  pointer-events: none;
  z-index: 1;
}
.blob.peach { background: radial-gradient(at 35% 30%, #ffd8bd, var(--peach) 55%, var(--peach-deep)); box-shadow: inset -10px -16px 30px rgba(180,90,50,0.35), inset 10px 14px 28px rgba(255,255,255,0.6), 0 30px 50px -16px rgba(180,90,50,0.35); }
.blob.butter { background: radial-gradient(at 35% 30%, #fff1b8, var(--butter) 55%, var(--butter-deep)); box-shadow: inset -10px -16px 30px rgba(180,140,30,0.3), inset 10px 14px 28px rgba(255,255,255,0.65), 0 30px 50px -16px rgba(180,140,30,0.3); }
.blob.mint { background: radial-gradient(at 35% 30%, #d8f4e6, var(--mint) 55%, var(--mint-deep)); box-shadow: inset -10px -16px 30px rgba(50,140,100,0.3), inset 10px 14px 28px rgba(255,255,255,0.65), 0 30px 50px -16px rgba(50,140,100,0.25); }
.blob.lavender { background: radial-gradient(at 35% 30%, #ece0f9, var(--lavender) 55%, var(--lavender-deep)); box-shadow: inset -10px -16px 30px rgba(110,80,170,0.3), inset 10px 14px 28px rgba(255,255,255,0.7), 0 30px 50px -16px rgba(110,80,170,0.25); }
.blob.coral { background: radial-gradient(at 35% 30%, #ffc1b6, var(--coral) 55%, var(--coral-deep)); box-shadow: inset -10px -16px 30px rgba(190,70,55,0.35), inset 10px 14px 28px rgba(255,255,255,0.5), 0 30px 50px -16px rgba(190,70,55,0.3); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-14px) rotate(calc(var(--rot, 0deg) + 3deg)); }
}
.float { animation: float 7s ease-in-out infinite; }

@keyframes wobble {
  0%, 100% { transform: rotate(var(--r, -2deg)); }
  50%      { transform: rotate(calc(var(--r, -2deg) + 4deg)); }
}

/* sticky note */
.sticky {
  background: var(--butter);
  padding: 18px 18px 22px;
  font-family: 'Patrick Hand', cursive;
  font-size: 18px;
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.05),
    0 14px 24px -8px rgba(170, 130, 50, 0.45),
    inset 0 -10px 18px rgba(170,130,50,0.06);
  position: relative;
  cursor: grab;
}
.sticky.mint { background: var(--mint); box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 14px 24px -8px rgba(60, 140, 100, 0.4); }
.sticky.peach { background: var(--peach); box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 14px 24px -8px rgba(190, 110, 70, 0.4); }
.sticky.lavender { background: var(--lavender); box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 14px 24px -8px rgba(120, 90, 170, 0.4); }
.sticky::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 30%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  pointer-events: none;
}

/* section */
section {
  position: relative;
  padding: 110px 6vw;
  z-index: 3;
}

/* paper edge / chapter divider */
.chapter-tab {
  position: absolute;
  top: -2px;
  right: 6vw;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 22px 14px;
  font-family: 'Caveat Brush', cursive;
  font-size: 24px;
  letter-spacing: 0.04em;
  border-radius: 0 0 6px 6px;
  z-index: 6;
  box-shadow: 0 8px 14px -6px rgba(0,0,0,0.4);
  white-space: nowrap;
}

/* ink doodle helpers */
.doodle { position: absolute; pointer-events: none; }

/* drop slot (for image-slot) */
image-slot {
  display: block;
  width: 100%;
  height: 100%;
}
.frame image-slot {
  --slot-bg: #efe9dd;
}

/* cursor ink dots */
.ink-dot {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
  z-index: 9999;
  opacity: 0.55;
  transition: opacity 1.2s ease, transform 1.2s ease;
}

/* link */
a { color: var(--ink); text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--coral-deep); }

/* utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { display: flex; align-items: center; justify-content: center; }

/* Responsive toning down */
@media (max-width: 800px) {
  section { padding: 80px 5vw; }
}

/* ── Responsive: tablet ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Chapter tab: prevent clipping on narrow screens */
  .chapter-tab {
    font-size: 18px;
    padding: 8px 16px 12px;
    right: 4vw;
  }
}

/* ── Responsive: mobile ─────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* About: collapse to single column, hide overlapping polaroids */
  .about-grid {
    grid-template-columns: 1fr !important;
  }
  .about-photo-col {
    display: none !important;
  }

  /* Polaroid: prevent fixed widths from overflowing small screens */
  .polaroid {
    max-width: calc(100vw - 40px);
  }

  /* Sticky notes: scale down */
  .sticky {
    font-size: 16px !important;
    padding: 14px 14px 18px !important;
  }
}

/* ── Art carousel ────────────────────────────────────────────────────────── */
#art .polaroid {
  /* carousel cards should not have a hover transform from the base class */
  cursor: pointer;
}

/* carousel dot buttons reset */
#art button[aria-label] {
  outline: none;
}
#art button[aria-label]:focus-visible {
  outline: 2px solid var(--coral-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Floating art words ─────────────────────────────────────────────────── */
@keyframes floatWord {
  0%,100% { transform: translateY(0)     rotate(var(--rot,0deg)); opacity: var(--opacity,.14); }
  33%      { transform: translateY(-18px) rotate(calc(var(--rot,0deg) + 2.5deg)); opacity: calc(var(--opacity,.14) * 1.4); }
  66%      { transform: translateY(9px)   rotate(calc(var(--rot,0deg) - 1.5deg)); opacity: var(--opacity,.14); }
}
.float-word {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  animation: floatWord var(--dur,9s) ease-in-out infinite;
  color: var(--ink);
  z-index: 2;
  white-space: nowrap;
}

/* ── Painted brush underline behind chapter title words ─────────────────── */
.brush-underline {
  position: relative;
  display: inline-block;
}
.brush-underline::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: -6px;
  right: -6px;
  height: 20px;
  background: currentColor;
  opacity: 0.2;
  border-radius: 8px 14px 10px 6px / 10px 8px 14px 6px;
  transform: rotate(-0.8deg);
  z-index: -1;
}

/* ── Brush divider ───────────────────────────────────────────────────────── */
.brush-divider {
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 70px;
  z-index: 2;
  pointer-events: none;
  margin: -2px 0;
}

/* ── Paint splash decoration ────────────────────────────────────────────── */
.paint-splash {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 480px) {
  /* Section padding reduction */
  section { padding: 60px 4vw; }

  /* Clay buttons: smaller on mobile */
  .clay {
    font-size: 22px !important;
    padding: 14px 24px !important;
  }

  /* Hero buttons: stack vertically */
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }
}
