/* ============================================================
   Balloon Craft Auckland — style.css
   Direction A "Dreamy Pastel": lavender/blush/mint palette,
   glassmorphism, hand-rolled animations (zero JS libraries).
   ============================================================ */

/* ---------- Font (self-hosted Fraunces variable) ---------- */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --lav: #cdb4ff;
  --lav-deep: #a685f0;
  --blush: #f9c5e1;
  --blush-deep: #ee9fd0;
  --mint: #8fd8c6;
  --peach: #ffc285;
  --ink: #5c4a72;
  --ink-soft: #8a7aa0;
  --paper: #ffffff;
  --grad-sky: linear-gradient(140deg, #f3e7ff 0%, #ffe3ef 48%, #dff5f7 100%);
  --grad-primary: linear-gradient(135deg, #a685f0, #ee9fd0);
  --radius: 20px;
  --shadow-soft: 0 10px 30px rgba(160, 120, 200, .16);
  --shadow-pop: 0 18px 44px rgba(160, 120, 200, .26);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background: var(--grad-sky) fixed;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--lav-deep); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--paper); padding: 10px 18px; border-radius: 12px;
}
.skip-link:focus { left: 8px; }

/* ============================================================
   Ambient sky: floating balloons + sparkles (parallax via
   --mx/--my set by JS on pointer devices)
   ============================================================ */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.balloon {
  position: absolute;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  opacity: .8;
  will-change: transform;
  animation: balloon-float var(--dur, 9s) ease-in-out infinite;
}
.balloon::after {
  content: ''; position: absolute; left: 20%; top: 12%;
  width: 30%; height: 20%; background: rgba(255,255,255,.55);
  border-radius: 50%; transform: rotate(-25deg);
}
.balloon::before {
  content: ''; position: absolute; left: 50%; bottom: -14px;
  width: 2px; height: 14px; background: rgba(92,74,114,.2);
}
@keyframes balloon-float {
  0%, 100% { transform: translate(var(--px, 0), var(--py, 0)) translateY(0) rotate(-3deg); }
  50%      { transform: translate(var(--px, 0), var(--py, 0)) translateY(-22px) rotate(3deg); }
}
.b1 { width: 110px; height: 132px; left: 6%;  top: 16%; background: linear-gradient(160deg, var(--blush), var(--blush-deep)); --dur: 10s; --d: 1.6; }
.b2 { width: 78px;  height: 94px;  right: 9%; top: 10%; background: linear-gradient(160deg, var(--lav), var(--lav-deep));   --dur: 8s;  --d: 1.1; animation-delay: -2.4s; }
.b3 { width: 60px;  height: 72px;  left: 22%; bottom: 12%; background: linear-gradient(160deg, #bdeee0, var(--mint));       --dur: 11s; --d: .8;  animation-delay: -5s; }
.b4 { width: 46px;  height: 56px;  right: 24%; bottom: 22%; background: linear-gradient(160deg, #ffd9a8, var(--peach));     --dur: 9s;  --d: 1.9; animation-delay: -1.2s; }
.b5 { width: 34px;  height: 42px;  left: 48%; top: 6%;  background: linear-gradient(160deg, var(--mint), #6fc3ae);          --dur: 12s; --d: .5;  animation-delay: -3.6s; }

.spark {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.9); box-shadow: 0 0 12px rgba(255,255,255,.9);
  animation: twinkle var(--dur, 4s) ease-in-out infinite;
}
.s1 { left: 46%; top: 24%; }
.s2 { left: 14%; top: 58%; --dur: 5s; animation-delay: -1.5s; }
.s3 { right: 16%; top: 44%; --dur: 6s; animation-delay: -3s; }
.s4 { right: 40%; bottom: 14%; --dur: 4.5s; animation-delay: -2s; }
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.6); }
  50%      { opacity: .9;  transform: scale(1.15); }
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, .55);
  border-bottom: 1px solid rgba(166, 133, 240, .14);
}
.nav {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  color: var(--ink); text-decoration: none; letter-spacing: .2px;
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.wordmark span { color: var(--lav-deep); }
.wordmark-balloon { width: 20px; animation: balloon-float 6s ease-in-out infinite; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: 4px; }

/* ---------- Share button (revealed by JS) ---------- */
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid rgba(166, 133, 240, .35);
  background: rgba(255, 255, 255, .6); color: var(--ink-soft);
  cursor: pointer; flex-shrink: 0;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.share-btn[hidden] { display: none; }
.share-btn:hover {
  transform: translateY(-2px); border-color: var(--lav-deep); color: var(--lav-deep);
}
.share-btn:focus-visible { outline: 3px solid var(--lav-deep); outline-offset: 2px; }
.share-btn svg { width: 19px; height: 19px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  transform: translate(-50%, 16px);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(166, 133, 240, .25);
  backdrop-filter: blur(8px);
  color: var(--ink); font-size: 14.5px; font-weight: 500;
  padding: 12px 22px; border-radius: 999px;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; max-width: calc(100vw - 40px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none; border: 0;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn:focus-visible { outline: 3px solid var(--lav-deep); outline-offset: 2px; }
.btn-primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 8px 22px rgba(166, 133, 240, .38);
}
.btn-primary:hover { box-shadow: var(--shadow-pop); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn-ghost {
  background: rgba(255,255,255,.6); color: var(--ink);
  border: 1.5px solid rgba(166,133,240,.35);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { border-color: var(--lav-deep); }
.btn-small { padding: 9px 20px; font-size: 14px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: calc(100svh - 72px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 24px 80px; position: relative;
}
.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--lav-deep); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6.2vw, 64px); font-weight: 600;
  color: var(--ink); margin: 0 0 20px; letter-spacing: -.5px;
}
.hero h1 em {
  font-style: italic; font-weight: 400;
  background: linear-gradient(120deg, var(--lav-deep), var(--blush-deep) 55%, var(--mint));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 620px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.hero-badges {
  list-style: none; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  padding: 0; margin: 0;
}
.hero-badges li {
  background: rgba(255,255,255,.65); border: 1px solid rgba(166,133,240,.2);
  backdrop-filter: blur(6px); border-radius: 999px; padding: 8px 18px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  box-shadow: 0 4px 14px rgba(160,120,200,.12);
}
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); }
.scroll-hint span {
  display: block; width: 12px; height: 12px;
  border-right: 2.5px solid var(--ink-soft); border-bottom: 2.5px solid var(--ink-soft);
  transform: rotate(45deg); opacity: .55;
  animation: hint-bob 1.8s ease-in-out infinite;
}
@keyframes hint-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: .35; }
  50%      { transform: rotate(45deg) translate(6px, 6px); opacity: .8; }
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 96px 24px; position: relative; }
.section-inner { max-width: 1080px; margin: 0 auto; }
.section-inner-narrow { max-width: 720px; }
.section h2 { font-size: clamp(30px, 4vw, 42px); text-align: center; }
.section-intro { text-align: center; color: var(--ink-soft); max-width: 560px; margin: 0 auto 56px; font-size: 17px; }
.section-tint {
  background: rgba(255,255,255,.42);
  border-top: 1px solid rgba(166,133,240,.1);
  border-bottom: 1px solid rgba(166,133,240,.1);
  backdrop-filter: blur(4px);
}
.section-note { text-align: center; color: var(--ink-soft); margin-top: 36px; font-style: italic; }

