/* ===== Warm rainbow palette ===== */
:root {
  --red: #ff6b6b;
  --orange: #ff9f43;
  --yellow: #ffd166;
  --green: #8bd17c;
  --blue: #4fc3e8;
  --purple: #b98beb;
  --pink: #ff8fb1;

  --cream: #fff7ec;
  --peach: #ffeedd;
  --white: #ffffff;
  --ink: #4a2c2a;
  --ink-soft: #7a5a52;

  --rainbow: linear-gradient(90deg, var(--red), var(--orange), var(--yellow), var(--green), var(--blue), var(--purple));

  --font-fun: "Fredoka", "Comic Sans MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;

  --radius: 24px;
  --shadow: 0 8px 0 rgba(74, 44, 42, 0.08), 0 12px 30px rgba(255, 159, 67, 0.15);
  --nav-height: 76px;
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 209, 102, 0.25) 0 120px, transparent 121px),
    radial-gradient(circle at 90% 60%, rgba(255, 143, 177, 0.18) 0 160px, transparent 161px);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--font-fun);
  line-height: 1.15;
  margin: 0;
}

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

section {
  scroll-margin-top: var(--nav-height);
}

.rainbow-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rainbow-stripe {
  height: 6px;
  background: var(--rainbow);
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 247, 236, 0.92);
  backdrop-filter: blur(8px);
}

.navbar__inner {
  max-width: 1100px;
  height: var(--nav-height);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.navbar__logo {
  width: 56px;
  height: auto;
  transition: transform 0.3s ease;
}

.navbar__brand:hover .navbar__logo {
  transform: rotate(-8deg) scale(1.08);
}

.navbar__name {
  font-family: var(--font-fun);
  font-weight: 700;
  font-size: 1.4rem;
}

.navbar__links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar__link {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-fun);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.navbar__link:hover {
  background: var(--peach);
  transform: translateY(-2px);
}

.navbar__link.is-active {
  background: var(--orange);
  color: var(--white);
}

.navbar__link:focus-visible,
.btn:focus-visible,
.navbar__brand:focus-visible {
  outline: 3px dashed var(--purple);
  outline-offset: 3px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  max-width: 1100px;
  min-height: min(calc(100vh - var(--nav-height)), 760px);
  margin: 0 auto;
  padding: 48px 16px 64px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 32px;
  overflow: hidden;
}

.hero__hello {
  margin: 0 0 4px;
  font-family: var(--font-fun);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--orange);
}

.hero__title {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
}

.hero__tagline {
  max-width: 30ch;
  margin: 20px 0 28px;
  font-size: 1.3rem;
  color: var(--ink-soft);
}

.hero__tagline strong {
  color: var(--ink);
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__art {
  display: flex;
  justify-content: center;
}

.hero__logo {
  width: min(100%, 420px);
  filter: drop-shadow(0 16px 24px rgba(255, 159, 67, 0.25));
  animation: float 4s ease-in-out infinite;
}

/* Floating decorations */
.sparkle {
  position: absolute;
  font-size: 2rem;
  pointer-events: none;
  animation: twinkle 3s ease-in-out infinite;
}

.sparkle--1 { top: 8%;  left: 4%;  color: var(--yellow); }
.sparkle--2 { top: 18%; right: 6%; color: var(--pink); animation-delay: 0.6s; }
.sparkle--3 { bottom: 12%; left: 42%; color: var(--blue); animation-delay: 1.2s; }
.sparkle--4 { bottom: 20%; right: 4%; color: var(--green); font-size: 1.2rem; animation-delay: 1.8s; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-fun);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(74, 44, 42, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(74, 44, 42, 0.18);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(74, 44, 42, 0.18);
}

.btn--orange { background: var(--orange); }
.btn--purple { background: var(--purple); }

/* ===== Sections ===== */
.section {
  padding: 80px 16px;
}

.section > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section--tinted {
  background: var(--peach);
  border-radius: 48px 48px 0 0;
}

.section__title {
  text-align: center;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
}

.section__title::after {
  content: "";
  display: block;
  width: 120px;
  height: 8px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: var(--rainbow);
}

.section__intro {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 40px;
  color: var(--ink-soft);
}

.section__subtitle {
  text-align: center;
  font-size: 1.8rem;
  margin-top: 56px;
  margin-bottom: 28px;
}

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.gallery__item {
  margin: 0;
  padding: 12px 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.gallery__item:nth-child(odd)  { transform: rotate(-1.5deg); }
.gallery__item:nth-child(even) { transform: rotate(1.5deg); }

.gallery__item:hover {
  transform: rotate(0) scale(1.04);
}

.gallery__pic {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 4.5rem;
}

.gallery__pic--red    { background: linear-gradient(135deg, #ffd1d1, var(--red)); }
.gallery__pic--orange { background: linear-gradient(135deg, #ffe2c4, var(--orange)); }
.gallery__pic--yellow { background: linear-gradient(135deg, #fff1c9, var(--yellow)); }
.gallery__pic--green  { background: linear-gradient(135deg, #e0f5d9, var(--green)); }
.gallery__pic--blue   { background: linear-gradient(135deg, #d6f2fb, var(--blue)); }
.gallery__pic--purple { background: linear-gradient(135deg, #ece0fa, var(--purple)); }

.gallery__item figcaption {
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-fun);
  font-weight: 600;
  font-size: 1.2rem;
}

/* ===== About ===== */
.about-card {
  max-width: 760px;
  margin-top: 40px;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.2rem;
}

.about-card p {
  margin: 0;
}

.about-card__fav {
  margin-top: 16px !important;
  font-family: var(--font-fun);
  font-weight: 600;
  font-size: 1.4rem;
}

.loves {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 860px;
  gap: 20px;
}

.love {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius);
  background: var(--white);
  border-bottom: 8px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.love:hover {
  transform: translateY(-6px);
}

.love:hover .love__icon {
  animation: wiggle 0.5s ease;
}

.love--red    { --accent: var(--red); }
.love--orange { --accent: var(--orange); }
.love--yellow { --accent: var(--yellow); }
.love--green  { --accent: var(--green); }
.love--blue   { --accent: var(--blue); }
.love--purple { --accent: var(--purple); }

.love__icon {
  font-size: 3rem;
  line-height: 1;
}

.love__name {
  margin-top: 10px;
  font-family: var(--font-fun);
  font-weight: 700;
  font-size: 1.3rem;
}

.love__note {
  margin-top: 4px;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* ===== Footer ===== */
.footer {
  background: var(--peach);
  text-align: center;
}

.footer p {
  margin: 0;
  padding: 24px 16px 32px;
  font-family: var(--font-fun);
  font-weight: 500;
}

/* ===== Animations ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50%      { transform: scale(1.3) rotate(15deg); opacity: 0.6; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Small screens ===== */
@media (max-width: 760px) {
  :root { --nav-height: 64px; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding-top: 32px;
  }

  .hero__art { order: -1; }
  .hero__logo { width: min(80%, 300px); }
  .hero__tagline { margin-left: auto; margin-right: auto; }
  .hero__buttons { justify-content: center; }
  .sparkle--3 { display: none; }

  .section { padding: 56px 16px; }
  .section--tinted { border-radius: 32px 32px 0 0; }
  .about-card { padding: 24px; }
}

@media (max-width: 560px) {
  .navbar__name { display: none; }
  .navbar__logo { width: 48px; }
  .navbar__links { gap: 2px; }
  .navbar__link { padding: 6px 10px; font-size: 0.95rem; }

  .gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .gallery__pic { font-size: 3rem; }
  .gallery__item figcaption { font-size: 1rem; }

  .loves { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
