/* ==========================================================================
   TileTable Teacher Program. Below the fold styles.
   Critical above the fold CSS (tokens, header, hero, tile band) is inlined
   in index.html. This file continues from there and reuses those variables.
   ========================================================================== */

/* ---------- shared section furniture ---------- */
.kicker{
  display:block;font-size:12px;font-weight:700;letter-spacing:.17em;
  text-transform:uppercase;color:var(--red);margin-bottom:14px;
}
.kicker--light{color:#F0C36A}

.sec-head{margin-bottom:44px}
.sec-head h2{font-size:clamp(1.85rem,5.6vw,2.9rem);max-width:22ch}

.reveal{opacity:0;transform:translateY(22px)}
.reveal.is-in{opacity:1;transform:none;
  transition:opacity .7s cubic-bezier(.2,.7,.3,1),transform .7s cubic-bezier(.2,.7,.3,1)}
.no-motion .reveal{opacity:1;transform:none}

/* ==========================================================================
   THE PROBLEM
   ========================================================================== */
.prob{padding:82px 0 78px}
.prob__grid{
  display:grid;grid-template-columns:1.25fr .85fr;gap:56px;align-items:center;
}
.prob__txt h2{font-size:clamp(1.9rem,5.8vw,3.05rem);margin-bottom:24px}
.prob__txt p{color:var(--ink-soft);font-size:clamp(1rem,3.6vw,1.09rem);max-width:52ch}
.prob__txt p + p{margin-top:18px}
.prob__txt p:last-child{
  color:var(--ink);font-weight:500;
  border-left:3px solid var(--red);padding-left:18px;margin-top:26px;
}

.prob__art{position:relative}
.prob__art picture{display:block}
.prob__art img{
  width:100%;height:auto;border-radius:var(--r-xl);
  background:var(--cream-deep);
  box-shadow:0 30px 50px -34px rgba(36,25,31,.5);
}
/* Fallback: hand drawn tile illustration if the PNG is not in /assets yet. */
.prob__art.is-fallback img{display:none}
.prob__art.is-fallback::before{
  content:"";display:block;aspect-ratio:1/1;border-radius:var(--r-xl);
  background:var(--cream-deep) url("/assets/tiles-fallback.svg?v=4") center/150% auto no-repeat;
  box-shadow:0 30px 50px -34px rgba(36,25,31,.5);
}

/* ==========================================================================
   WHAT YOU GET
   ========================================================================== */
.gets{
  padding:78px 0 88px;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(30,107,69,.07) 0%, rgba(30,107,69,0) 70%),
    var(--cream);
  border-top:1px solid var(--rule);
}
/* Six cards, one uniform grid. grid-auto-rows:1fr makes every row the same
   height, so all six are identical in size regardless of how much text each
   one carries. */
.cards{list-style:none;margin:0;padding:0;display:grid;gap:22px;
  grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr}
