/* ==========================================================================
   AWOOGA — Boat Anatomy explorer
   Hotspot overlay + slide-in detail panel. Uses the shared design tokens.
   ========================================================================== */

/* ---------- Hero ---------------------------------------------------------- */
.an-hero { background: var(--navy-900); color: var(--cream); padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.an-hero h1 { color: var(--cream); font-size: clamp(2rem, 5vw, 3.2rem); }
.an-hero h1 em { color: var(--brass-lt); font-style: italic; }
.an-hero .lead { color: rgba(247, 241, 227, 0.84); }
.an-hero .eyebrow { color: var(--brass-lt); }

/* ---------- Explorer layout ---------------------------------------------- */
.anatomy {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: start;
}
.an-stage {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  border: clamp(9px, 1.8vw, 14px) solid var(--navy-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-800);
  line-height: 0;
  box-shadow:
    0 0 0 1px var(--brass),                 /* crisp brass edge around the frame */
    0 22px 48px rgba(12, 32, 52, 0.30),     /* soft floating drop shadow */
    0 3px 10px rgba(12, 32, 52, 0.20);
}
/* Brass hairline matting that sits just inside the frame, over the photo */
.an-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 162, 39, 0.55);
  pointer-events: none;
  z-index: 2;
}
.an-photo { width: 100%; height: auto; display: block; }

/* ---------- Hotspots ------------------------------------------------------ */
.an-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px; height: 30px;
  padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer;
  touch-action: none;
}
.an-dot__core {
  position: absolute; inset: 50% auto auto 50%;
  width: 16px; height: 16px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(12, 32, 52, 0.45);
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.an-dot__pulse {
  position: absolute; inset: 50% auto auto 50%;
  width: 16px; height: 16px; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--brass);
  opacity: 0.55;
  animation: an-pulse 2.4s ease-out infinite;
}
@keyframes an-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.55; }
  70%  { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
  100% { opacity: 0; }
}
.an-dot__label {
  position: absolute;
  left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  background: var(--navy-900);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.78rem; font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.an-dot:hover .an-dot__core,
.an-dot.is-active .an-dot__core { transform: translate(-50%, -50%) scale(1.35); background: var(--red); }
.an-dot:hover .an-dot__label,
.an-dot:focus-visible .an-dot__label { opacity: 1; transform: translateX(-50%) translateY(0); }
.an-dot:focus-visible { outline: 3px solid var(--brass-lt); outline-offset: 4px; border-radius: 50%; }
.an-dot.is-active .an-dot__pulse { animation: none; opacity: 0; }

/* ---------- Detail panel -------------------------------------------------- */
.an-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(92vw, 420px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.6rem;
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform 0.4s var(--ease);
  z-index: 60;
}
.anatomy.is-open .an-panel { transform: none; }
.an-panel__close {
  position: absolute; top: 0.8rem; right: 1rem;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 1.6rem; line-height: 1; color: var(--ink-soft);
}
.an-panel__close:hover { background: var(--navy-900); color: var(--cream); }
.an-panel__eyebrow {
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.7rem;
  font-weight: 700; color: var(--wood-dk); margin: 0 0 0.5rem;
}
.an-panel h3 { font-size: 1.6rem; margin: 0 0 0.3rem; }
.an-panel__spec {
  display: inline-block;
  background: var(--cream-2); color: var(--navy-800);
  font-weight: 600; font-size: 0.85rem;
  padding: 0.25rem 0.7rem; border-radius: 999px; margin: 0 0 1rem;
}
.an-panel__fig { margin: 0 0 1rem; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.an-panel__fig img { width: 100%; height: auto; }
.an-panel p { color: var(--text-soft); }
.an-panel__cta { margin-top: 0.6rem; }

/* Dim the page when the panel is open (visitor mode only) */
.anatomy::after {
  content: ""; position: fixed; inset: 0; background: rgba(12, 32, 52, 0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease); z-index: 55;
}
.anatomy.is-open:not(.an-editing)::after { opacity: 1; pointer-events: auto; }

/* ---------- Hint chips below the photo ----------------------------------- */
.an-hint {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; color: var(--text-soft); margin-top: 1rem;
}
.an-hint b { color: var(--navy-800); }

/* ---------- Calibration / edit mode -------------------------------------- */
.an-editbar {
  grid-column: 1 / -1;
  background: var(--navy-900); color: var(--cream);
  padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
}
.an-editbar .btn { padding: 0.5rem 1rem; font-size: 0.85rem; color: var(--cream); }
.an-copied { color: var(--brass-lt); font-weight: 700; }
.an-editing .an-panel { transform: none; box-shadow: var(--shadow); }
.an-editing .an-dot { cursor: grab; }
.an-fld { display: block; margin: 0 0 0.7rem; }
.an-fld span { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 0.25rem; }
.an-fld input, .an-fld textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 0.9rem;
  padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.an-coord { font-size: 0.85rem; color: var(--text-soft); }
.an-del { color: var(--red); border-color: var(--red); margin-top: 0.4rem; }

/* On wide screens, keep the editor panel docked beside the photo */
@media (min-width: 1100px) {
  .anatomy.an-editing { grid-template-columns: 1fr 420px; }
  .an-editing .an-panel { position: static; width: auto; transform: none; max-height: 80vh; }
}

/* ---------- 360° Web Portal banner --------------------------------------- */
.an-banner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2.2rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(201, 162, 39, 0.18), transparent 55%),
    linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: var(--cream);
  box-shadow: var(--shadow);
  border: 1px solid rgba(247, 241, 227, 0.12);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.an-banner:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.an-banner__badge {
  flex: none;
  display: grid; place-items: center;
  width: clamp(70px, 12vw, 104px); height: clamp(70px, 12vw, 104px);
  border-radius: 50%;
  background: var(--brass);
  color: var(--navy-900);
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem);
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.4);
  animation: an-spin 14s linear infinite;
}
@keyframes an-spin { to { transform: rotate(360deg); } }
.an-banner__text { flex: 1; min-width: 0; }
.an-banner__eyebrow {
  text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.72rem; font-weight: 700; color: var(--brass-lt);
  margin: 0 0 0.3rem;
}
.an-banner__text h2 { color: var(--cream); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 0.4rem; }
.an-banner__text h2 em { color: var(--brass-lt); font-style: italic; }
.an-banner__sub { color: rgba(247, 241, 227, 0.82); margin: 0; max-width: 52ch; }
.an-banner__cta { flex: none; }

@media (prefers-reduced-motion: reduce) { .an-banner__badge { animation: none; } }
@media (max-width: 760px) {
  .an-banner { flex-direction: column; text-align: center; }
  .an-banner__sub { margin-inline: auto; }
}
