/* ==========================================================================
   WebGuy Code — Coming Soon
   style.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   @font-face declarations (self-hosted, no CDN)
   Paths relative to this CSS file: ../../assets/css/ → ../../
   -------------------------------------------------------------------------- */

/* Expletus Sans — Bold (primary heading font) */
@font-face {
  font-family: 'Expletus Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/expletus-sans/expletus-sans-v31-latin-700.woff2') format('woff2');
}

/* Expletus Sans — SemiBold */
@font-face {
  font-family: 'Expletus Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/expletus-sans/expletus-sans-v31-latin-600.woff2') format('woff2');
}

/* Expletus Sans — Regular */
@font-face {
  font-family: 'Expletus Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/expletus-sans/expletus-sans-v31-latin-regular.woff2') format('woff2');
}

/* Nunito Sans — Light */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../vendor/fonts/nunito-sans/nunito-sans-v19-latin-300.woff2') format('woff2');
}

/* Nunito Sans — Regular */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../vendor/fonts/nunito-sans/nunito-sans-v19-latin-regular.woff2') format('woff2');
}

/* Nunito Sans — SemiBold */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../vendor/fonts/nunito-sans/nunito-sans-v19-latin-600.woff2') format('woff2');
}

/* Nunito Sans — Bold */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../vendor/fonts/nunito-sans/nunito-sans-v19-latin-700.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --bg-black:      #000000;
  --bg-near-black: #04080B;
  --cyan-bright:   #1ED9F0;
  --cyan-core:     #BDF3FF;
  --cyan-deep:     #0A6E8C;
  --cyan-trace:    #15A8C7;
  --text-primary:  #E8FAFF;
  --text-muted:    #5C7A85;
  --hairline:      rgba(30, 217, 240, 0.18);

  /* Typography */
  --font-heading: 'Expletus Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Nunito Sans', system-ui, sans-serif;

  /* Motion easing */
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);

  /* Wheel 3D geometry — overridden at breakpoints */
  --panel-width:       520px;
  --panel-height:      325px;   /* 16:10 ≈ 520 × 325 */
  --drum-radius:       310px;
  --stage-perspective: 1100px;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Prevent layout shift from scrollbar */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent text selection during mouse interaction with starfield */
  -webkit-user-select: none;
  user-select: none;
  /* Remove tap highlight flash on mobile */
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

/* Focus ring — visible cyan outline on all interactive elements */
:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Starfield Canvas — fixed full-page background
   -------------------------------------------------------------------------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Page Content — sits above the canvas
   -------------------------------------------------------------------------- */
.hero,
main,
.contact {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   SECTION 1 — Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  position: relative; /* for absolutely-positioned children */
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.5vh, 1.75rem);
  max-width: 720px;
  width: 100%;
}

/* --- Logo --- */
.hero__logo-wrap {
  /* Transition container for opacity & scale */
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity    2s       var(--ease-smooth),
    transform  2s       var(--ease-smooth),
    filter     2.2s     var(--ease-smooth);
  transition-delay: 0.1s;
  /* Limit logo width */
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.hero__logo {
  width: 100%;
  height: auto;
  /* Cyan glow — pure CSS, not baked into the image */
  filter:
    drop-shadow(0 0 28px rgba(30, 217, 240, 0.38))
    drop-shadow(0 0 72px rgba(30, 217, 240, 0.16));
}

/* --- SEO H1 (brand identifier — visually secondary to tagline) --- */
.hero__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   1.4s var(--ease-smooth),
    transform 1.4s var(--ease-smooth);
  transition-delay: 1.0s;
}

/* --- Display tagline (large prominent text) --- */
.hero__tagline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   1.6s var(--ease-smooth),
    transform 1.6s var(--ease-smooth);
  transition-delay: 0.65s;
}

/* --- Status label --- */
.hero__label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity   1.2s var(--ease-smooth),
    transform 1.2s var(--ease-smooth);
  transition-delay: 1.25s;
}

/* --------------------------------------------------------------------------
   Load-triggered fade-ins (body.loaded class added by main.js)
   -------------------------------------------------------------------------- */
body.loaded .hero__logo-wrap {
  opacity: 1;
  transform: scale(1);
}