.card{
  position:relative;background:var(--card);border:1px solid var(--rule);
  border-radius:var(--r-lg);padding:30px 30px 32px;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.card:hover{transform:translateY(-4px);border-color:#C8B896;
  box-shadow:0 22px 34px -26px rgba(36,25,31,.55)}

.card__ic{
  display:inline-flex;align-items:center;justify-content:center;
  width:46px;height:46px;border-radius:14px;margin-bottom:18px;
  background:var(--green-soft);color:var(--green);border:1px solid #CFE0D4;
}
.card__ic svg{width:23px;height:23px}
.card h3{font-size:1.24rem;letter-spacing:-.01em;margin-bottom:10px}
.card p{color:var(--ink-soft);font-size:1rem;line-height:1.55}

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.how{
  padding:84px 0 92px;background:var(--green);color:var(--cream);
  background-image:radial-gradient(80% 60% at 6% 0%, rgba(240,195,106,.13) 0%, rgba(240,195,106,0) 60%);
}
.how h2{color:var(--cream)}
.steps{
  list-style:none;margin:0;padding:0;display:grid;gap:18px;
  grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:1fr;
}
.step{
  position:relative;padding:24px 20px 26px;border-radius:var(--r-md);
  border:1px solid rgba(247,241,227,.22);
}
.step h3{color:var(--cream);font-size:1.03rem;margin:14px 0 8px;line-height:1.2}
.step p{color:rgba(247,241,227,.82);font-size:.94rem;line-height:1.5}
.step__n{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:11px;
  font-family:var(--display);font-size:1.05rem;
  background:rgba(247,241,227,.14);color:var(--cream);
}

/* ==========================================================================
   CLOSING + FORM
   ========================================================================== */
.close{padding:86px 0 96px;border-top:1px solid var(--rule)}
.close__grid{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:start}

.close__fig{margin:0 0 30px}
.close__fig img{
  width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;
  border-radius:var(--r-xl);background:var(--cream-deep);
  box-shadow:0 34px 54px -36px rgba(36,25,31,.55);
}
.close__fig.is-fallback img{display:none}
.close__fig.is-fallback::before{
  content:"";display:block;aspect-ratio:4/3;border-radius:var(--r-xl);
  background:
    radial-gradient(70% 90% at 78% 18%, rgba(240,195,106,.5) 0%, rgba(240,195,106,0) 62%),
    linear-gradient(160deg,#1E6B45 0%,#154E32 100%);
  box-shadow:0 34px 54px -36px rgba(36,25,31,.55);
}
.close__line{font-size:clamp(1.95rem,6vw,3.15rem)}
.close__sub{margin-top:20px;color:var(--ink-soft);font-size:1.06rem;max-width:44ch}

/* ---------- form shell ---------- */
.fw{
  position:sticky;top:calc(var(--head-h) + 20px);
  background:var(--card);border:1px solid var(--rule);border-radius:var(--r-xl);
  padding:34px 32px 36px;box-shadow:0 30px 60px -40px rgba(36,25,31,.6);
}
.form__h{font-size:1.6rem;margin-bottom:6px}
.form__sub{color:var(--ink-soft);font-size:.97rem;margin-bottom:26px}

.f{margin-bottom:20px;border:0;padding:0;min-width:0}
.f label,.f legend{
  display:block;font-size:.9rem;font-weight:600;color:var(--ink);
  margin-bottom:8px;padding:0;
}
.req{color:var(--red)}
.opt{font-weight:400;color:var(--ink-soft);font-size:.82rem}

.f input[type="text"],.f input[type="email"],.f input[type="tel"],.f textarea{
  width:100%;font-family:var(--sans);font-size:16px;color:var(--ink);
  background:var(--cream);border:1.5px solid var(--rule);border-radius:var(--r-sm);
  padding:13px 14px;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.f textarea{resize:vertical;min-height:62px;line-height:1.5}
.f input::placeholder{color:#9C8C80}
.f input:hover,.f textarea:hover{border-color:#C8B896}
.f input:focus,.f textarea:focus{
  outline:none;background:#fff;border-color:var(--green);
  box-shadow:0 0 0 3px rgba(30,107,69,.16);
}
.f input:focus-visible,.f textarea:focus-visible{outline:none}
.f.has-err input,.f.has-err textarea{
  border-color:var(--red);background:#FDF3F1;box-shadow:0 0 0 3px rgba(181,52,42,.12);
}
.err{margin-top:7px;font-size:.85rem;font-weight:500;color:var(--red-dark)}

/* ---------- chips ---------- */
.fs legend{margin-bottom:11px}
.chips{display:flex;flex-wrap:wrap;gap:9px}
.chip{margin:0;cursor:pointer}
.chip input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.chip span{
  display:inline-flex;align-items:center;gap:7px;
  font-size:.92rem;font-weight:500;color:var(--ink);
  background:var(--cream);border:1.5px solid var(--rule);border-radius:999px;
  padding:10px 16px;transition:all .16s ease;user-select:none;
}
.chip span::before{
  content:"";width:7px;height:7px;border-radius:50%;
  background:transparent;box-shadow:inset 0 0 0 1.5px #BFAF95;transition:all .16s ease;
}
.chip:hover span{border-color:var(--green);color:var(--green)}
.chip input:checked + span{
  background:var(--green);border-color:var(--green);color:var(--cream);
}
.chip input:checked + span::before{background:var(--cream);box-shadow:none}
.chip input:focus-visible + span{outline:3px solid var(--red);outline-offset:2px}

/* ---------- radios ---------- */
.radios{display:flex;flex-direction:column;gap:8px}
.radio{display:block;margin:0;cursor:pointer}
.radio input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.radio span{
  display:flex;align-items:center;gap:11px;font-size:.95rem;
  background:var(--cream);border:1.5px solid var(--rule);border-radius:var(--r-sm);
  padding:13px 15px;transition:all .16s ease;
}
.radio span::before{
  content:"";flex:0 0 auto;width:17px;height:17px;border-radius:50%;
  border:1.5px solid #BFAF95;background:#fff;transition:all .16s ease;
}
.radio:hover span{border-color:var(--green)}
.radio input:checked + span{
  border-color:var(--green);background:var(--green-soft);font-weight:500;color:var(--green-dark);
}
.radio input:checked + span::before{
  border-color:var(--green);border-width:5px;background:#fff;
}
.radio input:focus-visible + span{outline:3px solid var(--red);outline-offset:2px}

/* ---------- honeypot ---------- */
.pot{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------- submit ---------- */
#submit-btn{margin-top:6px}
.spin{
  display:none;width:17px;height:17px;border-radius:50%;
  border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;
  animation:spin .7s linear infinite;
}
.is-sending .spin{display:block}
@keyframes spin{to{transform:rotate(360deg)}}

.form__foot{margin-top:16px;font-size:.85rem;line-height:1.5;color:var(--ink-soft)}
.form__err{
  margin-top:16px;font-size:.92rem;line-height:1.5;color:var(--red-dark);
  background:#FDF3F1;border:1px solid #E9C4BF;border-radius:var(--r-sm);padding:13px 15px;
}
.form__err a{color:var(--red-dark);font-weight:600}

/* ---------- success card ---------- */
.done{text-align:center;padding:16px 4px 10px;animation:rise .5s cubic-bezier(.2,.7,.3,1) both}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.done__ic{
  width:62px;height:62px;margin:0 auto 22px;border-radius:50%;
  background:var(--green-soft);border:1.5px solid #BBD6C3;
  display:flex;align-items:center;justify-content:center;color:var(--green);
}
.done__ic svg{width:30px;height:30px}
.done h3{font-size:1.75rem;margin-bottom:14px}
.done p{color:var(--ink-soft);font-size:1rem;line-height:1.62;max-width:38ch;margin:0 auto}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width:1020px){
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .close__grid{gap:44px}
}

@media (max-width:860px){
  .prob{padding:62px 0 58px}
  .prob__grid{grid-template-columns:1fr;gap:36px}
  .prob__art{max-width:400px}
  /* One column, so equal height rows would only pad every card out to the
     longest one. Back to auto, which keeps the mobile scroll short. */
  .cards{grid-template-columns:1fr;grid-auto-rows:auto;gap:16px}
  .card{padding:26px 24px 28px}
  .steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gets{padding:62px 0 66px}
  .how{padding:64px 0 70px}
  .close{padding:66px 0 74px}
  .close__grid{grid-template-columns:1fr}
  .fw{position:static;padding:28px 22px 30px}
  .sec-head{margin-bottom:32px}
}

@media (max-width:600px){
  .steps{grid-template-columns:1fr;grid-auto-rows:auto;gap:12px}
  .step{padding:20px 18px 22px}
  .close__fig{margin-bottom:24px}
  .radios{gap:7px}
  .form__h{font-size:1.42rem}
}

@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none}
  .card:hover{transform:none}
  .spin{animation:none}
}
