/* TalePop Landing Page Styles */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  min-width: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
  font-family: 'Sniglet', cursive;
  color: #2e1005;
  line-height: 1.4;
  overflow-x: hidden;
  background: #f5e6d3 url('/images/background.jpg') center top / cover no-repeat;
  background-attachment: scroll;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header,
footer {
  background: transparent;
}

/* Layout - min-width: 0 so the page can shrink to viewport (no cutoff on narrow portrait/landscape) */
.landing {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: max(env(safe-area-inset-top, 0px), 0.5rem);
  padding-bottom: env(safe-area-inset-bottom);
}

.hero {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.hero__background {
  display: none;
}

.hero__background-img {
  display: none;
}

.hero__content {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 1366px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 1rem;
  align-items: center;
}

/* Site header with logo + nav */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(env(safe-area-inset-top, 0px), 0.5rem) 2rem 0;
  background: transparent;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo img {
  width: 240px;
  height: auto;
  padding: 0.5rem;
}

/* Nav - landscape: inline links */
.site-nav {
  display: flex;
  align-items: center;
  position: relative;
}

.site-nav__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #2e1005;
  opacity: 0.9;
}

.site-nav__menu-btn:hover {
  opacity: 1;
}

.site-nav__menu-btn span {
  display: block;
  width: 24px;
  height: 3px;
  background: currentColor;
  border-radius: 1px;
}

.site-nav__menu-btn span + span {
  margin-top: 5px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2e1005;
  opacity: 0.9;
}

.site-nav__list a:hover {
  opacity: 1;
}

/* Sign up - muted color, no effects */
.site-nav__list .site-nav__cta a {
  color: #f6a635;
}

/* Logo (legacy - for pages still using .logo) */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: transparent;
}

.logo__img {
  width: 240px;
  height: auto;
  padding: 0.5rem;
}

/* Left Column - Text */
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero__title {
  font-family: 'League Spartan', sans-serif;
  font-size: clamp(2.75rem, 4.75vw, 5.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #2e1005;
  text-align: center;
  text-shadow: 
    -4px -4px 0 #c59a53,
    4px -4px 0 #c59a53,
    -4px 4px 0 #c59a53,
    4px 4px 0 #c59a53;
}

/* CTA Section */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #f5d67a 0%, #f9b42b 50%, #f8a705 100%);
  color: #2e1005;
  font-family: 'Sniglet', cursive;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.064em;
  padding: 1rem 2.75rem;
  border-radius: 50px;
  border: 6px solid rgba(255, 255, 255, 0.95);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow:
    0 4px 0 rgba(139, 100, 30, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-button:hover,
.cta-button:focus {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 rgba(139, 100, 30, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.25);
  outline: none;
}

.cta-button:active {
  transform: translateY(0);
}

.cta-subtext {
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  color: #2e1005;
  opacity: 0.9;
}

/* Right Column - Illustration & Description */
.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero__illustration {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.hero__description {
  font-size: clamp(1rem, 1.6vw, 1.6rem);
  line-height: 1.4;
  text-align: center;
  max-width: 100%;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  background: transparent;
}

.footer__text {
  font-size: 1rem;
  color: #2e1005;
  opacity: 0.5;
  letter-spacing: 0.1em;
}

.footer__link:hover {
  opacity: 0.8;
}

/* Short viewport (e.g. landscape phones): prevent hero from overlapping logo */
@media (max-height: 520px) {
  .hero {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 5.5rem;
    overflow-y: auto;
  }

  .hero__content {
    padding-top: 0.5rem;
  }
}

/* Tablet portrait & mobile: single-column stacked layout + hamburger nav */
@media (max-width: 1024px) {
  /* Header in flow - nothing overlaps; header first, then content below */
  .site-header {
    position: relative;
    padding: 1rem;
  }

  .site-header__logo img {
    width: 195px;
  }

  /* Show hamburger, hide nav list by default */
  .site-nav__menu-btn {
    display: block;
  }

  .site-nav__list {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    margin-top: 0.5rem;
    flex-direction: column;
    gap: 0;
    background: #f5e6d3;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(197, 154, 83, 0.5);
    min-width: 180px;
  }

  .site-nav--open .site-nav__list {
    display: flex;
  }

  .site-nav__list li {
    width: 100%;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(197, 154, 83, 0.5);
  }

  .site-nav__list li:last-child {
    border-bottom: none;
  }

  .site-nav__list a {
    display: block;
    padding: 0.6rem 1rem;
    margin: 0;
    line-height: 1.3;
  }

  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3rem 1.5rem 4rem;
    gap: 2rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .hero__text,
  .hero__visual {
    min-width: 0;
  }

  .hero__visual {
    order: 2;
  }

  .hero__illustration {
    width: 100%;
    max-width: 680px;
  }

  .logo {
    position: relative;
    top: 0;
    left: 0;
    justify-content: center;
    margin-bottom: 1rem;
    background: transparent;
  }

  .hero__text {
    align-items: center;
    order: 1;
  }

  .hero__title {
    font-size: clamp(4rem, 10vw, 6rem);
  }

  .footer {
    position: relative;
    bottom: auto;
    padding: 2rem 1.5rem;
    background: transparent;
  }
}

@media (max-width: 480px) {
  .logo__img {
    width: 195px;
  }

  .hero__title {
    font-size: clamp(3.25rem, 16vw, 5rem);
  }

  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.3rem;
  }

  .hero__content {
    padding: 2.5rem 1rem 2rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .cta-button {
    transition: none;
  }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #c59a53;
  outline-offset: 2px;
}