body.loaded .hero__tagline {
  opacity: 1;
  transform: translateY(0);
}

body.loaded .hero__brand {
  opacity: 1;
  transform: translateY(0);
}

body.loaded .hero__label {
  opacity: 1;
  transform: translateY(0);
}

body.loaded .hero__scroll-cue {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Scroll Cue — bobbing chevron at hero bottom center
   -------------------------------------------------------------------------- */
.hero__scroll-cue {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  color: var(--cyan-bright);
  opacity: 0;
  transition:
    opacity   1s   var(--ease-smooth),
    transform 1s   var(--ease-smooth);
  transition-delay: 1.6s;
  /* Bob animation applied after transition settles */
  will-change: transform;
  /* Accessible tap target */
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

/* Once loaded, start the bob */
body.loaded .hero__scroll-cue {
  opacity: 0.55;
  transform: translateX(-50%) translateY(0);
  animation: bob 1.6s var(--ease-smooth) infinite;
  animation-delay: 2.8s; /* wait for load transition to settle */
}

.hero__scroll-cue:hover,
.hero__scroll-cue:focus-visible {
  opacity: 0.9;
}

/* Hide when scrolled past hero (class added by IntersectionObserver) */
.hero__scroll-cue--hidden {
  opacity: 0 !important;
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* --------------------------------------------------------------------------
   Ambient Hint — bottom-right, discover-it micro-label
   -------------------------------------------------------------------------- */
.hero__hint {
  position: absolute;
  bottom: clamp(1.2rem, 3.5vh, 2rem);
  right: clamp(1.2rem, 3vw, 2.5rem);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.28;
  transition: opacity 0.8s ease;
  pointer-events: none;
  user-select: none;
}

.hero__hint.faded {
  opacity: 0;
}

/* --------------------------------------------------------------------------
   SECTION 2 — Project Wheel
   -------------------------------------------------------------------------- */
.projects {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 8vh, 6rem) clamp(1rem, 4vw, 3rem);
  gap: clamp(1.5rem, 3vh, 2.5rem);
}

/* Eyebrow heading */
.projects__eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.65rem, 1.2vw, 0.75rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Wheel Stage — perspective container
   -------------------------------------------------------------------------- */
.wheel-stage {
  perspective: var(--stage-perspective);
  perspective-origin: 50% 50%;
  width: 100%;
  height: clamp(280px, 48vh, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
  /* User interaction cues */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  /* Keyboard focus ring handled by :focus-visible above */
  outline-offset: 6px;
}

.wheel-stage:active {
  cursor: grabbing;
}

/* --------------------------------------------------------------------------
   Wheel Drum — 3D rotating container
   -------------------------------------------------------------------------- */
.wheel-drum {
  position: relative;
  width: var(--panel-width);
  height: var(--panel-height);
  transform-style: preserve-3d;
  /* Rotation set by wheel.js via inline transform */
  will-change: transform;
}

/* --------------------------------------------------------------------------
   Wheel Panels — positioned around the Y-axis drum
   -------------------------------------------------------------------------- */
.wheel-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Hide back-face so mirror images don't show on side panels */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  overflow: hidden;
}

/* Each panel's 3D position on the drum */
.wheel-panel:nth-child(1) { transform: rotateY(0deg)   translateZ(var(--drum-radius)); }
.wheel-panel:nth-child(2) { transform: rotateY(120deg) translateZ(var(--drum-radius)); }
.wheel-panel:nth-child(3) { transform: rotateY(240deg) translateZ(var(--drum-radius)); }

/* --- Placeholder card (shown when real screenshot not yet available) --- */
.wheel-panel__placeholder {
  position: absolute;
  inset: 0;
  background: var(--bg-near-black);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  box-shadow:
    inset 0 0 60px  rgba(30, 217, 240, 0.05),
    inset 0 0 120px rgba(30, 217, 240, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem;
  z-index: 0;
}

.wheel-panel__placeholder-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--text-primary);
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.3;
}

.wheel-panel__placeholder-divider {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--hairline);
}

