/* ==========================================================================
   Heartmallow — heartmallow.com
   Built from Figma: mobile 81:149 / desktop 81:119
   Type and spacing scale fluidly between the 393px and 1728px frames.
   ========================================================================== */

@font-face {
  font-family: 'Shantell Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('assets/fonts/shantell-sans-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: 'Shantell Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('assets/fonts/shantell-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Palette — straight from the Figma frames */
  --sky:    #9ed7ff;
  --ink:    #2f2f2f;
  --bg:     #f5f5f5;
  --butter: #fff59e;

  /* Fluid scale: value at 393px viewport → value at 1280px viewport (--shell).
     Everything tops out once the content column stops growing. */
  --fs-wordmark: clamp(1.25rem, 0.59rem + 2.71vw, 2.75rem);   /* 20 → 44 */
  --fs-heading:  clamp(1.25rem, 0.86rem + 1.58vw, 2.125rem);  /* 20 → 34 */
  --fs-body:     clamp(0.9375rem, 0.77rem + 0.68vw, 1.3125rem); /* 15 → 21 */
  --fs-btn:      clamp(1.25rem, 1.08rem + 0.68vw, 1.625rem);  /* 20 → 26 */

  --mascot:      clamp(81px, 28.3px + 13.4vw, 200px);         /* 81 → 200 */
  --header-h:    clamp(59px, 40.8px + 4.62vw, 100px);         /* 59 → 100 */

  --gutter:      clamp(1rem, 0.4rem + 2.4vw, 3rem);
  --row-gap:     clamp(2.5rem, 1.2rem + 5.6vw, 4.5rem);       /* 40 → 72 */

  /* Width of the readable column, and the inline padding that centres it.
     Below --shell the layout keeps a --gutter margin; above it, the extra
     space becomes even padding on both sides. */
  --shell:       1280px;
  --pad-inline:  max(var(--gutter), (100% - var(--shell)) / 2);
  --measure:     850px;

  --ease: cubic-bezier(0.22, 0.68, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Shantell Sans', 'Comic Sans MS', 'Segoe Print', cursive, sans-serif;
  font-variation-settings: 'BNCE' 0, 'INFM' 0, 'SPAC' 0;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { 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: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--butter);
  border: 1px solid var(--ink);
  border-radius: 0 0 12px 0;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- brand --- */

.brand {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 0.5vw, 0.5rem);
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  height: var(--header-h);
  width: auto;
  aspect-ratio: 1;
  object-fit: contain;
  flex: none;
}

.brand__name {
  font-size: var(--fs-wordmark);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* -------------------------------------------------------------- header --- */

.site-header {
  background: var(--sky);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding-inline: var(--pad-inline);
}

.site-header .brand { height: 100%; }

/* ---------------------------------------------------------------- hero --- */

/* The mobile (393×145) and desktop (1728×615) hero frames are near-identical
   ratios, so one aspect-ratio covers both. Past --shell the banner stops
   growing and the sky background carries the colour out to the edges, so it
   reads as one band with the header above it. */
.hero { background: var(--sky); }

.hero img {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  height: auto;          /* beat the width/height attribute presentation hint */
  aspect-ratio: 2.8;
  object-fit: cover;
  object-position: center;
}

/* ------------------------------------------------------------ sections --- */

.sections {
  padding-block: var(--row-gap);
  padding-inline: var(--pad-inline);
  display: flex;
  flex-direction: column;
  gap: var(--row-gap);
}

/* Narrow screens stack the character above its text, as in the mobile frame. */
.row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.prose { max-width: var(--measure); }

.prose h2 {
  margin: 0 0 0.35em;
  font-size: var(--fs-heading);
  font-weight: 800;
  line-height: 1.2;
}

.prose p {
  margin: 0;
  font-size: var(--fs-body);
}

.mascot {
  width: var(--mascot);
  height: var(--mascot);
  flex: none;
}

/* ----------------------------------------------------------------- cta --- */

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

.btn {
  display: grid;
  place-items: center;
  text-align: center;
  width: min(420px, 100%);
  min-height: clamp(86px, 75px + 2.7vw, 110px);
  padding: 0.75rem 1.5rem;
  background: var(--butter);
  border: 1px solid var(--ink);
  border-radius: 25px;
  font-size: var(--fs-btn);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 -2px rgba(47, 47, 47, 0.18);
}

.btn:active { transform: translateY(0); }

/* -------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--sky);
  padding-block: clamp(1rem, 0.4rem + 2.4vw, 2.5rem);
  padding-inline: var(--pad-inline);
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 2rem);
}

.site-footer .brand__mark {
  height: clamp(58px, 41px + 4.28vw, 96px);
}

.socials {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(0.9375rem, 0.4rem + 2.2vw, 3.75rem);
}

.socials a {
  display: block;
  transition: transform 0.2s var(--ease);
}

.socials a:hover,
.socials a:focus-visible { transform: scale(1.12); }

.socials img {
  width: clamp(20px, 11px + 2.25vw, 40px);
  height: clamp(20px, 11px + 2.25vw, 40px);
}

/* --------------------------------------------- desktop / wide layout ----- */

@media (min-width: 900px) {
  .row {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  /* Alternating rhythm: rows 2 and 4 sit in the right half of the shell */
  .row--end { justify-content: flex-end; }
  .row--end .prose { max-width: 854px; }

  .site-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 180px;
  }

  .socials {
    gap: clamp(1.5rem, -1.7rem + 5.6vw, 2.5rem) clamp(2rem, -2.6rem + 8.5vw, 3.5rem);
  }
}

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

/* Only hide ahead of the reveal when JS is actually running, so a blocked or
   failed script can never leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
