/* Little Legends — holding page styles */

@font-face {
  font-family: "Fraunces Soft";
  src: url("../fonts/fraunces-soft.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #cde8f6;
  --sky-high: #b5ddf2;
  --ink: #23305e;
  --ink-soft: #46527e;
  --sun: #ffc53d;
  --sun-deep: #f2a81d;
  --poppy: #ef5a6f;
  --poppy-deep: #c93f54;
  --lilac: #c3b4f5;
  --meadow-light: #93d6a6;
  --meadow: #5dbb7e;
  --hill: #2f8f63;
  --hill-deep: #1f6e4c;
  --paper: #fffdf7;

  --display: "Fraunces Soft", "Georgia", serif;
  --body: "Nunito", "Trebuchet MS", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sky);
  overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  padding: .6rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  padding-block: 1.5rem 0;
  position: relative;
  z-index: 2;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark svg { width: 2rem; height: 2rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky-high) 0%, var(--sky) 60%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) 0;
  z-index: 1;
}

.hero-copy { max-width: 36rem; }

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 6.25rem);
  line-height: .95;
  letter-spacing: -.025em;
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.lead {
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 32rem;
}

.hero-copy p:not(.lead) {
  color: var(--ink-soft);
  margin: 0 0 2rem;
  max-width: 30rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.button {
  display: inline-block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  color: #fff;
  background: var(--poppy);
  padding: 1rem 1.75rem;
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--poppy-deep);
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--poppy-deep); }
.button:active { transform: translateY(5px); box-shadow: 0 0 0 var(--poppy-deep); }

.email-link {
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--sun-deep);
}

/* Sun and clouds (cut-paper sky) */

.sky-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sun {
  position: absolute;
  width: clamp(9rem, 26vw, 20rem);
  right: clamp(-2rem, 6vw, 8rem);
  top: clamp(4rem, 9vw, 7rem);
  animation: rise 1.6s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: .2s;
}

.cloud { position: absolute; }
.cloud-a { width: clamp(7rem, 16vw, 12rem); right: clamp(8rem, 30vw, 26rem); top: clamp(13rem, 24vw, 20rem); }
.cloud-b { width: clamp(5rem, 10vw, 8rem); right: clamp(1rem, 4vw, 4rem); top: clamp(16rem, 30vw, 26rem); }

@keyframes rise {
  from { transform: translateY(40%) scale(.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Hills */

.hills {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(7rem, 16vw, 14rem);
  margin-top: clamp(2rem, 6vw, 4rem);
}

/* ---------- What we're about ---------- */

.about {
  background: var(--hill);
  color: var(--paper);
  padding-block: clamp(1rem, 3vw, 2rem) clamp(4rem, 9vw, 6rem);
  margin-top: -1px;
}

.about h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 2.5rem;
  max-width: 20ch;
}

.pebbles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.pebble {
  background: var(--paper);
  color: var(--ink);
  padding: 1.75rem 1.75rem 2rem;
  box-shadow: 6px 8px 0 var(--hill-deep);
}
.pebble:nth-child(1) { border-radius: 2.5rem 3.5rem 2rem 4rem / 3rem 2.5rem 3.5rem 2rem; }
.pebble:nth-child(2) { border-radius: 4rem 2rem 3.5rem 2.5rem / 2.5rem 3.5rem 2rem 3rem; }
.pebble:nth-child(3) { border-radius: 3rem 4rem 2.5rem 2rem / 3.5rem 2rem 3rem 2.5rem; }

.pebble svg { width: 3.25rem; height: 3.25rem; margin-bottom: .75rem; }

.pebble h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.1;
  margin: 0 0 .5rem;
}

.pebble p { margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--hill-deep);
  color: #e6f4ec;
  padding-block: 2.5rem;
  font-size: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer-links a { text-underline-offset: 3px; }
.footer-links a:hover { color: var(--sun); }

/* ---------- Simple inner pages (privacy, 404) ---------- */

.page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 8vw, 5rem);
}

.page h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0 0 1.5rem;
}

.page h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 2.25rem 0 .5rem;
}

.prose { max-width: 40rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose a { font-weight: 700; text-decoration-color: var(--sun-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.page-404 { text-align: left; }
.page-404 .button { margin-top: 1rem; }

/* ---------- Larger screens ---------- */

@media (min-width: 48rem) {
  .pebbles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .pebble:nth-child(2) { transform: translateY(1.5rem); }
}

@media (max-width: 40rem) {
  .sun { right: -2.5rem; top: 4.5rem; opacity: .95; }
  .cloud-a { right: 5rem; top: 10.5rem; }
  .cloud-b { display: none; }
  .hero h1 { max-width: 7ch; }
}

@media (prefers-reduced-motion: reduce) {
  .sun { animation: none; }
  .button { transition: none; }
}
