/* ============================================
   JOYTEETUDE — Main Stylesheet
   Joy + Attitude = Gratitude in all experiences
   ============================================ */

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

:root {
  --color-primary: #C62828;
  --color-secondary: #D4A017;
  --color-accent-teal: #2E7D6F;
  --color-accent-pink: #C2185B;
  --color-accent-blue: #5B8FB9;
  --color-bg: #FDF6EC;
  --color-bg-dark: #2C1320;
  --color-text: #3E2723;
  --color-text-light: #FFF8E7;
  --color-cream: #FFF8E7;

  --font-display: 'Caveat', cursive;
  --font-body: 'Nunito', sans-serif;
  --font-accent: 'Permanent Marker', cursive;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 5rem;
  --space-2xl: 7rem;

  --radius: 8px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* ---------- ACCESSIBILITY ---------- */
[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: var(--radius);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 3px solid var(--color-accent-teal);
  outline-offset: 2px;
}

/* ---------- SQUIGGLE DIVIDER ---------- */
.squiggle {
  width: 120px;
  height: 12px;
  color: var(--color-accent-pink);
  display: block;
  margin: 0 auto;
}

.squiggle--section {
  margin-bottom: var(--space-md);
  width: 160px;
}

.squiggle--light {
  color: var(--color-secondary);
}

/* ---------- SECTION DOTS ---------- */
.section__dots {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-image:
    radial-gradient(circle, var(--color-accent-pink) 2px, transparent 2px),
    radial-gradient(circle, var(--color-secondary) 1.5px, transparent 1.5px),
    radial-gradient(circle, var(--color-accent-teal) 2px, transparent 2px);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px, 4px 14px;
  opacity: 0.25;
  pointer-events: none;
}

.section__dots--light {
  background-image:
    radial-gradient(circle, var(--color-cream) 2px, transparent 2px),
    radial-gradient(circle, var(--color-secondary) 1.5px, transparent 1.5px),
    radial-gradient(circle, var(--color-accent-blue) 2px, transparent 2px);
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px, 4px 14px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}

.btn:hover, .btn:focus-visible {
  transform: rotate(-1deg) scale(1.04);
  box-shadow: 4px 4px 0 var(--color-text);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-cream);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: #a51f1f;
}

.btn--accent {
  background: var(--color-secondary);
  color: var(--color-text);
  border-color: var(--color-secondary);
}

.btn--accent:hover {
  background: #b8880f;
}

.btn--full {
  display: block;
  width: 100%;
}

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section {
  position: relative;
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.section--alt {
  background-color: #faf2e1;
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  text-align: center;
  margin-bottom: var(--space-xs);
  line-height: 1.1;
}

.section__heading--light {
  color: var(--color-cream);
}

.section__subheading {
  font-family: var(--font-accent);
  font-size: clamp(1rem, 3vw, 1.3rem);
  text-align: center;
  color: var(--color-accent-teal);
  margin-bottom: var(--space-xs);
}

/* ============================================
   PASSWORD GATE
   ============================================ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-dark);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(198,40,40,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(46,125,111,0.12) 0%, transparent 50%);
  padding: var(--space-md);
}

.gate__inner {
  text-align: center;
  max-width: 440px;
  width: 100%;
}

.gate__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--color-cream);
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.gate__divider {
  margin-bottom: var(--space-md);
}

.gate__divider .squiggle {
  color: var(--color-secondary);
}

.gate__message {
  font-family: var(--font-body);
  color: var(--color-cream);
  opacity: 0.85;
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.gate__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.gate__input {
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-align: center;
  padding: 0.9rem 1.2rem;
  border: 3px solid rgba(255,248,231,0.2);
  border-radius: 50px;
  background: rgba(255,248,231,0.08);
  color: var(--color-cream);
  transition: border-color var(--transition);
}

.gate__input::placeholder {
  color: rgba(255,248,231,0.4);
}

.gate__input:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.gate__button {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  border: 3px solid var(--color-primary);
  background: var(--color-primary);
  color: var(--color-cream);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.gate__button:hover, .gate__button:focus-visible {
  transform: rotate(-1deg) scale(1.04);
  box-shadow: 4px 4px 0 rgba(255,248,231,0.2);
  background: #a51f1f;
}

.gate__error {
  font-family: var(--font-body);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.gate__footer {
  font-family: var(--font-accent);
  color: var(--color-secondary);
  font-size: 1.1rem;
  margin-top: var(--space-md);
  opacity: 0.7;
}

/* Gate shake animation */
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.gate__input--shake {
  animation: gate-shake 0.4s ease;
  border-color: var(--color-primary) !important;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253,246,236,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(62,39,35,0.08);
  padding: 0.6rem 0;
}

.nav__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}

