/* DrawHop — shared styles.
   Palette and type are taken from the app itself, not approximated:
   colours are the Crayon tokens in core/ui (CrayonPurple, SunYellow, SkyBlue,
   GrassGreen, Paper, Ink) and the faces are Fredoka + Nunito, the same OFL
   families the iOS app bundles. */

:root {
  --purple:      #7C4DFF;  /* CrayonPurple — the brand colour */
  --purple-dark: #5E35B1;  /* CrayonPurpleDark */
  --yellow:      #FFD54F;  /* SunYellow */
  --blue:        #4FC3F7;  /* SkyBlue */
  --green:       #66BB6A;  /* GrassGreen */
  --paper:       #FDF6EC;  /* Paper */
  --ink:         #3E2723;  /* Ink */
  --ink-soft:    #6D5850;
  --card:        #FFFCF6;
  --line:        #EADFCD;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  /* Soft crayon-coloured washes on Paper. NO grain tile here: crayon_grain.png
     is a HIGH-CONTRAST texture the app strokes over buttons at low alpha, not a
     paper fibre — tiled full-strength behind a page it swamps the text. */
  background-image:
    radial-gradient(circle at 15% 8%,  rgba(124, 77,255,0.10) 0, transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(79, 195,247,0.10) 0, transparent 40%),
    radial-gradient(circle at 50% 98%, rgba(255,213, 79,0.12) 0, transparent 45%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, .logo-text, .btn {
  font-family: Fredoka, Nunito, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}
h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); line-height: 1.15; margin: 0 0 14px; }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.7rem); margin: 40px 0 12px; color: var(--purple-dark); }
h3 { font-size: 1.08rem; margin: 0 0 6px; }

a { color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--purple-dark); }
a:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 760px; margin: 0 auto; padding: 20px 20px 72px; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 10px 0 28px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo img { width: 52px; height: 52px; display: block; }
.logo-text { font-size: 1.45rem; color: var(--purple-dark); }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { font-weight: 700; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* Hero */
.hero { text-align: center; padding: 8px 0 20px; }
.hero img.mascot { width: min(230px, 56vw); height: auto; margin: 0 auto 18px; display: block; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 56ch; margin: 0 auto; }
.scribble {
  color: var(--purple);
  text-decoration: underline wavy var(--yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

/* Cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 36px 0; }
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 2px 0 rgba(62,39,35,0.06);
}
.card .icon { width: 34px; height: 34px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.callout {
  background: rgba(124,77,255,0.07);
  border: 2px dashed var(--purple);
  border-radius: 18px;
  padding: 20px 22px;
  margin: 32px 0;
}
.callout h2 { margin-top: 0; }

/* Buttons */
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.btn {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.02rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--purple-dark);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn:hover { color: #fff; background: var(--purple-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--purple-dark); }
.btn.secondary { background: var(--card); color: var(--purple-dark); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn.secondary:hover { background: #fff; color: var(--purple-dark); }

/* Prose (privacy) */
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .meta { color: var(--ink-soft); font-size: 0.94rem; }
.prose .placeholder {
  background: rgba(255,213,79,0.35);
  border-bottom: 2px solid var(--yellow);
  padding: 1px 5px; border-radius: 3px; font-weight: 700;
}

/* Form — class names match the markup (.form-row/.hint/.required/.hp-field/
   .form-actions). An earlier rewrite of this file invented .form-field and .hp,
   which matched nothing, so every input fell back to browser defaults. */
.form { margin-top: 26px; }

.form-row { margin-bottom: 20px; }

.form-row label {
  display: block;
  font-family: Fredoka, Nunito, sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 7px;
  color: var(--ink);
}

.required { color: var(--purple); font-weight: 700; }

.hint { color: var(--ink-soft); font-size: 0.92rem; font-weight: 400; }
.form-row .hint { display: block; margin-top: 6px; }

.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1.02rem;
  color: var(--ink);
  padding: 13px 15px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  -webkit-appearance: none;
  appearance: none;
}

.form-row input:hover, .form-row textarea:hover { border-color: #DBCBB0; }

.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124,77,255,0.18);
}

.form-row textarea { min-height: 170px; resize: vertical; line-height: 1.55; }

/* Honeypot: must stay reachable to bots but invisible (and unfocusable) to people. */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-actions {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-top: 26px;
}

/* Empty by default and announced via aria-live — so it must take no space until
   it actually says something, or it renders as a stray coloured bar. */
.form-status { margin-top: 18px; padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.ok  { background: rgba(102,187,106,0.16); border: 2px solid var(--green); }
.form-status.err { background: rgba(229,115,115,0.16); border: 2px solid #E57373; }


/* Phone screenshots — real captures from the app, not mockups. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 26px;
  margin: 34px auto 8px;
  max-width: 560px;
}
.shots figure { margin: 0; text-align: center; }
.shots img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 rgba(62,39,35,0.12);
  background: var(--card);
}
.shots figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

/* Footer */
.site-footer {
  margin-top: 56px; padding-top: 22px;
  border-top: 2px solid var(--line);
  color: var(--ink-soft); font-size: 0.94rem;
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between;
}
.site-footer a { font-weight: 700; }

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