.wheel-panel__placeholder-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.6rem, 1vw, 0.7rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Real screenshot (hidden by default; shown by JS when image loads) --- */
.wheel-panel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* JS shows this on successful load */
  z-index: 1;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Wheel Dots — pagination indicators
   -------------------------------------------------------------------------- */
.wheel-dots {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
}

.wheel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.35;
  transition:
    background 0.3s ease,
    opacity    0.3s ease,
    transform  0.3s ease;
  /* Accessible tap target */
  padding: 8px;
  background-clip: content-box;
  /* Ensure 44px tap target */
  position: relative;
}

.wheel-dot::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.wheel-dot--active {
  background: var(--cyan-bright);
  opacity: 1;
  transform: scale(1.25);
}

.wheel-dot:hover:not(.wheel-dot--active) {
  background: var(--cyan-trace);
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Wheel Caption
   -------------------------------------------------------------------------- */
.wheel-caption {
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.wheel-caption__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  /* Transition for fade/slide update */
  transition:
    opacity   0.35s var(--ease-smooth),
    transform 0.35s var(--ease-smooth);
}

/* Applied by JS when caption is changing */
.wheel-caption__inner.exiting {
  opacity: 0;
  transform: translateY(10px);
}

.wheel-caption__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  color: var(--text-primary);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.wheel-caption__desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: var(--text-primary);
  line-height: 1.65;
  opacity: 0.82;
}

.wheel-caption__tag {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-trace);
  border: 1px solid var(--cyan-deep);
  border-radius: 100px;
  padding: 0.25rem 0.85rem;
}

/* --------------------------------------------------------------------------
   SECTION 3 — Contact / Footer
   -------------------------------------------------------------------------- */
.contact {
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 8vh, 6rem) clamp(1.5rem, 5vw, 4rem);
  /* Subtle top separator */
  border-top: 1px solid var(--hairline);
}

.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vh, 2rem);
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.contact__logo-wrap {
  width: 200px;
  max-width: 55vw;
}

.contact__logo {
  width: 100%;
  height: auto;
  filter:
    drop-shadow(0 0 20px rgba(30, 217, 240, 0.25))
    drop-shadow(0 0 50px rgba(30, 217, 240, 0.10));
  opacity: 0.9;
}

.contact__tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Phone number — primary CTA */
.contact__phone {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
  /* Minimum tap target */
  display: inline-block;
  padding: 0.1em 0;
  min-height: 44px;
  line-height: 1.2;
}

.contact__phone:hover,
.contact__phone:focus-visible {
  color: var(--cyan-bright);
}

/* Copyright line */
.contact__copy {
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 1.1vw, 0.72rem);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Responsive — Tablet (≤ 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --panel-width:       400px;
    --panel-height:      250px;
    --drum-radius:       240px;
    --stage-perspective: 900px;
  }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile (≤ 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --panel-width:       82vw;
    --panel-height:      calc(82vw * 0.625);
    --drum-radius:       165px;
    --stage-perspective: 600px;
  }

  .hero__logo-wrap {
    max-width: 78vw;
  }

  .hero__hint {
    /* Hide on small screens — too cluttered */
    display: none;
  }

  .wheel-stage {
    height: clamp(200px, 40vw, 280px);
  }

  .contact__logo-wrap {
    width: 160px;
  }
}

/* Mobile landscape */
@media (max-width: 600px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero__inner {
    gap: 0.75rem;
  }

  .hero__logo-wrap {
    max-width: 42vw;
  }
}

/* --------------------------------------------------------------------------
   Prefers-Reduced-Motion — disable/minimize all animations
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Show everything immediately, no fade-in */
  .hero__logo-wrap,
  .hero__brand,
  .hero__tagline,
  .hero__label,
  .hero__scroll-cue {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  /* Override loaded-state values to ensure they stay correct */
  body.loaded .hero__scroll-cue {
    animation: none !important;
    transform: translateX(-50%) !important;
  }

  /* Disable caption transitions */
  .wheel-caption__inner {
    transition: none !important;
  }
  .wheel-caption__inner.exiting {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Disable wheel spin animation (handled by wheel.js too) */
  .wheel-drum {
    transition: none !important;
  }

  /* Keep hint hidden */
  .hero__hint {
    display: none !important;
  }
}
