/* Éloge Atelier — Painterly Earthy */
:root {
  --cream: #F2E9DC;
  --paper: #EDE2D0;
  --terracotta: #B4633A;
  --sage: #7A8B5C;
  --ink: #2D2A24;
  --ochre: #C8924A;
  --rose: #C97B6E;
  --amber: #D9A441;
  --shadow: rgba(45, 42, 36, 0.12);
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --script: 'Caveat', 'Brush Script MT', cursive;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

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

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: clip;
  cursor: none;
}

/* Paper texture background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(180, 99, 58, 0.04) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(122, 139, 92, 0.05) 0, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(45, 42, 36, 0.02) 0, transparent 60%);
  mix-blend-mode: multiply;
}

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

#app { position: relative; z-index: 2; }

/* Headings */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.05; }
.script { font-family: var(--script); font-weight: 600; letter-spacing: 0; }
.mono { font-family: var(--mono); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.18em; }

/* Cursor */
.cursor-dot {
  position: fixed;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--terracotta);
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: multiply;
  transform: translate(-50%, -50%);
  transition: width 0.18s, height 0.18s, background 0.3s;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}

/* Drips & paint trail layer */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  overflow: hidden;
}

/* Splash element */
.splash {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: multiply;
  filter: blur(0.4px);
  animation: splash-grow 1.2s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes splash-grow {
  0% { transform: scale(0.2); opacity: 0; }
  20% { opacity: 0.85; }
  100% { transform: scale(1.4); opacity: 0; }
}

.drip {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  pointer-events: none;
  mix-blend-mode: multiply;
  animation: drip-fall 1.6s ease-in forwards;
}
@keyframes drip-fall {
  0% { transform: translateY(0) scale(1); opacity: 0.9; }
  100% { transform: translateY(120px) scale(0.6); opacity: 0; }
}

.trail-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: multiply;
  animation: trail-fade 1.2s ease-out forwards;
}
@keyframes trail-fade {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(0.2); opacity: 0; }
}

/* Layout */
section {
  position: relative;
  padding: 8rem 6vw;
  z-index: 2;
}

.container { max-width: 1280px; margin: 0 auto; }

/* Painterly placeholder image */
.placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(45,42,36,0.04) 0 8px, transparent 8px 18px),
    linear-gradient(160deg, var(--paper), var(--cream));
  border: 1px solid rgba(45,42,36,0.12);
  position: relative;
  overflow: hidden;
}
.placeholder::after {
  content: attr(data-label);
  position: absolute;
  bottom: 0.8rem; left: 0.8rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(45,42,36,0.55);
}

/* Watercolor blob */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}

/* Tape */
.tape {
  position: absolute;
  width: 90px; height: 22px;
  background: rgba(217, 164, 65, 0.45);
  transform: rotate(-6deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tape::before, .tape::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 4px;
  background-image: radial-gradient(circle at 50% 0, transparent 2px, rgba(217,164,65,0.45) 2px);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  cursor: none;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.btn:hover { background: var(--terracotta); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--cream); }

/* Tweaks panel */
.tweaks {
  position: fixed;
  bottom: 1.2rem; right: 1.2rem;
  background: var(--paper);
  border: 1px solid rgba(45,42,36,0.2);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  z-index: 11000;
  width: 270px;
  box-shadow: 0 10px 30px var(--shadow);
  font-family: var(--mono);
  font-size: 0.7rem;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.8rem;
  color: var(--ink);
}
.tweaks .row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.55rem 0; }
.tweaks .swatches { display: flex; gap: 6px; }
.tweaks .swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid transparent;
  cursor: none;
  display: flex; align-items: center; justify-content: center;
}
.tweaks .swatch.active { border-color: var(--ink); }
.tweaks select, .tweaks button {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: var(--cream);
  border: 1px solid rgba(45,42,36,0.2);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  color: var(--ink);
  cursor: none;
}

/* Misc */
hr.brushy {
  border: none;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 14' preserveAspectRatio='none'><path d='M0 8 Q 200 2 400 7 T 800 6 T 1200 8 L 1200 12 Q 900 14 600 11 T 0 13 Z' fill='%232D2A24' opacity='0.7'/></svg>");
  background-size: 100% 100%;
  margin: 0;
}

a { color: inherit; text-decoration: none; cursor: none; }

@media (max-width: 768px) {
  html, body { font-size: 16px; cursor: auto; }
  section { padding: 4rem 5vw; }
  .cursor-dot, .cursor-ring { display: none; }
  button, a, input, select, [role="button"] { cursor: auto; }
}

/* Selection */
::selection { background: var(--terracotta); color: var(--cream); }

/* Make sure interactive elements show pointer cursor (we override with custom) */
button, a, input, select, [role="button"] { cursor: none; }
