/* ==========================================================================
   Finch Friends — landing page
   Cute watercolor cozy: sky blue, cream, and warm brown ink.
   ========================================================================== */

/* Self-hosted fonts — no third-party requests from finch pages. */
@font-face {
  font-family: "Patrick Hand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/patrick-hand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Palette (from the app's Theme.swift) */
  --sky: #8ed2f7;
  --sky-light: #c8e9fb;
  --sky-tint: #e3f2fc;
  --cream: #fff8ee;
  --mint: #b8d9c3;
  --peach: #f3c7a6;
  --salmon: #f4978e;
  --ink: #4a3a2f;
  --ink-soft: #6b584a;

  /* Pastel card fills */
  --card-teal: #d2ebe3;
  --card-orange: #fce4c8;
  --card-pink: #fadcd9;
  --card-lavender: #e6e1f8;
  --card-mint: #ddedd2;
  --card-sky: #d8edfb;
  --peach-tint: #fdeedd;

  /* Type */
  --ff-display: "Patrick Hand", "Comic Sans MS", cursive;
  --ff-body: "Nunito", system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 4px 14px rgba(74, 58, 47, 0.10);
  --shadow-lift: 0 10px 24px rgba(74, 58, 47, 0.16);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden; /* safety net; layout below never needs it */
}

body {
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--cream);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */

.section__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 5vw, 3rem);
}

.section__inner--narrow {
  max-width: 640px;
  text-align: center;
}

.section__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.15;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section__lede {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  color: var(--ink-soft);
}

/* Wavy section divider: sits flush at a section's bottom edge,
   filled with the NEXT section's background colour. */
.wave {
  display: block;
  width: 100%;
  height: clamp(28px, 4vw, 48px);
  margin-bottom: -1px; /* avoid hairline gaps on fractional pixels */
}

.text-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(74, 58, 47, 0.45);
}

.text-link:hover {
  text-decoration-color: currentColor;
}

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

/* --------------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-light) 0%, var(--sky) 100%);
  text-align: center;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) 1.5rem clamp(3rem, 7vw, 4.5rem);
}

.hero__icon {
  width: clamp(104px, 16vw, 144px);
  height: auto;
  margin: 0 auto 1.25rem;
  border-radius: 26%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lift);
}

.hero__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.hero__tagline {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  margin: 0.35rem 0 1rem;
}

.hero__subtitle {
  max-width: 460px;
  margin: 0 auto 2rem;
  font-weight: 600;
}

.hero__cta {
  display: inline-block;
  font-family: var(--ff-display);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--ink);
  background: var(--salmon);
  padding: 0.7rem 1.9rem;
  border-radius: 999px;
  border: 2px solid rgba(74, 58, 47, 0.25);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero__cta:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

/* The floating flock */
.flock__bird {
  position: absolute;
  z-index: 1;
  height: auto;
  filter: drop-shadow(0 6px 8px rgba(74, 58, 47, 0.18));
  animation: bob 5.5s ease-in-out infinite alternate;
  transform: rotate(var(--rot, 0deg));
}

@keyframes bob {
  from { transform: translateY(0) rotate(var(--rot, 0deg)); }
  to   { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}

.flock__bird--1 { --rot: -8deg; width: clamp(64px, 9vw, 118px); top: 9%;  left: 5%;  animation-duration: 5.2s; }
.flock__bird--2 { --rot: 6deg;  width: clamp(58px, 8vw, 104px); top: 52%; left: 3%;  animation-duration: 6.4s; animation-delay: -1.8s; }
.flock__bird--3 { --rot: 7deg;  width: clamp(62px, 9vw, 112px); top: 10%; right: 5%; animation-duration: 5.8s; animation-delay: -0.9s; }
.flock__bird--4 { --rot: -6deg; width: clamp(56px, 8vw, 100px); top: 54%; right: 3%; animation-duration: 6.1s; animation-delay: -2.6s; }
.flock__bird--5 { --rot: -5deg; width: clamp(60px, 8vw, 108px); bottom: 13%; left: 14%; animation-duration: 5.5s; animation-delay: -3.4s; }
.flock__bird--6 { --rot: 5deg;  width: clamp(66px, 9vw, 120px); bottom: 12%; right: 13%; animation-duration: 6.7s; animation-delay: -1.2s; }

@media (max-width: 720px) {
  /* small screens: just two birds in the top corners, clear of the text and CTA */
  .flock__bird--2,
  .flock__bird--4,
  .flock__bird--5,
  .flock__bird--6 { display: none; }
  .flock__bird--1 { width: 76px; top: 4%; }
  .flock__bird--3 { width: 72px; top: 5%; }
}

/* --------------------------------------------------------------------------
   2. Sticker showcase — a sticker sheet
   -------------------------------------------------------------------------- */

.showcase {
  background: var(--cream);
}

.sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
}