.nav__links {
  display: flex;
  gap: var(--space-sm);
}

.nav__links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav__links a:hover, .nav__links a:focus-visible {
  color: var(--color-primary);
  background: rgba(198,40,40,0.08);
}

/* Mobile nav */
@media (max-width: 600px) {
  .nav__links {
    gap: 0.3rem;
  }
  .nav__links a {
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(198,40,40,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 60%, rgba(46,125,111,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(212,160,23,0.18) 0%, transparent 40%),
    var(--color-bg-dark);
  overflow: hidden;
  padding: var(--space-2xl) var(--space-sm);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* Floating decorative cards in hero */
.hero__cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__float-card {
  position: absolute;
  width: 60px;
  height: 80px;
  background: rgba(253,246,236,0.06);
  border: 2px solid rgba(253,246,236,0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(253,246,236,0.15);
  animation: float-card 8s ease-in-out infinite;
}

.hero__float-card--1 {
  top: 15%;
  left: 8%;
  transform: rotate(-12deg);
  animation-delay: 0s;
}

.hero__float-card--2 {
  top: 25%;
  right: 10%;
  transform: rotate(8deg);
  animation-delay: -3s;
}

.hero__float-card--3 {
  bottom: 20%;
  left: 15%;
  transform: rotate(5deg);
  animation-delay: -5s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0) rotate(var(--r, -12deg)); }
  50% { transform: translateY(-12px) rotate(var(--r, -12deg)); }
}

.hero__float-card--1 { --r: -12deg; }
.hero__float-card--2 { --r: 8deg; }
.hero__float-card--3 { --r: 5deg; }

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 6rem);
  color: var(--color-cream);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.hero__subtitle {
  font-family: var(--font-accent);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

.hero__body {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--color-cream);
  opacity: 0.9;
  margin-bottom: var(--space-md);
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding-top: calc(var(--space-xl) + 2rem);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

@media (min-width: 700px) {
  .about__grid {
    grid-template-columns: 250px 1fr;
    align-items: start;
  }
}

.about__photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-pink), var(--color-primary));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transform: rotate(-3deg);
  border: 4px solid var(--color-secondary);
}

.about__photo-icon {
  font-size: 3rem;
  display: block;
}

.about__photo-text {
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: 1rem;
  margin-top: 0.3rem;
}

.about__copy p {
  margin-bottom: var(--space-sm);
  font-size: 1.05rem;
}

.about__signoff {
  font-family: var(--font-accent);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-top: var(--space-sm);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

@media (min-width: 700px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
}

.gallery__card {
  position: relative;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 3px 3px 0 rgba(62,39,35,0.12);
  transform: rotate(var(--card-tilt, 0deg));
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__card:nth-child(1) { --card-tilt: -1.5deg; }
.gallery__card:nth-child(2) { --card-tilt: 1deg; }
.gallery__card:nth-child(3) { --card-tilt: -0.8deg; }
.gallery__card:nth-child(4) { --card-tilt: 2deg; }

.gallery__card:hover, .gallery__card:focus-within {
  transform: rotate(1deg) scale(1.03);
  box-shadow: 6px 6px 0 rgba(198,40,40,0.2);
  z-index: 2;
}

.gallery__img-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-bg);
}

.gallery__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__card:hover .gallery__img-wrap img {
  transform: scale(1.06);
}

/* Art card placeholders — styled to evoke Jim's 3x5 cards */
.gallery__art-placeholder {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery__art-placeholder::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 3px dashed currentColor;
  border-radius: 4px;
  opacity: 0.25;
}

