
/* ─────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES
   Central palette drawn from the teal + yellow desk illustration.
   ───────────────────────────────────────────────────────────── */
:root {
  --color-bg:          #0d1b2a;   /* deep navy page background          */
  --color-header-bg:   #0a2233;   /* slightly lighter navy for header   */
  --color-teal:        #2ec4b6;   /* accent from the desk illustration  */
  --color-yellow:      #ffbf00;   /* accent from the window blind       */
  --color-text:        #e8f4f8;   /* off-white body text                */
  --color-muted:       #7faabd;   /* secondary / hint text              */
  --font-display:      'Fredoka One', cursive;
  --font-body:         'Nunito', sans-serif;
  --border-radius-lg:  16px;
  --transition-fast:   160ms ease;
  --transition-med:    300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ─────────────────────────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Smooth scroll used if any in-page anchor links are added */
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;

  /* Stacked flex column so header / main / footer fill the viewport */
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Subtle radial glow behind the desk scene */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 60%,
      rgba(46, 196, 182, 0.08) 0%,
      transparent 70%);
}

/* Remove default list / anchor styling sitewide */
a {
  color: inherit;
  text-decoration: none;
}


/* ─────────────────────────────────────────────────────────────
   3. PAGE LAYOUT
   ───────────────────────────────────────────────────────────── */
.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 1280px;
  padding-inline: clamp(16px, 4vw, 48px);
}


/* ─────────────────────────────────────────────────────────────
   4. SITE HEADER
   ───────────────────────────────────────────────────────────── */
.site-header {
  padding-block: 28px 18px;

  /* Slide down + fade in when the page loads */
  animation: slideDown 0.6s ease both;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--color-yellow);

  /* Text shadow gives a warm glow to the title */
  text-shadow:
    0 0 30px rgba(255, 191, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.6);

  letter-spacing: 0.02em;
}

.site-tagline {
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  color: var(--color-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}


/* ─────────────────────────────────────────────────────────────
   5. DESK SCENE WRAPPER
   ───────────────────────────────────────────────────────────── */
.desk-scene-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 12px 24px;
  gap: 14px;
}

/* The container that holds both the image and SVG overlay */
.desk-scene {
  position: relative;     /* establishes a stacking context for child elements */
  width: 100%;
  max-width: 1140px;

  /* Decorative glowing border */
  border-radius: var(--border-radius-lg);
  box-shadow:
    0 0 0 2px rgba(46, 196, 182, 0.25),
    0 0 40px rgba(46, 196, 182, 0.12),
    0 20px 60px rgba(0, 0, 0, 0.55);

  overflow: hidden;       /* clip the image to the rounded corners */
}


/* ─────────────────────────────────────────────────────────────
   6. DESK IMAGE
   display: block removes the mystery 4px gap below inline images.
   object-fit: cover fills the container without distortion.
   ───────────────────────────────────────────────────────────── */
.desk-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;       /* prevents accidental text / drag selection */
  -webkit-user-drag: none;
}


/* ─────────────────────────────────────────────────────────────
   IMAGE HOTSPOTS (REPLACES SVG SYSTEM)
   ───────────────────────────────────────────────────────────── */

/* Layer sits on top of the desk image */
.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Each clickable hotspot */
.hotspot-item {
  position: absolute;

  /* Maintain 1000x563 coordinate system */
  left: calc(var(--x) / 1000 * 100%);
  top: calc(var(--y) / 563 * 100%);
  width: calc(var(--w) / 1000 * 100%);
  height: calc(var(--h) / 563 * 100%);

  pointer-events: auto;
  display: block;
  cursor: pointer;
}

/* Glow image */
.hotspot-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;

  opacity: 0;
  transition: all 0.25s ease;
}

/* Hover effect */
.hotspot-item:hover img {
  opacity: 1;
  filter: drop-shadow(0 0 12px var(--color-teal))
          drop-shadow(0 0 24px var(--color-teal));
}

/* ─────────────────────────────────────────────────────────────
   TOOLTIP (INLINE — NO JS)
   ───────────────────────────────────────────────────────────── */


.tooltip {
  position: absolute;
  left: 50%;
  top: -12px;

  transform: translate(-50%, -100%) translateY(5px);
  opacity: 0;

  background: rgba(10, 20, 35, 0.95);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;

  padding: 6px 12px;
  border-radius: 4px; 
  white-space: nowrap;

  pointer-events: none;
  transition: all 0.2s ease 0.05s;

  border: 1px solid var(--color-teal);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Show tooltip */
.hotspot-item:hover .tooltip {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}
/*tooltip below for top-edge items 
  USE THIS IF AN ITEM APPEARS CLOSE TO THE TOP OF THE PAGE
  e.g.:  <span class="tooltip tooltip-bottom">Writing</span> */
.tooltip-bottom {
  top: auto;
  bottom: -12px;
  transform: translate(-50%, 100%) translateY(-5px);
}

.hotspot-item:hover .tooltip-bottom {
  transform: translate(-50%, 100%) translateY(0);
}

/* ─────────────────────────────────────────────────────────────
   9. INSTRUCTION (text at the bottom of the desk scene)
   ───────────────────────────────────────────────────────────── */
.instruction-hint {
  font-size: 0.88rem;
  color: var(--color-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  animation: pulse 3s 1.2s ease-in-out infinite;
}


/* ─────────────────────────────────────────────────────────────
   10. SITE FOOTER
   ───────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;          
  padding-block: 18px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
  border-top: 1px solid rgba(255,255,255,0.06);
}


/* ─────────────────────────────────────────────────────────────
   11. RESPONSIVE TWEAKS FOR MOBILE
   ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .hotspot:hover polygon,
  .hotspot:hover rect,
  .hotspot:hover ellipse {
    filter: drop-shadow(0 0 6px var(--hs-color));
  }                         */
  .hotspot text {
    display: none;
  }
}

/* Ensure the scene never exceeds the viewport on landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { padding-block: 10px; }
  .site-title  { font-size: 1.6rem;  }
  .desk-scene-wrapper { padding-block: 4px 12px; }
}

/* Container must be relative */
.desk-scene {
  position: relative;
}

/* Layer sits on top of the desk image */
.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: none; 
}

/* Each hotspot */
.hotspot-item {
  position: absolute;

  /* Convert 1000x563 coordinate system → responsive */
  left: calc(var(--x) / 1000 * 100%);
  top: calc(var(--y) / 563 * 100%);
  width: calc(var(--w) / 1000 * 100%);
  height: calc(var(--h) / 563 * 100%);

  pointer-events: auto;
  display: block;
}

/* Image styling */
.hotspot-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;

  opacity: 0;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

/* Hover glow effect */
.hotspot-item:hover img {
  opacity: 1;

  /* Accent glow — tweak color here */
  filter: drop-shadow(0 0 12px var(--accent-color, #00ffc3))
          drop-shadow(0 0 24px var(--accent-color, #00d0ff));
}