/* Gan Early Childhood Center: coming-soon page.
   Built from the agency's Canva mockup (design-src/canva-mockup.png).
   Mobile-first: the base rules are the phone layout, desktop is added below. */

@font-face {
  font-family: "Colby";
  src: url("/fonts/colby-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #214E39;
  --cream: #F6F4EA;
  --slate: #7CA2B6;
  --clay: #C46C4A;
  --clay-dark: #A9573A;
  --ink: #555555;
  --white: #FFFFFF;
  --display: "Colby", "gotham", "Helvetica Neue", Arial, sans-serif;
  --body: "gotham", "Helvetica Neue", Arial, sans-serif;
  --pad: 20px;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--green);
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }

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

/* Brush-stroke buttons: the shape is the mockup's own stroke, used as a mask. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 30px 13px;
  border: 0;
  background: none;
  color: var(--cream);
  font: 700 16px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--clay);
  -webkit-mask: url("/img/brush-button.svg") center / 100% 100% no-repeat;
          mask: url("/img/brush-button.svg") center / 100% 100% no-repeat;
  transition: background-color .2s ease;
}
.btn:hover::before, .btn:focus-visible::before { background: var(--clay-dark); }
.btn { transition: transform .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); transition-duration: .08s; }
.btn:focus-visible { outline: 3px solid var(--slate); outline-offset: 3px; border-radius: 12px; }
.btn[disabled] { cursor: progress; opacity: .7; }
.btn--sm { min-height: 40px; padding: 9px 20px 10px; font-size: 14px; }

/* Header */
.top { background: var(--cream); }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.top__logo img { width: 92px; }

/* Hero */
.hero { overflow: hidden; }
.hero__inner { display: grid; padding-top: 36px; }
.hero h1 { font-size: clamp(36px, 10.4vw, 46px); line-height: 1.12; }
.hero h1 br.lg { display: none; }
.hero__copy p { margin-top: 20px; font-size: 17px; line-height: 1.7; max-width: 30em; }
/* Phone art is the desktop composition scaled down: the desktop 612px frame from y=300 to the
   band (537px tall), every position as a % of that frame, so leaves sit behind the child the same way. */
.hero__art { position: relative; overflow: hidden; justify-self: end; margin: 24px calc(-1 * var(--pad)) 0 0; width: min(calc(100% + var(--pad)), 520px); aspect-ratio: 612 / 537; }
.hero__disc {
  position: absolute; left: 19.3%; top: 22.5%; width: 85.9%; height: 88.1%;
  border-radius: 50%; background: var(--cream);
}
.hero__child { position: absolute; left: 1.96%; top: 1.86%; width: 94.4%; }
.hero__leaf { position: absolute; }
.hero__leaf--gold { left: 7.7%; top: 24.9%; width: 36.4%; }
.hero__leaf--green { left: 72.5%; top: 33.9%; width: 50.7%; rotate: 18deg; }

/* Facts band */
.facts { background: var(--slate); color: var(--white); }
.facts__list {
  list-style: none; margin: 0 auto; padding-top: 26px; padding-bottom: 26px;
  display: grid; gap: 16px; max-width: 420px;
}
.facts li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: center; font-size: 14px; line-height: 1.45; }
.facts img { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; object-fit: contain; }
.facts strong { font-weight: 700; }
.facts span { grid-column: 2; font-size: 12.5px; opacity: .95; }
/* Phone rows: icon spans two rows; a lone line spans both and centres, a pair meets in the middle. */
.facts strong { grid-column: 2; align-self: end; }
.facts span { align-self: start; }
.facts strong:last-child { grid-row: 1 / span 2; align-self: center; }

