/* ==========================================================================
   Theodore's Academy — Static site stylesheet
   Rebuilt to closely match the original WordPress design:
   - Crumpled "paper texture" section bands (orange, teal, white, lime)
   - Orange (#e73900) headings, nav, and links
   - Calibri/Candara font stack (with a web fallback for Mac/Linux)
   - Framed photos with white borders
   - Bright lime-green top bar and footer

   Sections:
   1. Design tokens        6. Buttons
   2. Base / reset         7. Bands & sections
   3. Layout helpers       8. Cards / staff / form
   4. Top bar / header     9. Footer
   5. Hero                 10. Sub-pages + responsive
   ========================================================================== */

/* 1. DESIGN TOKENS -------------------------------------------------------- */
:root {
  /* Exact brand colors sampled from the live site */
  --orange:      #e73900;  /* primary — headings, nav, links, accents */
  --orange-deep: #c53000;  /* hover */
  --teal:        #1ebcae;  /* secondary band */
  --lime:        #b5c500;  /* top bar + footer */
  --lime-deep:   #9aa800;

  --ink:         #2b2b2b;  /* body text on light backgrounds */
  --muted:       #666666;
  --white:       #ffffff;
  --paper:       #f4f2ec;  /* base under the white paper texture */
  --border:      #e2ded3;

  /* Fonts: Calibri/Candara render on Windows (matches original exactly);
     Mac/Linux fall back to the loaded "Nunito Sans" web font. */
  --font: "Calibri", "Candara", "Segoe UI", "Nunito Sans", system-ui, Arial, sans-serif;

  --radius:   4px;      /* original uses very slight rounding */
  --shadow:   0 8px 24px rgba(0,0,0,0.12);
  --shadow-sm:0 3px 10px rgba(0,0,0,0.10);
  --container: 1180px;

  /* Paper texture images used as section backgrounds */
  --tex-white:  url("../img/tex-white.jpg");
  --tex-orange: url("../img/tex-orange.jpg");
  --tex-teal:   url("../img/tex-teal.jpg");
  --tex-green:  url("../img/tex-green.jpg");
}

/* 2. BASE / RESET --------------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-deep); text-decoration: underline; }

h1,h2,h3,h4 { font-family: var(--font); color: var(--orange); line-height: 1.15; margin: 0 0 0.4em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.05em; }
strong { font-weight: 700; }

/* 3. LAYOUT HELPERS ------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

.center { text-align: center; }
.lead { font-size: 1.12rem; }

/* Two-column media + text rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }

/* Framed photo — white border like the original */
.framed {
  border: 8px solid #fff;
  box-shadow: var(--shadow);
  width: 100%;
  border-radius: 2px;
}