.gallery__art--1 {
  background: linear-gradient(145deg, #fce4ec, #e8f5e9);
  color: var(--color-accent-pink);
}

.gallery__art--2 {
  background: linear-gradient(145deg, #ffebee, #fff3e0);
  color: var(--color-primary);
}

.gallery__art--3 {
  background: linear-gradient(145deg, #fff8e1, #e0f2f1);
  color: var(--color-primary);
}

.gallery__art--4 {
  background: linear-gradient(145deg, #e8eaf6, #fce4ec, #fff8e1, #e8f5e9, #e3f2fd);
  color: var(--color-accent-blue);
}

.gallery__art-icon {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: 0.5rem;
  display: block;
}

.gallery__art-text {
  font-family: var(--font-accent);
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  line-height: 1.3;
  display: block;
}

.gallery__art-sig {
  font-family: var(--font-display);
  font-size: 0.9rem;
  opacity: 0.5;
  margin-top: auto;
  padding-top: 0.5rem;
}

.gallery__caption {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  text-align: center;
  color: var(--color-text);
}

.gallery__note {
  text-align: center;
  font-style: italic;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.gallery .btn {
  display: block;
  max-width: 280px;
  margin: 0 auto;
}

/* ============================================
   FIND ME
   ============================================ */
.find-me__content {
  max-width: 640px;
  margin: var(--space-md) auto 0;
}

.find-me__content p {
  margin-bottom: var(--space-sm);
  font-size: 1.05rem;
}

.find-me__next {
  background: rgba(46,125,111,0.08);
  border-left: 4px solid var(--color-accent-teal);
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: var(--space-sm) 0;
}

.find-me__next-label {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: var(--color-accent-teal);
  margin-bottom: 0.3rem;
}

.find-me__event {
  font-style: italic;
  opacity: 0.7;
  margin-bottom: 0 !important;
}

/* ============================================
   SUPPORT
   ============================================ */
.support__content {
  max-width: 640px;
  margin: var(--space-md) auto 0;
}

.support__content p {
  margin-bottom: var(--space-sm);
  font-size: 1.05rem;
}

.support__methods {
  margin: var(--space-sm) 0;
  padding-left: 0;
}

.support__methods li {
  margin-bottom: var(--space-xs);
  padding-left: 1.5rem;
  position: relative;
  font-size: 1.05rem;
}

.support__methods li::before {
  content: '♥';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.section--dark .support__methods li::before {
  color: var(--color-secondary);
}

.placeholder-tag {
  font-style: italic;
  opacity: 0.6;
}

.support__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  justify-content: center;
}

.support__buttons .btn {
  min-width: 200px;
}

/* ============================================
   JOIN / SIGNUP
   ============================================ */
.join__intro {
  text-align: center;
  max-width: 540px;
  margin: 0 auto var(--space-md);
  font-size: 1.05rem;
}

.join__form {
  max-width: 440px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--color-text);
}

.form-optional {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.6;
}

.form-group input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(62,39,35,0.2);
  border-radius: var(--radius);
  background: white;
  color: var(--color-text);
  transition: border-color var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent-teal);
}

.form-group input::placeholder {
  opacity: 0.4;
}

.join__success {
  text-align: center;
  padding: var(--space-md);
  background: rgba(46,125,111,0.1);
  border-radius: var(--radius);
  max-width: 440px;
  margin: 0 auto;
}

.join__success p {
  font-family: var(--font-accent);
  font-size: 1.3rem;
  color: var(--color-accent-teal);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-cream);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
}

.footer__inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer__copy {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.footer__icon {
  color: var(--color-cream);
  opacity: 0.6;
  transition: opacity var(--transition), transform var(--transition);
}

.footer__icon:hover {
  opacity: 1;
  transform: scale(1.15);
}

.footer__tagline {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: var(--color-secondary);
  opacity: 0.5;
}

/* ============================================
   ANIMATIONS — Fade in on scroll
   ============================================ */
.section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery cards stagger */
.gallery__card {
  opacity: 0;
  transform: translateY(16px) rotate(var(--card-tilt, 0deg));
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery__card.visible {
  opacity: 1;
  transform: rotate(var(--card-tilt, 0deg));
}

/* ============================================
   RESPONSIVE POLISH
   ============================================ */
@media (max-width: 480px) {
  .hero {
    min-height: 85vh;
  }

  .gallery__grid {
    gap: 0.75rem;
  }

  .support__buttons {
    flex-direction: column;
    align-items: center;
  }

  .support__buttons .btn {
    width: 100%;
    max-width: 280px;
  }
}
