/* Pure-CSS acoustic guitar illustration — same spirit as piano.css (3D
   keyboard) and drum.css (drummer + kit): hand-built from flat shapes,
   not an image. A guitar body's curves don't map onto piano.css's flat
   cuboid-face 3D technique, so this follows drum.css's approach instead:
   layered 2D divs (circles, rounded rectangles, gradients) composed into
   a recognizable silhouette, with a subtle idle animation for life. */

/* Sizing/scaling lives on this outer wrapper, never on .cssguitar itself:
   .cssguitar already animates its own `transform` (the sway below), and a
   CSS animation completely overrides any statically-set transform on the
   SAME element/property — a media query trying to scale() .cssguitar
   directly would silently never apply. Splitting sizing from rotation
   across two elements avoids that trap entirely. */
.cssguitar-wrap {
  width: 220px;
  max-width: 100%;
  margin: 30px auto 0;
}

.cssguitar {
  position: relative;
  width: 220px;
  height: 460px;
  transform-origin: 50% 0%;
  animation: cssguitar-sway 4.5s ease-in-out infinite;
}

@keyframes cssguitar-sway {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}

/* Headstock */
.cssguitar__headstock {
  position: absolute;
  top: 0;
  left: 50%;
  width: 68px;
  height: 84px;
  margin-left: -34px;
  background: linear-gradient(160deg, #8b5a2b, #5c3a1a);
  border-radius: 10px 10px 22px 22px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.18);
  z-index: 3;
}

.cssguitar__peg {
  position: absolute;
  width: 18px;
  height: 6px;
  background-color: #d8b26a;
  border-radius: 3px;
  box-shadow: 0 0 0 3px #5c3a1a inset;
}

.cssguitar__peg--l1 { top: 10px; left: -16px; }
.cssguitar__peg--l2 { top: 30px; left: -18px; }
.cssguitar__peg--l3 { top: 50px; left: -16px; }
.cssguitar__peg--r1 { top: 10px; right: -16px; }
.cssguitar__peg--r2 { top: 30px; right: -18px; }
.cssguitar__peg--r3 { top: 50px; right: -16px; }

/* Neck */
.cssguitar__neck {
  position: absolute;
  top: 78px;
  left: 50%;
  width: 36px;
  height: 190px;
  margin-left: -18px;
  background: linear-gradient(90deg, #a9713f 0%, #c68642 50%, #a9713f 100%);
  z-index: 2;
}

.cssguitar__fret {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.55);
}

.cssguitar__fret:nth-of-type(1) { top: 30px; }
.cssguitar__fret:nth-of-type(2) { top: 66px; }
.cssguitar__fret:nth-of-type(3) { top: 102px; }
.cssguitar__fret:nth-of-type(4) { top: 138px; }
.cssguitar__fret:nth-of-type(5) { top: 174px; }

/* Strings run the full length of the instrument, neck and body alike */
.cssguitar__string {
  position: absolute;
  top: 6px;
  width: 1.5px;
  height: 420px;
  background-color: rgba(255, 255, 255, 0.75);
  z-index: 4;
  transform-origin: top center;
  animation: cssguitar-strum 2.6s ease-in-out infinite;
}

.cssguitar__string--1 { left: 26%; animation-delay: 0s; }
.cssguitar__string--2 { left: 37%; animation-delay: 0.15s; }
.cssguitar__string--3 { left: 48%; animation-delay: 0.3s; }
.cssguitar__string--4 { left: 59%; animation-delay: 0.45s; }
.cssguitar__string--5 { left: 70%; animation-delay: 0.6s; }
.cssguitar__string--6 { left: 81%; animation-delay: 0.75s; }

@keyframes cssguitar-strum {
  0%, 100% { transform: scaleX(1); opacity: 0.75; }
  50% { transform: scaleX(2.5); opacity: 0.35; }
}

/* Body: two overlapping circles form the figure-8, pinched at the waist
   by two notches painted in the page's own background color. */
.cssguitar__body {
  position: absolute;
  top: 210px;
  left: 0;
  width: 220px;
  height: 250px;
}

.cssguitar__upper-bout {
  position: absolute;
  top: 0;
  left: 50%;
  width: 148px;
  height: 148px;
  margin-left: -74px;
  border-radius: 50%;
  background: linear-gradient(160deg, #d9995b, #a9713f);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.cssguitar__lower-bout {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 216px;
  height: 216px;
  margin-left: -108px;
  border-radius: 50%;
  background: linear-gradient(160deg, #d9995b, #8b5a2b);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2);
}

.cssguitar__waist {
  position: absolute;
  top: 96px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #ffffff;
}

.cssguitar__waist--left { left: -22px; }
.cssguitar__waist--right { right: -22px; }

.cssguitar__rosette {
  position: absolute;
  bottom: 68px;
  left: 50%;
  width: 76px;
  height: 76px;
  margin-left: -38px;
  border-radius: 50%;
  border: 5px solid #0fcfdc;
  opacity: 0.85;
}

.cssguitar__soundhole {
  position: absolute;
  bottom: 84px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  background-color: #2b1b12;
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.6);
}

.cssguitar__bridge {
  position: absolute;
  bottom: 30px;
  left: 50%;
  width: 60px;
  height: 14px;
  margin-left: -30px;
  background-color: #2b1b12;
  border-radius: 3px;
}

.cssguitar__pickguard {
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 40px;
  height: 90px;
  margin-left: 18px;
  background-color: rgba(0, 0, 0, 0.12);
  border-radius: 50% 10% 10% 50% / 60% 30% 30% 60%;
  transform: rotate(-8deg);
}

@media (max-width: 767px) {
  .cssguitar-wrap {
    transform: scale(0.72);
    transform-origin: top center;
    margin-top: 10px;
  }
}