/* Story-time sign-up */
.story { padding: 36px 0; }
.story__panel {
  position: relative; isolation: isolate;
  display: grid; gap: 4px; padding: 34px 24px 40px;
}
.story__panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--cream);
  -webkit-mask: url("/img/brush-panel.svg") center / 100% 100% no-repeat;
          mask: url("/img/brush-panel.svg") center / 100% 100% no-repeat;
}
.story__book { position: relative; width: 170px; margin: 0 auto 10px; }
.story__cloud { position: absolute; left: -22%; top: -14%; width: 95%; }
.story__cover { position: relative; width: 100%; filter: drop-shadow(0 6px 10px rgba(33, 78, 57, .18)); }
.story h2 { font-size: 28px; line-height: 1.15; text-align: center; }
.story__lede { margin-top: 10px; color: var(--ink); font-size: 15px; line-height: 1.55; text-align: center; }
.story__form { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 22px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--green); }
.field input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid transparent; border-radius: 8px; background: var(--white);
  color: var(--green); font: 400 16px var(--body);
}
.field input { transition: border-color .2s ease, box-shadow .2s ease; }
.field input:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 4px rgba(124, 162, 182, .22); }
.field input[aria-invalid="true"] { border-color: var(--clay); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.story__form .btn { justify-self: stretch; margin-top: 6px; }
.story__error { color: var(--clay-dark); font-size: 14px; font-weight: 700; }
.story__done { margin-top: 20px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.story__done:focus { outline: none; }
.story__thanks { font-size: 17px; line-height: 1.6; }

/* Footer */
.foot { position: relative; overflow: hidden; color: var(--cream); text-align: center; isolation: isolate; padding: 64px 0 72px; }
.foot::before {
  content: ""; position: absolute; z-index: -1; left: -8%; right: -8%; top: 0; bottom: -40%;
  background: var(--green);
  -webkit-mask: url("/img/brush-band.svg") center top / 100% 100% no-repeat;
          mask: url("/img/brush-band.svg") center top / 100% 100% no-repeat;
}
.foot h2 { font-size: 28px; line-height: 1.2; color: var(--white); }
.foot p { margin: 18px auto 28px; font-size: 16px; line-height: 1.7; max-width: 32em; }
.foot__flower { position: absolute; z-index: -1; right: -34px; bottom: -70px; width: 96px; opacity: .45; }

/* Tablet */
@media (min-width: 640px) {
  :root { --pad: 40px; }
  .facts__list { grid-template-columns: 1.4fr .78fr 1.1fr 1.3fr; gap: 0; max-width: var(--max); }
  .facts li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-size: 13px; padding: 0 14px; border-left: 2px solid rgba(255, 255, 255, .85); }
  .facts img { width: 44px; height: 44px; margin-bottom: 4px; }
  .facts span { font-size: 12px; margin-top: -4px; }
  .facts strong:last-child, .facts strong, .facts span, .facts img { grid-row: auto; grid-column: auto; align-self: auto; }
  .facts li:first-child { border-left: 0; }
  .story__form { grid-template-columns: 1fr 1fr; gap: 16px 24px; }
  .field--full, .story__error { grid-column: 1 / -1; }
  .story__form .btn { justify-self: start; }
}

/* Desktop */
@media (min-width: 900px) {
  :root { --pad: 66px; }
  .top__inner { padding-top: 24px; padding-bottom: 22px; }
  .top__logo img { width: 134px; }
  .btn { font-size: 16px; padding: 13px 34px 14px; }
  .btn--sm { min-height: 50px; padding: 13px 28px 14px; font-size: 16px; }

  /* Desktop keeps the mockup's line breaks and its art frame: 612 x 537 at the 1052px page,
     flush right on the facts band, scaled with the page below that width (positions are the
     same % as the phone rules above). The child runs past the band and .hero crops it. */
  .hero__inner { grid-template-columns: 1fr; position: relative; padding-top: 68px; min-height: 837px; }
  .hero__copy { position: relative; z-index: 2; }
  .hero h1 { font-size: clamp(60px, 7.36vw, 77.5px); line-height: 1.19; }
  .hero h1 br.lg { display: inline; }
  .hero__copy p { margin-top: 64px; font-size: clamp(18px, 2.1vw, 22px); line-height: 1.72; max-width: min(400px, 37vw); }
  /* Past 1052px the art stays where it sits relative to the headline (as in Canva) instead of
     following the wider page edge, which slid the head under the comma. */
  .hero__art { position: absolute; z-index: 1; top: auto; right: max(0px, calc(100% - 1052px)); bottom: 0; width: min(58.2%, 612px); margin: 0; overflow: visible; }

  .facts__list { padding-top: 26px; padding-bottom: 26px; }
  .facts li { font-size: 13.5px; }
  .facts img { width: 50px; height: 50px; }

  .story { padding: 50px 0 56px; }
  .story__panel { grid-template-columns: 250px 1fr; gap: 32px; padding: 38px 80px 46px 34px; margin: 0 -36px; }
  .story__book { width: 190px; margin: 56px 0 0 16px; align-self: start; }
  .story h2, .story__lede { text-align: left; }
  .story h2 { font-size: 34px; }
  .story__lede { font-size: 14px; }
  .story__done { justify-items: start; text-align: left; }

  .foot { padding: 64px 0 96px; }
  .foot h2 { font-size: 34px; }
  .foot p { font-size: 17px; }
  .foot__flower { right: 0; bottom: 0; width: 200px; opacity: .5; }
}

/* Motion. Hero plays once on load (it is above the fold, so nothing reveals on scroll);
   leaves and the footer flower sway slowly; everything else is a response to the visitor. */
@media (prefers-reduced-motion: no-preference) {
  .hero__copy h1 { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__copy p  { animation: rise .8s .15s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__disc    { animation: grow 1s .2s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__child   { animation: rise-in 1s .35s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__leaf--gold  { transform-origin: 50% 100%; animation: unfurl .9s .55s cubic-bezier(.3, 1.4, .5, 1) both, sway 7s 1.6s ease-in-out infinite; }
  .hero__leaf--green { transform-origin: 30% 100%; animation: unfurl .9s .7s cubic-bezier(.3, 1.4, .5, 1) both, sway 8s 1.8s ease-in-out infinite reverse; }
  .foot__flower { transform-origin: 40% 100%; animation: sway 9s ease-in-out infinite; }
  .story__done:not([hidden]) { animation: rise .35s ease both; }
}
/* Scroll: each section below the hero plays once as it enters (js/site.js adds .is-in).
   Kept small and quick on purpose. Without JS, or with reduced motion, it is all just there. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { transition: opacity .6s ease, translate .6s cubic-bezier(.2, .7, .2, 1); }
  .js [data-reveal]:not(.is-in) { opacity: 0; translate: 0 20px; }
  .js .facts__list[data-reveal] { opacity: 1; translate: none; }
  .js .facts__list[data-reveal] li { transition: opacity .5s ease, translate .5s cubic-bezier(.2, .7, .2, 1); }
  .js .facts__list[data-reveal]:not(.is-in) li { opacity: 0; translate: 0 14px; }
  .js .facts__list li:nth-child(2) { transition-delay: .08s; }
  .js .facts__list li:nth-child(3) { transition-delay: .16s; }
  .js .facts__list li:nth-child(4) { transition-delay: .24s; }
  .js .story__book[data-reveal] { translate: none; opacity: 1; }
  .js .story__cover, .js .story__cloud { transition: opacity .7s ease, transform .8s cubic-bezier(.3, 1.3, .5, 1); }
  .js .story__book:not(.is-in) .story__cover { opacity: 0; transform: rotate(-9deg) translateY(24px); }
  .js .story__book:not(.is-in) .story__cloud { opacity: 0; transform: translateX(-24px); }
  .js .story__cloud { transition-delay: .15s; }
}
@keyframes rise    { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes rise-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes grow    { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
@keyframes unfurl  { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }
@keyframes sway    { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