/* ---------- Cards (What I make) ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.card {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(166,133,240,.16);
  border-radius: var(--radius); padding: 26px 24px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform;
}
.card:hover {
  transform: translateY(-8px) rotate(-.6deg);
  box-shadow: var(--shadow-pop);
}
.card:nth-child(even):hover { transform: translateY(-8px) rotate(.6deg); }
.card-art {
  background: linear-gradient(150deg, rgba(243,231,255,.9), rgba(255,227,239,.9));
  border-radius: 14px; margin-bottom: 18px; padding: 10px;
  transition: transform .3s ease;
}
.card:hover .card-art { transform: scale(1.04) translateY(-2px); }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ---------- Gallery (Style inspiration) ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}
.photo {
  margin: 0; position: relative; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  background: var(--paper);
}
.photo img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  display: block; transition: transform .5s ease;
}
.photo:hover img { transform: scale(1.06); }
.photo figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(6px);
  border-radius: 12px; padding: 8px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}

/* ---------- Steps (How it works) ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px; counter-reset: step;
  position: relative;
}
.step { text-align: center; position: relative; padding-top: 8px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  font-family: var(--font-display); font-size: 26px; font-weight: 600; color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 8px 20px rgba(166,133,240,.35), inset 0 -4px 8px rgba(0,0,0,.08);
  margin-bottom: 18px;
  transition: transform .3s ease;
}
.step:hover .step-num { transform: translateY(-6px) rotate(-5deg); }
.step:nth-child(2) .step-num { background: linear-gradient(135deg, var(--blush-deep), var(--peach)); box-shadow: 0 8px 20px rgba(238,159,208,.4); }
.step:nth-child(3) .step-num { background: linear-gradient(135deg, var(--mint), #6fc3ae); box-shadow: 0 8px 20px rgba(143,216,198,.45); }
.step h3 { font-size: 21px; }
.step p { color: var(--ink-soft); font-size: 15px; max-width: 300px; margin: 0 auto; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 14px; }
.faq-item {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(166,133,240,.16);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(160,120,200,.1);
  transition: box-shadow .25s ease;
}
.faq-item[open] { box-shadow: var(--shadow-soft); }
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 16px;
  list-style: none; position: relative; padding-right: 52px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 22px; top: 50%;
  width: 26px; height: 26px; margin-top: -13px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(166,133,240,.14); color: var(--lav-deep);
  font-weight: 400; font-size: 18px; line-height: 1;
  transition: transform .25s ease, background .25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--lav-deep); color: #fff; }
.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ============================================================
   Enquiry form
   ============================================================ */
