/* ============================================================
   Apple Academy Preschool — styles
   Warm, friendly, rounded preschool styling. Mobile-first.
   ============================================================ */

:root {
  --cream: #fff9f2;
  --card: #ffffff;
  --ink: #3a2e2a;
  --ink-soft: #6b5d55;
  --apple: #d64541;        /* apple red */
  --apple-dark: #b7322e;
  --sun: #ffc53d;         /* sunny yellow */
  --leaf: #58a05c;        /* leaf green */
  --sky: #7fb6d9;
  --border: #f0e2d3;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(122, 72, 40, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

h1, h2, h3 { line-height: 1.2; margin-top: 0; font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; letter-spacing: 0.01em; }
h2 { font-size: 1.9rem; text-align: center; }
p { margin: 0 0 1rem; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }

.section { padding: 3.5rem 0; }
.section-alt { background: #fff; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 34rem; margin: 0 auto 1.75rem; }
.visit-note { text-align: center; max-width: 34rem; margin: -0.75rem auto 1.75rem; background: #fff3df; border: 2px dashed var(--sun); border-radius: 1rem; padding: 0.9rem 1.25rem; font-size: 1rem; }
.visit-note a { color: var(--apple); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--apple); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--apple-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn-outline { background: #fff; color: var(--apple); border-color: var(--apple); }
.btn-outline:hover { background: #fdf1ef; }

.btn-pay { background: var(--leaf); color: #fff; box-shadow: var(--shadow); }
.btn-pay:hover { background: #468a4a; }

.btn-large { font-size: 1.15rem; padding: 1rem 2.4rem; }
.btn-small { font-size: 0.85rem; padding: 0.45rem 1rem; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(46, 24, 12, 0.42), rgba(46, 24, 12, 0.30)),
    url('hero-backdrop.jpg') center / cover no-repeat;
  background-color: #2a160b;
  border-radius: 0 0 2.5rem 2.5rem;
  padding: 4.5rem 1.25rem 5rem;
  text-align: center;
  color: #fff;
}
.hero-inner { max-width: 42rem; margin: 0 auto; }
.hero-logo {
  width: 11rem; height: 11rem;
  border-radius: 50%;
  background: #fff8ef;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  margin-bottom: 1.1rem;
  border: 4px solid #fff;
}
.hero h1 { font-size: 2.6rem; margin-bottom: 0.5rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.45); font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: 0.04em; }
.tagline { font-size: 1.2rem; color: #ffe9c9; margin-bottom: 1.75rem; text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.fall-banner {
  display: inline-block;
  background: #fffdf8;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  margin: 0 0 1.75rem;
  border: 3px solid var(--apple);
  box-shadow: 0 4px 18px rgba(0,0,0,0.30);
}
.fall-banner strong { color: var(--apple-dark); }
.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Class cards ---------- */
.pills {
  list-style: none; padding: 0; margin: 0 0 1.75rem;
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
}
.pills li {
  background: #fff3df;
  border: 2px solid var(--sun);
  color: #7a5a1e;
  font-weight: 600; font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.class-card {
  font: inherit;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.class-card:hover { transform: translateY(-4px); }
.class-card.selected { border-color: var(--apple); box-shadow: 0 8px 28px rgba(214, 69, 65, 0.18); }
.class-card.selected::after {
  content: "✓ Selected";
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: var(--apple); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.25rem 0.7rem; border-radius: 999px;
}
.class-days { font-weight: 800; font-size: 1.15rem; }
.class-time { color: var(--ink-soft); font-size: 1rem; }
.class-cta { margin-top: 0.75rem; color: var(--apple); font-weight: 700; font-size: 0.95rem; }

/* ---------- About ---------- */
.section-about { background: #fff; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin: 2.5rem 0;
}
.about-grid:last-child { margin-bottom: 0; }
.about-text h3 { font-size: 1.5rem; color: var(--apple-dark); margin-bottom: 0.75rem; }
.about-text p { color: var(--ink-soft); }
.about-text p strong { color: var(--ink); }

.photo-card {
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 0.9rem 1.1rem;
  transform: rotate(-1.5deg);
  border: 2px solid var(--border);
  transition: transform 0.15s ease;
}
.photo-card:hover { transform: rotate(0deg) scale(1.015); }
.about-grid-reverse .photo-card { transform: rotate(1.5deg); }
.about-grid-reverse .photo-card:hover { transform: rotate(0deg) scale(1.015); }
.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.photo-card figcaption {
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
  padding-top: 0.8rem;
  font-size: 0.95rem;
}
.photo-placeholder .photo-soon {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff3df, #ffe4d6);
  border: 2px dashed var(--sun);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--ink-soft);
}
.photo-soon span { font-size: 1rem; font-weight: 700; text-align: center; line-height: 1.4; }

/* ---------- Form ---------- */
.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin: 0 0 1.5rem;
}
.card legend {
  font-size: 1.25rem; font-weight: 800;
  padding: 0 0.6rem;
  background: var(--cream);
  border-radius: 999px;
}

.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.req { color: var(--apple); }
.optional { color: var(--ink-soft); font-weight: 400; font-size: 0.9em; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fffdf9;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sun);
  box-shadow: 0 0 0 3px rgba(255, 197, 61, 0.35);
}
.field.invalid input, .field.invalid textarea { border-color: var(--apple); }
.field.invalid legend { color: var(--apple); }

.hint { font-size: 0.9rem; color: #8a6d1f; background: #fff6e0; border-radius: 10px; padding: 0.6rem 0.9rem; margin-top: 0.5rem; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.radio-list { display: flex; flex-direction: column; gap: 0.6rem; }
.radio-label {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 400;
}
.radio-label:hover { border-color: var(--sun); }
.radio-label input { margin-top: 0.25rem; accent-color: var(--apple); width: 1.1rem; height: 1.1rem; }

.check-label { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check-label input { margin-top: 0.25rem; accent-color: var(--apple); width: 1.15rem; height: 1.15rem; flex-shrink: 0; }

/* The hidden attribute must win over display rules above (e.g. .check-label) */
[hidden] { display: none !important; }

/* ---------- Class full / waitlist ---------- */
.full-badge {
  display: inline-block;
  background: var(--apple);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}
.radio-label.is-full { opacity: 0.6; cursor: not-allowed; background: #faf7f1; }
.radio-label.is-full:hover { border-color: var(--border); }
.class-card.is-full { opacity: 0.9; }
.class-card.is-full .class-cta { color: var(--ink-soft); }
#waitlist-block {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 2px dashed var(--sun);
  border-radius: 12px;
  background: #fffdf6;
}
#waitlist-block.invalid { outline: 2px solid var(--apple); outline-offset: 3px; border-radius: 8px; }
.waitlist-intro { margin: 0 0 0.7rem; }
#waitlist-details { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.8rem; }

/* Fee payment prompt shown right under the fee choice */
#regfee-paybox {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #fff8ef;
  border: 2px dashed var(--apple);
  border-radius: var(--radius);
}
#regfee-paybox p { margin: 0 0 0.75rem; }
#regfee-paybox p:last-child { margin-bottom: 0; }
#regfee-paybox .btn-pay { margin-bottom: 0.75rem; }
.venmo-qr {
  display: block;
  width: 160px; height: 160px;
  margin: 0.25rem auto 0.75rem;
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
#waitlist-block select {
  font: inherit;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

/* Packet + signature */
.notice {
  background: #fff6e0;
  border: 2px dashed var(--sun);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.packet-box {
  border: 2px dashed #d8c7b2;
  border-radius: 12px;
  background: #fffdf9;
  padding: 1.25rem;
  margin-bottom: 1.1rem;
  max-height: 16rem;
  overflow-y: auto;
}
.placeholder-text { color: var(--ink-soft); font-style: italic; }

#signature-pad {
  display: block;
  width: 100%;
  height: 200px;
  background: #fff;
  border: 2px dashed #b9a68f;
  border-radius: 12px;
  touch-action: none;          /* let the pad handle touch, not page scroll */
  cursor: crosshair;
  margin-bottom: 0.6rem;
}

/* Error summary + status panels */
.error-summary {
  background: #fdecea;
  border: 2px solid var(--apple);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.error-summary ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }

.status-panel {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  text-align: center;
}
.status-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.status-panel h3 { font-size: 1.5rem; }

.fine-print { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.75rem; }

/* ---------- Payment / contact / footer ---------- */
.owner-note {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: #f4f1ec;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  display: inline-block;
  text-align: left;
}
.owner-note code { background: #e8e2d8; padding: 0.1rem 0.4rem; border-radius: 6px; }

.email-link { font-weight: 700; color: var(--apple); font-size: 1.15rem; word-break: break-all; }

.footer { padding: 2rem 0; text-align: center; color: var(--ink-soft); font-size: 0.9rem; }
.footer-logo { width: 3.5rem; height: 3.5rem; border-radius: 50%; margin-bottom: 0.5rem; border: 2px solid var(--border); }

/* ---------- Tuition options ---------- */
.tuition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}
.tuition-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}
.tuition-card h3 { margin-top: 0; }
.tuition-highlight { border-color: var(--leaf); box-shadow: var(--shadow); }
.tuition-price { font-size: 2rem; font-weight: 800; margin: 0.5rem 0; color: var(--ink); }
.tuition-price span { font-size: 1rem; font-weight: 400; color: var(--ink-soft); }
.save-badge {
  position: absolute;
  top: -0.9rem;
  right: 1rem;
  background: var(--apple);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}
.tuition-card .btn { margin-top: 0.75rem; }
.pay-choice {
  border-top: 1px dashed var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}
.pay-choice p { margin: 0 0 0.75rem; }
.pay-choice .option-tag { margin-bottom: 0.15rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pay-choice .fine { color: var(--ink-soft); font-size: 0.95rem; }
#tuition-choice-field.invalid { outline: 2px solid var(--apple); outline-offset: 3px; border-radius: 8px; }
.fee-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
  margin: 1.5rem auto;
  max-width: 34rem;
  box-shadow: var(--shadow);
}
.fee-card .pay-choice:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.packet-doc {
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fffdf9;
  margin-bottom: 1rem;
  overflow: hidden;
}
.packet-doc details summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-size: 1.05rem;
  list-style: none;
}
.packet-doc details summary::-webkit-details-marker { display: none; }
.packet-doc details summary::before { content: "▸ "; color: var(--apple); font-weight: bold; }
.packet-doc details[open] summary::before { content: "▾ "; }
.packet-doc details summary:hover { background: #fff6ec; }
.hint-inline { font-weight: normal; color: var(--ink-soft); font-size: 0.9rem; }
.packet-text { padding: 0.2rem 1.1rem 1rem; font-size: 0.95rem; }
.packet-text p { margin: 0 0 0.8rem; }
.packet-text ul { margin: 0 0 0.8rem; padding-left: 1.3rem; }
.packet-text li { margin-bottom: 0.15rem; }
.packet-para { border-top: 1px dashed var(--border); padding-top: 0.8rem; margin-bottom: 0.4rem; }
.packet-para:first-of-type { border-top: none; padding-top: 0; }
.packet-para .field { margin-bottom: 0.4rem; }
.packet-initial { padding: 0.9rem 1.1rem; border-top: 1px dashed var(--border); }
.packet-initial > p:first-child { margin-top: 0; }
.packet-initial .check-label { display: flex; margin-bottom: 0.5rem; }
.packet-initial .check-label:last-child { margin-bottom: 0; }
.subhead { font-weight: 700; margin: 1.2rem 0 0.6rem; font-size: 1.02rem; }
.subhead2 { font-weight: 600; margin: 1rem 0 0.4rem; }
.field-label { display: block; font-weight: 600; margin-bottom: 0.45rem; }
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
#child_age[readonly] { background: #f7f3ec; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding: 3rem 1.25rem 2.75rem; border-radius: 0 0 1.75rem 1.75rem; }
  .hero-logo { width: 8.5rem; height: 8.5rem; }
  .class-grid { grid-template-columns: 1fr; }
  .tuition-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-grid-reverse .photo-card { order: -1; }
  .row { grid-template-columns: 1fr; }
  .card { padding: 1.25rem; }
  h2 { font-size: 1.6rem; }
  .section { padding: 2.5rem 0; }
}

/* ---------- Privacy policy page ---------- */
.hero-small { padding: 2.5rem 1.25rem 2rem; }
.policy-card h2 { margin-top: 1.75rem; }
.policy-card h2:first-child { margin-top: 0; }
.policy-list { margin: 0.5rem 0 0 1.25rem; }
.policy-list li { margin-bottom: 0.35rem; }
.center { text-align: center; }
.footer a { color: var(--ink-soft); }
