/* Premium v2: decorative layer on top of portfolio.css.
   Hand-drawn lines, rotating stamps and tilted stickers. Only premium-v2.html loads this. */

.theme-premium { --ink-line: #c8ff4d; }

/* ---------- Hero with looping line ---------- */
.hero--v2 { position: relative; isolation: isolate; }
.hero--v2 > *:not(.doodle):not(.stamp) { position: relative; z-index: 1; }
.hero--v2 h1 { max-width: 13ch; }
.hero-wrap { position: relative; overflow: hidden; }

.doodle {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; overflow: visible;
}
.doodle path {
  fill: none; stroke: var(--ink-line); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.6s cubic-bezier(.6,.1,.2,1) .2s forwards;
}
.doodle--grid path { stroke-width: 2.5; opacity: .55; animation-duration: 3.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Rotating stamp ---------- */
.stamp {
  position: absolute; z-index: 2; width: 150px; aspect-ratio: 1;
  pointer-events: none;
}
.stamp svg { width: 100%; height: 100%; display: block; animation: spin 18s linear infinite; }
.stamp .stamp-core { animation: spin 18s linear infinite reverse; transform-origin: 60px 60px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stamp text { font-family: var(--font); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.hero--v2 .stamp { right: max(var(--gutter), 6%); top: 34%; }
.cta .stamp { position: absolute; right: 34%; top: -54px; width: 120px; }

/* ---------- Stickers (tilted pills) ---------- */
.sticker {
  display: inline-block; vertical-align: middle;
  font: 700 13px/1 var(--font); letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: #0b0b0c;
  transform: rotate(-6deg);
  box-shadow: 0 8px 24px -10px rgba(200,255,77,.55);
  white-space: nowrap;
}
.sticker--tilt-right { transform: rotate(5deg); }
.hero--v2 h1 .sticker { font-size: clamp(11px, 1vw, 14px); margin-left: 10px; position: relative; top: -0.9em; }

/* Touch screens can't hover, so the sticker says "tap" there */
.on-touch { display: none; }
@media (hover: none) { .on-hover { display: none; } .on-touch { display: inline; } }

/* ---------- Section title ---------- */
.section-head {
  max-width: 1500px; margin: 10px auto 22px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--display); font-size: clamp(30px, 4vw, 56px);
  letter-spacing: -0.035em; line-height: 1;
}

/* ---------- Grid with a line running behind the cards ---------- */
.grid-wrap { position: relative; }
.grid-wrap .grid { position: relative; z-index: 1; }

/* "Featured" sticker on the big card */
.card.featured { position: relative; }
.card.featured::before {
  content: "Featured build"; position: absolute; z-index: 3; top: 18px; left: 18px;
  font: 700 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 999px; background: var(--accent); color: #0b0b0c;
  transform: rotate(-5deg);
}

/* ---------- CTA ---------- */
.cta { position: relative; overflow: visible; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hero--v2 .stamp { width: 78px; right: 12px; top: 6px; }
  .hero-wrap > .doodle path { opacity: .5; }
  .cta .stamp { width: 88px; right: 16px; top: -40px; }
  .hero--v2 h1 .sticker { display: none; }
  .doodle--grid { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .doodle path { animation: none; stroke-dashoffset: 0; }
  .stamp svg, .stamp .stamp-core { animation: none; }
}
