/* =====================================================
   Media Solutions - Coming Soon Page
   Coffee Shop Chalkboard Aesthetic
   ===================================================== */

/* =====================================================
   Design Tokens
   ===================================================== */
:root {
  /* Colors */
  --chalkboard: #2b2b2b;
  --chalkboard-dark: #1e1e1e;
  --chalk-white: #e8e0d4;
  --chalk-dim: #a89f91;
  --coffee-brown: #8B5E3C;
  --coffee-light: #C4956A;
  --cream: #F5E6D0;
  --espresso: #3E2723;
  --steam: rgba(232, 224, 212, 0.4);

  /* Typography */
  --font-display: 'Caveat', cursive;
  --font-body: 'Kalam', cursive;

  /* Spacing */
  --spacing-xs: clamp(0.5rem, 2vw, 1rem);
  --spacing-sm: clamp(1rem, 3vw, 1.5rem);
  --spacing-md: clamp(1.5rem, 4vw, 2.5rem);
  --spacing-lg: clamp(2rem, 5vw, 4rem);
  --spacing-xl: clamp(3rem, 8vw, 6rem);

  /* Layout */
  --max-width: 1400px;
  --content-width: 900px;
}

/* =====================================================
   CSS Reset
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =====================================================
   Base Styles
   ===================================================== */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--chalkboard);
  color: var(--chalk-white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Chalkboard Texture Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.008) 2px,
      rgba(255, 255, 255, 0.008) 4px
    );
  pointer-events: none;
  z-index: 1;
}

/* =====================================================
   Main Layout
   ===================================================== */
.chalkboard {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-width);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  min-height: 100vh;
  justify-content: center;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
  position: absolute;
  top: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--chalk-white);
  text-align: center;
  letter-spacing: 0.02em;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
  margin-top: var(--spacing-xl);
}

/* Coffee Mug */
.coffee-mug-container {
  position: relative;
  width: clamp(120px, 30vw, 200px);
  margin-bottom: var(--spacing-sm);
}

.coffee-mug {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Steam Animation */
.steam-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.steam {
  position: absolute;
  top: 15%;
  width: 12px;
  height: 20px;
  background: var(--steam);
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0;
  animation: steam-rise 3s ease-out infinite;
}

.steam-1 {
  left: 20%;
  animation-delay: 0s;
}

.steam-2 {
  left: 45%;
  width: 10px;
  height: 18px;
  animation-delay: 0.8s;
}

.steam-3 {
  left: 65%;
  width: 14px;
  height: 22px;
  animation-delay: 1.6s;
}

.steam-4 {
  left: 35%;
  width: 11px;
  height: 19px;
  animation-delay: 2.2s;
}

@keyframes steam-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scaleX(1);
  }
  15% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
    transform: translateY(-50px) scaleX(1.5);
    filter: blur(8px);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scaleX(2);
    filter: blur(12px);
  }
}

/* =====================================================
   Tagline with Chalk Animation
   ===================================================== */
.tagline {
  width: 100%;
  max-width: 700px;
  margin: 0;
}

.chalk-text {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chalk-text text {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}

.tagline.animate .chalk-text text {
  animation: chalk-write 3s ease-in-out forwards;
}

@keyframes chalk-write {
  0% {
    stroke-dashoffset: 2000;
    fill: transparent;
  }
  70% {
    stroke-dashoffset: 0;
    fill: transparent;
  }
  100% {
    stroke-dashoffset: 0;
    fill: var(--chalk-white);
  }
}

/* Subtitle */
.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  color: var(--chalk-dim);
  max-width: 600px;
  line-height: 1.8;
  margin-top: var(--spacing-sm);
}

/* =====================================================
   Contact Section
   ===================================================== */
.contact {
  margin-top: var(--spacing-md);
}

.contact-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--cream);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.2em;
  transition: color 0.3s ease;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--coffee-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.contact-link:hover {
  color: var(--coffee-light);
}

.contact-link:hover::after {
  transform: scaleX(1);
}

.contact-link:focus {
  outline: 2px solid var(--coffee-light);
  outline-offset: 4px;
  border-radius: 2px;
}

/* =====================================================
   Decorative Doodles
   ===================================================== */
.doodles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.doodle {
  position: absolute;
  opacity: 0.35;
  animation: float 6s ease-in-out infinite;
}

/* Coffee Beans */
.doodle-bean-1 {
  width: clamp(30px, 5vw, 50px);
  top: 15%;
  left: 8%;
  animation-delay: 0s;
}

.doodle-bean-2 {
  width: clamp(35px, 5.5vw, 55px);
  top: 70%;
  right: 10%;
  animation-delay: 1.5s;
}

/* Swirl */
.doodle-swirl {
  width: clamp(40px, 6vw, 65px);
  bottom: 18%;
  left: 12%;
  animation-delay: 0.8s;
}

/* Stars */
.doodle-star-1 {
  width: clamp(18px, 3vw, 28px);
  top: 25%;
  right: 15%;
  animation-delay: 2s;
}

.doodle-star-2 {
  width: clamp(20px, 3.5vw, 30px);
  top: 60%;
  left: 15%;
  animation-delay: 2.8s;
}

.doodle-star-3 {
  width: clamp(16px, 2.8vw, 24px);
  bottom: 25%;
  right: 18%;
  animation-delay: 3.5s;
}

.doodle-star-4 {
  width: clamp(15px, 2.5vw, 22px);
  top: 40%;
  left: 8%;
  animation-delay: 4.2s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
}

.site-footer p {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: var(--chalk-dim);
  font-weight: 300;
}

.separator {
  display: inline-block;
  margin: 0 0.5em;
  opacity: 0.5;
}

/* =====================================================
   Responsive Design
   ===================================================== */

/* Tablet and up */
@media (min-width: 768px) {
  .chalkboard {
    gap: var(--spacing-xl);
  }

  .hero {
    gap: var(--spacing-lg);
  }

  .doodles {
    z-index: 3;
  }

  .separator {
    margin: 0 0.8em;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .coffee-mug-container {
    margin-bottom: var(--spacing-md);
  }

  .hero {
    margin-top: calc(var(--spacing-xl) * 1.2);
  }

  .contact {
    margin-top: var(--spacing-lg);
  }
}

/* Large desktop */
@media (min-width: 1440px) {
  .doodle-bean-1 {
    left: 10%;
  }

  .doodle-bean-2 {
    right: 12%;
  }

  .doodle-swirl {
    left: 15%;
  }

  .doodle-star-1 {
    right: 18%;
  }

  .doodle-star-2 {
    left: 18%;
  }
}

/* =====================================================
   Accessibility: Reduced Motion
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Show final states immediately */
  .steam {
    display: none;
  }

  .chalk-text text {
    stroke-dasharray: 0;
    stroke-dashoffset: 0;
    fill: var(--chalk-white);
  }

  .contact-link::after {
    transform: scaleX(1);
  }

  .doodle {
    animation: none;
  }
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
  body::before,
  body::after,
  .doodles,
  .steam-container {
    display: none;
  }

  .chalkboard {
    min-height: auto;
  }

  .contact-link {
    color: var(--espresso);
    text-decoration: underline;
  }

  .site-footer,
  .site-header {
    position: static;
    transform: none;
  }
}