/* 4. TOP BAR / HEADER ----------------------------------------------------- */
.topbar {
  background-color: var(--lime);
  /* 50% color veil over the paper texture to mute the crinkle */
  background-image: linear-gradient(rgba(181,197,0,0.5), rgba(181,197,0,0.5)), var(--tex-green);
  background-position: center; background-size: cover;
  color: #fff;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 9px; gap: 12px;
}
.topbar__phone { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; }
.topbar a { color: #fff; }
.topbar__fb {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--lime-deep);
  font-weight: 800; text-decoration: none;
}
.topbar__fb:hover { background: var(--orange); color: #fff; text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(244,242,236,0.5), rgba(244,242,236,0.5)), var(--tex-white);
  background-position: center; background-size: cover;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding-block: 14px;
}
.site-header__logo img { height: 78px; width: auto; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-weight: 700; color: var(--orange); font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.nav a:hover { color: var(--orange-deep); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 28px; height: 3px; background: var(--orange); border-radius: 3px; margin: 5px 0; }

/* 5. HERO ----------------------------------------------------------------- */
.hero-img { width: 100%; }
.hero-img img { width: 100%; height: auto; display: block; }

/* Optional overlay caption band under hero could go here if needed */

/* 6. BUTTONS -------------------------------------------------------------- */
.btn {
  display: inline-block; font-weight: 700; cursor: pointer;
  padding: 13px 30px; border-radius: 2px; border: 2px solid transparent;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.9rem;
  transition: background .18s, color .18s, transform .15s; font-family: var(--font);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
/* Solid orange (primary CTA / submit) */
.btn--solid { background: var(--orange); color: #fff; }
.btn--solid:hover { background: var(--orange-deep); color: #fff; text-decoration: none; transform: translateY(-1px); }
/* White button with orange text — used on colored bands and light sections */
.btn--white { background: #fff; color: var(--orange); border-color: #fff; }
.btn--white:hover { background: var(--orange); color: #fff; text-decoration: none; }
/* Outline on colored band */
.btn--outline { background: transparent; color: #fff; border-color: #fff; }
.btn--outline:hover { background: #fff; color: var(--orange); text-decoration: none; }

/* 7. BANDS & SECTIONS ----------------------------------------------------- */
.band { padding: clamp(46px, 7vw, 84px) 0; background-position: center; background-size: cover; }

/* Each band blends a 50% color veil over its paper texture to soften the crinkle */
.band--white  { background-color: var(--paper);  background-image: linear-gradient(rgba(244,242,236,0.5), rgba(244,242,236,0.5)), var(--tex-white);  color: var(--ink); }
.band--orange { background-color: var(--orange);  background-image: linear-gradient(rgba(231,57,0,0.5), rgba(231,57,0,0.5)), var(--tex-orange); color: #fff; }
.band--teal   { background-color: var(--teal);   background-image: linear-gradient(rgba(30,188,174,0.5), rgba(30,188,174,0.5)), var(--tex-teal);  color: #fff; }

/* On colored bands, headings and plain links turn white */
.band--orange h1, .band--orange h2, .band--orange h3,
.band--teal h1, .band--teal h2, .band--teal h3 { color: #fff; }
.band--orange a:not(.btn), .band--teal a:not(.btn) { color: #fff; text-decoration: underline; }

/* Buttons keep their own colors on colored bands (higher specificity) */
.band--orange a.btn--white, .band--teal a.btn--white { color: var(--orange); }
.band--orange a.btn--white:hover, .band--teal a.btn--white:hover { color: #fff; }
.band--orange a.btn--outline, .band--teal a.btn--outline { color: #fff; }
.band--orange a.btn--solid, .band--teal a.btn--solid { color: #fff; }

/* Section heading (orange on white, white on bands) */
.section-title { margin-bottom: 0.5em; }

/* Info callouts on the pricing section */
.disc { margin: 0 0 1.05em; }
.disc em { color: var(--muted); }

/* Hours block */
.hours { margin-top: 8px; }
.hours h3 { margin-bottom: 2px; }

/* 8. CARDS / STAFF / FORM ------------------------------------------------- */
/* News cards (white cards on the teal band) */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 32px; }
.news-card {
  background: #fff; border: 6px solid #fff; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .15s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card a.news-card__link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.news-card__img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: #e9e9e9; }
.news-card__placeholder { aspect-ratio: 16/10; background: #e0e0e0; }
.news-card__body { padding: 14px 16px 18px; }
.news-card__title { color: var(--orange); font-weight: 700; font-size: 1.05rem; line-height: 1.2; margin: 0 0 4px; }
.news-card__date { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Staff */
.staff { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; margin-top: 20px; }
.staff__photo { width: 300px; max-width: 40vw; }
.staff__name { margin-top: 14px; text-align: center; }
.staff__name h3 { color: #fff; margin-bottom: 0; }
.staff__name .role { color: #fff; font-style: italic; }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: start; margin-top: 24px; }
.form { }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 0.95rem; color: var(--ink); }
.field .req { color: var(--orange); }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--ink);
  border: 1px solid #cfcabc; border-radius: 2px; background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231,57,0,0.12); }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

.form-status { margin-top: 14px; padding: 12px 16px; border-radius: 2px; font-weight: 700; display: none; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: #e7f4dc; color: #3f5e1a; }
.form-status.is-error { background: #fde4d6; color: #a4400a; }

.contact-details p { margin-bottom: 0.35em; }
.map-embed { border: 0; width: 100%; height: 300px; margin-top: 16px; box-shadow: var(--shadow-sm); }

/* Responsive video embeds */
.video { position: relative; width: 100%; aspect-ratio: 16/9; box-shadow: var(--shadow); border: 6px solid #fff; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 9. FOOTER --------------------------------------------------------------- */
.site-footer { background-color: var(--lime); background-image: linear-gradient(rgba(181,197,0,0.5), rgba(181,197,0,0.5)), var(--tex-green); background-position: center; background-size: cover; color: #fff; padding: 46px 0 26px; text-align: center; }
.site-footer img.foot-logo { height: 92px; width: auto; margin: 0 auto 18px; }
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; text-align: left; margin-top: 10px; }
.site-footer h4 { color: #fff; text-transform: uppercase; letter-spacing: 0.05em; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer__bottom { margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.35); font-size: 0.85rem; }

/* 10. SUB-PAGES ----------------------------------------------------------- */
.page-hero { background-color: var(--orange); background-image: linear-gradient(rgba(231,57,0,0.5), rgba(231,57,0,0.5)), var(--tex-orange); background-position: center; background-size: cover; color: #fff; text-align: center; padding: clamp(46px,8vw,84px) 0; }
.page-hero h1 { color: #fff; }
.page-hero .crumbs { color: rgba(255,255,255,0.9); font-size: 0.9rem; }
.page-hero .crumbs a { color: #fff; }

.article { max-width: 820px; margin-inline: auto; }
.article img { margin: 8px 0 26px; border: 8px solid #fff; box-shadow: var(--shadow-sm); }
.article h3 { color: var(--orange); margin-top: 28px; }
.article ul { padding-left: 20px; } .article li { margin-bottom: 8px; }
.back-link { display: inline-block; margin-top: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* Program age tags */
.tag { display: inline-block; color: #fff; font-weight: 700; font-size: 0.85rem; padding: 5px 16px; border-radius: 2px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.tag--orange { background: var(--orange); } .tag--teal { background: var(--teal); } .tag--lime { background: var(--lime-deep); }

/* RESPONSIVE --------------------------------------------------------------*/
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 2px solid var(--orange); padding: 10px 24px 18px; gap: 2px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 4px; border-bottom: 1px solid var(--border); }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .staff { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .staff__photo { max-width: 70vw; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .topbar .container { flex-direction: row; }
}
@media (max-width: 520px) {
  .news-grid { grid-template-columns: 1fr; }
}