.section-enquire {
  background: linear-gradient(160deg, rgba(205,180,255,.16), rgba(249,197,225,.18));
  border-top: 1px solid rgba(166,133,240,.12);
}
.enquiry-form {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(166,133,240,.18);
  border-radius: 24px; padding: 36px;
  box-shadow: var(--shadow-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
.field .optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px; font: inherit; color: var(--ink);
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(166,133,240,.3); border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--lav-deep);
  box-shadow: 0 0 0 4px rgba(166,133,240,.18);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #e64980; box-shadow: 0 0 0 4px rgba(230,73,128,.14);
}
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }
.btn-submit { width: 100%; margin-top: 6px; font-size: 17px; padding: 15px; }
.btn-submit[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-submit .btn-label { display: inline-block; animation: none; }
.btn-submit.is-sending .btn-label { animation: pulse-soft 1s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: .55; } }
.form-status { margin: 14px 0 0; font-size: 14px; text-align: center; min-height: 1.4em; }
.form-status.is-error { color: #c2255c; }

/* ---------- Success panel + confetti ---------- */
.form-success {
  position: relative; text-align: center;
  background: rgba(255,255,255,.85); border-radius: 24px; padding: 64px 36px;
  border: 1px solid rgba(166,133,240,.2); box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.success-balloon { width: 60px; margin: 0 auto 12px; animation: pop-in .6s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pop-in {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
.form-success h3 { font-size: 26px; margin-bottom: 6px; }
.form-success p { color: var(--ink-soft); margin: 0; }
.confetti i {
  position: absolute; top: -12px; width: 9px; height: 14px; opacity: 0;
  border-radius: 2px; animation: confetti-fall var(--cf-dur, 2.8s) ease-in var(--cf-delay, 0s) 1 both;
}
.confetti i:nth-child(1)  { left: 8%;  background: var(--blush); }
.confetti i:nth-child(2)  { left: 18%; background: var(--lav); }
.confetti i:nth-child(3)  { left: 28%; background: var(--mint); }
.confetti i:nth-child(4)  { left: 38%; background: var(--peach); }
.confetti i:nth-child(5)  { left: 48%; background: var(--blush-deep); }
.confetti i:nth-child(6)  { left: 58%; background: var(--lav-deep); }
.confetti i:nth-child(7)  { left: 66%; background: var(--mint); }
.confetti i:nth-child(8)  { left: 74%; background: var(--peach); }
.confetti i:nth-child(9)  { left: 82%; background: var(--blush); }
.confetti i:nth-child(10) { left: 90%; background: var(--lav); }
.confetti i:nth-child(11) { left: 34%; background: var(--peach); }
.confetti i:nth-child(12) { left: 62%; background: var(--blush-deep); }
.confetti i:nth-child(2n)    { --cf-dur: 2.4s; --cf-delay: .15s; width: 7px; height: 11px; }
.confetti i:nth-child(3n)    { --cf-dur: 3.1s; --cf-delay: .3s; }
.confetti i:nth-child(5n)    { --cf-dur: 2.7s; --cf-delay: .45s; border-radius: 50%; }
@keyframes confetti-fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0) translateX(0); }
  8%   { opacity: 1; }
  100% { opacity: 0; transform: translateY(340px) rotate(540deg) translateX(var(--cf-x, 30px)); }
}
.confetti i:nth-child(1)  { --cf-x: 40px; }
.confetti i:nth-child(2)  { --cf-x: -34px; }
.confetti i:nth-child(3)  { --cf-x: 26px; }
.confetti i:nth-child(4)  { --cf-x: -22px; }
.confetti i:nth-child(5)  { --cf-x: 18px; }
.confetti i:nth-child(6)  { --cf-x: -30px; }
.confetti i:nth-child(7)  { --cf-x: 22px; }
.confetti i:nth-child(8)  { --cf-x: -18px; }
.confetti i:nth-child(9)  { --cf-x: 28px; }
.confetti i:nth-child(10) { --cf-x: -26px; }
.confetti i:nth-child(11) { --cf-x: 14px; }
.confetti i:nth-child(12) { --cf-x: -12px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 48px 24px 40px; text-align: center;
  background: rgba(255,255,255,.5);
  border-top: 1px solid rgba(166,133,240,.14);
}
.footer-brand { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.footer-note { color: var(--ink-soft); font-size: 14px; margin-bottom: 10px; }
.footer-copy { color: var(--ink-soft); font-size: 13px; opacity: .75; margin: 0; }

/* ============================================================
   Scroll reveal (JS adds .in via IntersectionObserver)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; padding: 12px 16px; }
  .wordmark { font-size: 17px; }
  .nav-cta { margin-left: auto; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .enquiry-form { padding: 26px 20px; }
  .section { padding: 72px 18px; }
  .hero { min-height: calc(100svh - 60px); }
  .sky .b3, .sky .b5 { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .photo figcaption { font-size: 12px; padding: 6px 10px; }
}

/* Very narrow phones: drop the place-name from the wordmark so the CTA fits */
@media (max-width: 430px) {
  .wordmark span { display: none; }
}

/* ============================================================
   Reduced motion: honour user preference, kill all motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .sky .balloon, .spark, .wordmark-balloon, .scroll-hint span { animation: none; }
}