.sheet__cell figure {
  background: #ffffff;
  border: 2px dashed rgba(74, 58, 47, 0.16); /* cut-here sticker-sheet lines */
  border-radius: 18px;
  padding: 0.9rem 0.6rem 0.55rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

/* slight alternating tilts, like stickers laid out by hand */
.sheet__cell:nth-child(4n + 1) figure { transform: rotate(-2.5deg); }
.sheet__cell:nth-child(4n + 2) figure { transform: rotate(1.75deg); }
.sheet__cell:nth-child(4n + 3) figure { transform: rotate(-1.25deg); }
.sheet__cell:nth-child(4n + 4) figure { transform: rotate(2.75deg); }

.sheet__cell figure:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: var(--shadow-lift);
}

.sheet__cell img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.sheet__cell figcaption {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  line-height: 1.2;
  margin-top: 0.35rem;
  color: var(--ink-soft);
}

.showcase__more {
  text-align: center;
  font-family: var(--ff-display);
  font-size: 1.35rem;
  margin-top: 2.25rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   3. Features — pastel cards
   -------------------------------------------------------------------------- */

.features {
  background: var(--sky-tint);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.card {
  border-radius: 16px;
  padding: 1.6rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card--teal     { background: var(--card-teal); }
.card--orange   { background: var(--card-orange); }
.card--pink     { background: var(--card-pink); }
.card--lavender { background: var(--card-lavender); }
.card--mint     { background: var(--card-mint); }
.card--sky      { background: var(--card-sky); }

.card__art {
  width: 72px;
  height: auto;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 3px 4px rgba(74, 58, 47, 0.15));
}

/* The remix example includes a speech bubble; render larger so its text reads */
.card__art--remix {
  width: 104px;
  margin-bottom: 0.25rem;
}

.card__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

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

/* feeling chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.chip {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 2px solid rgba(74, 58, 47, 0.18);
  background: var(--cream);
}

.chip--happy { background: #fff3c9; }
.chip--love  { background: #fadcd9; }
.chip--chill { background: #d8edfb; }
.chip--silly { background: #fce4c8; }
.chip--mood  { background: #e6e1f8; }
.chip--decor { background: #ddedd2; }

/* --------------------------------------------------------------------------
   4. How to find it
   -------------------------------------------------------------------------- */

.howto {
  background: var(--cream);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  text-align: center;
}

.step {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 1.4rem 1.5rem;
  box-shadow: var(--shadow-soft);
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-family: var(--ff-display);
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 0.7rem;
  border: 2px solid rgba(74, 58, 47, 0.15);
}

.step__num--sky   { background: var(--card-sky); }
.step__num--peach { background: var(--card-orange); }
.step__num--mint  { background: var(--card-mint); }

.step__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: 1.45rem;
  margin-bottom: 0.3rem;
}

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

.step__appicon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  border-radius: 26%;
  vertical-align: -0.4em;
  border: 1px solid rgba(74, 58, 47, 0.2);
}

.howto__tip {
  text-align: center;
  max-width: 520px;
  margin: 2.25rem auto 0;
  font-family: var(--ff-display);
  font-size: 1.25rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   5. Love the flock?
   -------------------------------------------------------------------------- */

.love {
  background: var(--peach-tint);
}

.love__art {
  width: clamp(130px, 22vw, 170px);
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 6px 8px rgba(74, 58, 47, 0.18));
}

.love .section__inner--narrow p {
  margin-bottom: 1rem;
}

.love__cta {
  display: inline-block;
  font-family: var(--ff-display);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink);
  background: var(--salmon);
  padding: 0.65rem 1.7rem;
  border-radius: 999px;
  border: 2px solid rgba(74, 58, 47, 0.25);
  box-shadow: var(--shadow-soft);
  margin: 0.5rem 0 1.5rem;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.love__cta:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem) 2.75rem;
  font-size: 0.95rem;
}

.footer a {
  color: var(--cream);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 248, 238, 0.45);
}

.footer a:hover {
  text-decoration-color: var(--cream);
}

.footer a:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 3px;
}

.footer__follow {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 248, 238, 0.14);
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.footer__social a:hover {
  background: var(--cream);
  color: var(--ink);
  transform: translateY(-2px);
}

.footer__social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-family: var(--ff-display);
  font-size: 1.15rem;
}

.footer__dot {
  opacity: 0.6;
}

.footer__small {
  margin-top: 0.6rem;
  opacity: 0.75;
  font-family: var(--ff-display);
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .flock__bird {
    animation: none;
  }

  .sheet__cell figure,
  .card,
  .hero__cta,
  .love__cta {
    transition: none;
  }

  .sheet__cell figure:hover,
  .card:hover,
  .love__cta:hover {
    transform: none;
  }

  /* keep the hand-placed tilt on the sticker sheet even without motion */
  .sheet__cell:nth-child(4n + 1) figure:hover { transform: rotate(-2.5deg); }
  .sheet__cell:nth-child(4n + 2) figure:hover { transform: rotate(1.75deg); }
  .sheet__cell:nth-child(4n + 3) figure:hover { transform: rotate(-1.25deg); }
  .sheet__cell:nth-child(4n + 4) figure:hover { transform: rotate(2.75deg); }
}
