@font-face {
  font-family: "Kalila";
  src: url('assets/fonts/Khalila.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* Global Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0.25rem;
  padding: 0;
}

html {
  margin: 0;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: "richmond-display", sans-serif;
  background-color: #fdfaf4;
  background-image: url('assets/images/background-paper.jpg');
  background-repeat: repeat;
  background-size: auto;
  background-position: center;
  color: #222;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "aria-text-g2", sans-serif;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  position: relative;
  z-index: 1000;
}

header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: bold;
}

nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: #222;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Mobile Nav Toggle (hidden by default on desktop) */
#nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
  z-index: 2000;
}

#mobile-nav {
  display: none;
}

#mobile-nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 2rem 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

#mobile-nav a {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
}

/* Grid Layout */
/* ----- New Grid & Placement Rules ----- */

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, auto);
  gap: 0;
}

/* 1×2 tall left */
.gallery1 {
  grid-column: 1 / 2;
  grid-row:    2 / span 2;
}

/* sun doodle */
.sun {
  grid-column: 2 / 3;
  grid-row:    2 / 3;
}

/* big 2×2 */
.gallery2 {
  grid-column: 3 / span 2;
  grid-row:    2 / span 2;
}

/* small top-right */
.gallery3 {
  grid-column: 5 / 6;
  grid-row:    2 / 3;
}

/* small under sun */
.gallery4 {
  grid-column: 2 / 3;
  grid-row:    3 / 4;
}

/* flower doodle */
.flower {
  grid-column: 5 / 6;
  grid-row:    3 / 4;
}

/* heart doodle */
.heart {
  grid-column: 1 / 2;
  grid-row:    4 / 5;
}

/* wide 2×1 bottom */
.gallery5 {
  grid-column: 2 / span 2;
  grid-row:    4 / 5;
}

/* bottom smalls */
.gallery6 {
  grid-column: 4 / 5;
  grid-row:    4 / 5;
}
.gallery7 {
  grid-column: 5 / 6;
  grid-row:    4 / 5;
}
/* Reserve space to prevent layout shifts */
.gallery1 { aspect-ratio: 1 / 2; }
.gallery2 { aspect-ratio: 2 / 2; }
.gallery3, .gallery4, .gallery6, .gallery7 { aspect-ratio: 1 / 1; }
.gallery5 { aspect-ratio: 2 / 1; }
.sun, .flower, .heart { aspect-ratio: 1 / 1; }

/* Images fill their tiles */
.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Image behavior inside each tile */
.item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* or 'contain' if you'd rather see the whole image */
  display: block;
  border-radius: 10px;
}

/* Adjust doodle image sizes */
.sun img {
  width: 100%;
  height: 100%;
  animation: sparkle 6s ease-in-out infinite alternate;
  animation-delay: 2s;
}

.heart img {
  width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: pulse 2s ease-in-out infinite;
}

.flower img {
  width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(3deg); }
}

/* Hero Section */
.hero {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  text-align: center;
  pointer-events: none;
}

.hero-box {
  background: rgba(229, 216, 187, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem 2rem;
  max-width: 85vw;         /* caps the width at 85% of viewport */
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
  display: inline-block;
  pointer-events: auto;
}

.hero h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.50rem;
  margin-bottom: 1.5rem;
}

.cta {
  padding: 0.75rem 1.5rem;
  background-color: #222;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

.cta:hover {
  background-color: #444;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem 1rem 1rem;
  font-size: 0.9rem;
  color: #666;
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  margin: 0 1rem;
  color: #666;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.gateway-wrapper {
  position: relative;
  padding: 1rem 2.25rem;
  margin-bottom: 0;
  padding-bottom: 0;
}
.gateway-wrapper .grid {
  position: relative;
  z-index: 2;
}

/* SVG overlay styling */
.doodle-path {
  position: absolute;
  top: -120px;
  left: calc(25% + 2rem);
  width: 200%;
  max-width: none;
  pointer-events: none;
  z-index: 1;
}

.main-line {
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  animation: drawline 6s ease-in-out infinite alternate;
}

@keyframes drawline {
  0% {
    stroke-dashoffset: 4000;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes sparkle {
  0% {
    filter: drop-shadow(0 0 0px rgba(255, 223, 0, 0.5));
    transform: scale(1);
  }
  100% {
    filter: drop-shadow(0 0 12px rgba(255, 223, 0, 1));
    transform: scale(1.05);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

/* Added flourish float styles */
.flourish-float {
  position: absolute;
  top: -2.5rem;
  left: 58%;
  transform: translateX(-50%);
  width: 75vw;
  max-width: 1400px;
  z-index: 1;
  pointer-events: none;
}

.flourish-float img {
  width: 100%;
  height: auto;
  display: block;
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  animation: drawline 6s ease-in-out infinite alternate;
}

@media screen and (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.5rem 1.5rem 1rem;
    text-align: center;
  }

  nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
  }

  nav a {
    margin: 0.5rem 0;
    font-size: 1.1rem;
  }

  .hero {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
    width: 100vw;
  }

  .hero-box {
    padding: 1.25rem;
    max-width: 90vw;
    font-size: 0.9rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cta {
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.10rem;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
    margin-bottom: 3rem;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
  }

  .footer-links a {
    margin: 0.5rem 0;
  }

  #nav-toggle {
    font-size: 1.8rem;
    top: 1.25rem;
    right: 1.25rem;
    display: block;
    position: absolute;
  }

  .gateway-wrapper {
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }

  .doodle-path {
    display: none;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
  }

  .gallery1 { grid-column: 1; grid-row: 2 / span 2; }
  .sun      { grid-column: 2; grid-row: 2; }
  .gallery3 { grid-column: 3; grid-row: 2; }
  .gallery2 { grid-column: 2 / span 2; grid-row: 3 / span 2; }
  .heart    { grid-column: 1; grid-row: 4; }
  .gallery6 { grid-column: 1; grid-row: 5; }
  .gallery7 { grid-column: 2; grid-row: 5; }
  .flower   { grid-column: 3; grid-row: 5; }
  .gallery5 { grid-column: 1 / span 2; grid-row: 6; }
  .gallery4 { grid-column: 3; grid-row: 6; }

  .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #nav-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
}

.header-flourish {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  width: 100vw;
  max-width: 1400px;
  z-index: 500;
  pointer-events: none;
}

.header-flourish img {
  width: 100%;
  height: auto;
  display: block;
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  animation: drawline 6s ease-in-out infinite alternate;
}

#tagline-box {
  font-family: "Khalila", cursive;
  font-size: 1.75rem;
  font-weight: normal;
  text-align: right;
  margin-top: 0.5rem;
  max-width: 400px;
  color: #333;
}