/* JamLand for Teachers. Sits on top of /css/site.css, the main page's
   evening theme, and only adds what this page needs. New classes start
   with t- so nothing here collides with the main page's own (.plans, .plan,
   .duo, .teachers). The one bright thing on the page is the dashboard, cream
   in a plain browser frame, like a lit window on dark wood. Orange is only
   for the main buttons and the featured plan's ring; gold only for JamLand
   Pro, as on the main page. Like the main page, it also comes by day for
   anybody whose device is set to light (<html data-light>): site.css swaps
   the shared colors, and the end of this file does the rest. */

:root {
  /* Outlines for ghost buttons and the step numbers: 3.6:1 on --bg, 3.3:1
     on --surface, 3.0:1 on --surface-2. --line alone is too faint to find. */
  --edge: #806856;
}
@media (prefers-contrast: more) {
  :root { --line: var(--edge); --muted: #e0d0bd; }
  .bar, .bar[data-scrolled] { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- shared pieces ---------- */

.button.ghost { box-shadow: inset 0 0 0 2px var(--edge); }
.button.ghost:hover { box-shadow: inset 0 0 0 2px var(--muted); }
/* The wordmark keeps its shape when the bar is tight on a phone. */
.bar .brand { flex: none; }
.bar .brand .wordmark { width: auto; }
/* This page's four links fit the bar down to tablet width; the main page's
   longer list needs 960px, which is where site.css hides it. Below 760px
   the footer lists Pricing and Questions. */
@media (min-width: 761px) and (max-width: 960px) {
  .bar-nav { display: flex; }
  .bar-nav a { padding: 10px 12px; }
  .bar .button.small { margin-left: 0; }
}
.t-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.section-head > p { max-width: 64ch; }
/* Keeps an em dash with the word before it, so no line starts with one.
   Only wraps words already in the copy; nothing is added. */
.nowrap { white-space: nowrap; }
/* No amber here: in the app, amber means a goal was met. */
.hero-eyebrow { color: var(--muted); }
summary:hover { color: var(--ink); }
summary::after { color: var(--muted); }
details p a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
/* The privacy link under an answer: a full 44px to tap. */
details p .text-link { margin-top: -10px; }

/* ---------- hero ---------- */

.t-hero { padding-bottom: clamp(48px, 6vw, 80px); }
.t-hero-copy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.t-hero h1 { max-width: none; }
.t-hero .lede { max-width: 46ch; }
/* Two columns only where the right one fits both buttons side by side
   (about 436px); below that the hero is one column. */
@media (max-width: 1160px) {
  .t-hero-copy { grid-template-columns: 1fr; gap: 24px; max-width: 760px; }
  .t-hero h1 { max-width: 16ch; }
  .t-hero .lede { max-width: 58ch; }
}
.t-under { margin-top: 14px; color: var(--muted); font-size: 15px; text-wrap: pretty; }

/* The lit window: the dashboard on the right, the student's phone
   overlapping its lower-left corner and hanging a little below it. */
.t-stage { position: relative; margin-top: clamp(44px, 6vw, 72px); padding-bottom: 32px; }
.t-browser {
  margin-left: 13%; border-radius: 16px; overflow: hidden; background: #efe2cc;
  box-shadow: 0 0 0 1px rgba(255, 230, 200, 0.14), 0 0 120px -20px rgba(255, 210, 122, 0.22), 0 50px 100px -40px rgba(0, 0, 0, 0.9);
}
.t-browser-bar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; background: var(--surface-2); }
.t-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #5a4636; }
.t-browser-url { margin-left: 14px; flex: 0 1 340px; height: 20px; border-radius: 999px; background: rgba(255, 230, 200, 0.08); }
.t-browser img { width: 100%; }
.t-stage-phone { position: absolute; left: 0; bottom: 0; width: min(250px, 26%); }
@media (max-width: 860px) {
  .t-stage { padding-bottom: 40px; }
  .t-stage-phone { width: 22%; }
}
@media (max-width: 600px) {
  /* The phone-width capture is tall, so the phone sits over its lower
     right, where the roster's rows run on, and hangs below the window. */
  .t-browser { margin-left: 0; }
  .t-stage { padding-bottom: 156px; }
  .t-stage-phone { left: auto; right: 8px; width: 42%; }
}
@media (max-width: 480px) {
  .t-browser-url { display: none; }
}

/* ---------- why it helps ----------
   Three reasons side by side, not numbered: they are not a sequence. A rule
   above each, so they read as columns of one thought rather than cards. */

.t-why { padding-top: clamp(72px, 9vw, 128px); }
.t-benefits { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.t-benefits li { padding-top: 22px; border-top: 2px solid var(--line); }
.t-benefits h3 { font-size: clamp(24px, 2.2vw, 28px); }
.t-benefits p { margin-top: 10px; color: var(--muted); font-size: 17px; max-width: 40ch; }
@media (max-width: 760px) {
  .t-benefits { grid-template-columns: 1fr; gap: 28px; }
  .t-benefits p { max-width: 52ch; }
}

/* ---------- how it works ---------- */

.t-steps { list-style: none; counter-reset: step; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.t-steps li { counter-increment: step; position: relative; padding: 24px 22px 26px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.t-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px;
  border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--edge); font-weight: 800; font-size: 18px;
}
.t-steps h3 { font-size: 24px; }
.t-steps p { margin-top: 10px; color: var(--muted); font-size: 17px; }
@media (max-width: 1000px) { .t-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .t-steps { grid-template-columns: 1fr; } }

.t-shots { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.t-window { border-radius: 16px; overflow: hidden; background: #efe2cc; box-shadow: 0 0 0 1px rgba(255, 230, 200, 0.14), 0 40px 80px -36px rgba(0, 0, 0, 0.85); }
.t-window img { width: 100%; }
@media (max-width: 700px) { .t-shots { grid-template-columns: 1fr; } }

/* ---------- the student side ---------- */

.t-phones { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(2, minmax(0, 250px)) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: center; }
.t-phones .phone img { width: 100%; }
.t-crop {
  border-radius: 24px; overflow: hidden;
  /* Cut above the session's last row, so the card fades out rather than
     ending in a hard edge. */
  -webkit-mask-image: linear-gradient(#000 94%, transparent);
  mask-image: linear-gradient(#000 94%, transparent);
}
.t-crop img { width: 100%; }
.t-more { margin-top: 28px; }
/* Below about 1000px a third column would shrink the session picture until
   its words can't be read, so it takes its own row under the two phones. */
@media (max-width: 1000px) {
  .t-phones { grid-template-columns: repeat(2, minmax(0, 250px)); align-items: start; }
  .t-detail { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 760px) {
  .t-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-detail { max-width: 480px; justify-self: center; }
}

/* ---------- panels: the dashboard and teams ---------- */

.t-panel { border-radius: 28px; padding: clamp(24px, 3.5vw, 40px); background: linear-gradient(160deg, #2a1d15, #1d140f); box-shadow: inset 0 0 0 1px var(--line); }
.t-panel p { color: var(--muted); max-width: 52ch; }

/* The student's page beside the three things it is for. */
.t-student { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.t-student-phone { width: 100%; border-radius: 30px; border-width: 6px; }
.t-checkins { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.t-checkins li { padding: 22px 0; border-top: 1px solid var(--line); }
.t-checkins li:first-child { border-top: 0; padding-top: 0; }
.t-checkins li:last-child { padding-bottom: 0; }
.t-checkins h3 { font-size: clamp(24px, 2.2vw, 28px); }
.t-checkins p { margin-top: 8px; font-size: 17px; }
@media (max-width: 640px) {
  .t-student { grid-template-columns: 1fr; }
  .t-student-phone { width: min(240px, 80%); margin: 0 auto 8px; }
}

/* Teams: the heading on the left, what it means on the right. */
.t-team { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 64px); align-items: start; }
.t-team h2 { font-size: clamp(30px, 3.4vw, 44px); max-width: 16ch; }
.t-team p + p { margin-top: 14px; }
@media (max-width: 860px) { .t-team { grid-template-columns: 1fr; } }

/* ---------- pricing ----------
   The old white teacher site's layout, in this page's own colors: the
   heading with the Monthly / Yearly switch on its right, then one card per
   plan (name, who it's for, price, billing line, button, then what's in it).
   Four across on a wide screen, two by two on a tablet, one column on a
   phone. */

.t-pricing-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 32px; }
/* The heading keeps at least 520px beside the switch (so the two sit side
   by side from about 900px); with less room the switch drops under it, on
   the left. */
.t-pricing-head .section-head { flex: 1 1 520px; max-width: 760px; }
.t-period { display: none; }
.js .t-period { display: inline-flex; }
/* --edge, not --line: the switch's outline has to be findable (3.0:1 on
   --surface-2). */
.toggle.t-period { box-shadow: inset 0 0 0 1px var(--edge); }
.t-period button { padding: 0 18px; white-space: nowrap; }
.t-period button[aria-checked="false"]:hover { color: var(--ink); }

.t-plans { margin-top: 40px; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.t-plan { display: flex; flex-direction: column; padding: 28px 22px 26px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
/* The plan most teachers want: the orange ring and the one filled button. */
.t-plan.featured { box-shadow: inset 0 0 0 2px var(--orange), 0 30px 60px -36px rgba(232, 117, 74, 0.6); }
.t-plan h3 { font-size: 28px; }
.t-blurb { margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.4; text-wrap: pretty; }
/* The amount, "/month" and, on Yearly, the full monthly price crossed out,
   always on one line. The amount is sized to the line's own width (cqi),
   so "$82.50 /month $99" fits four across at 1100px and on a 320px phone.
   The line is the container, not the card: a card that is a container
   can't be a subgrid. Browsers without cqi units (iOS 15 and earlier)
   skip the clamp and use the plain 36px before it, which also fits. */
.t-price { container-type: inline-size; display: flex; align-items: baseline; gap: 5px; margin-top: 20px; white-space: nowrap; color: var(--muted); font-size: 16px; line-height: 1; }
.t-price strong { color: var(--ink); font-size: 36px; font-size: clamp(32px, 18cqi, 44px); line-height: 1; }
.t-price s { margin-left: 4px; text-decoration-thickness: 2px; }
.t-plans[data-period-current="monthly"] .t-price [data-yearly-only] { display: none; }
.t-terms { display: grid; margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.4; text-wrap: pretty; }
/* The monthly and yearly lines share one spot, sized to the longer, and the
   other period's is hidden (from screen readers too), so the buttons and
   lists below never jump when the period changes. */
.t-terms > span { grid-area: 1 / 1; }
.t-plans[data-period-current="yearly"] .t-terms > [data-monthly-only],
.t-plans[data-period-current="monthly"] .t-terms > [data-yearly-only] { visibility: hidden; }
.t-plan .button { width: 100%; margin-top: 22px; }
.t-checks { list-style: none; margin: 24px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.t-checks li { position: relative; padding-left: 26px; font-size: 16px; line-height: 1.4; }
/* A pixel check mark in the muted text color (8.4:1 on the card). Not
   amber: on this page amber is kept off the plans, and gold means Pro. */
.t-checks li::before {
  content: ""; position: absolute; left: 0; top: 0.32em; width: 14px; height: 12px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath d='M6 0h1v2H6zM5 1h1v2H5zM4 2h1v2H4zM3 3h1v2H3zM2 4h1v2H2zM1 3h1v2H1zM0 2h1v2H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cpath d='M6 0h1v2H6zM5 1h1v2H5zM4 2h1v2H4zM3 3h1v2H3zM2 4h1v2H2zM1 3h1v2H1zM0 2h1v2H0z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Side by side, each part of a card lines up with the same part of the
   cards beside it (a blurb on two lines pushes all four prices down
   together), so the prices and buttons sit level and the cards in a row
   are the same height. */
@media (min-width: 601px) {
  @supports (grid-template-rows: subgrid) {
    .t-plan { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
  }
  @supports not (grid-template-rows: subgrid) {
    .t-blurb { min-height: 2.8em; }
    .t-terms { min-height: 2.8em; }
  }
}
/* Where four cards would be too narrow for "$82.50 /month $99", two by two. */
@media (max-width: 1099px) { .t-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* On a phone, teach.js puts the switch between the Free card and the paid
   ones, as a row of the plan list. */
@media (max-width: 600px) {
  .t-plans { grid-template-columns: 1fr; margin-top: 32px; }
  .t-plans > .t-period-wrap { margin: 8px 0; justify-self: start; }
}

.t-notes { margin-top: 22px; display: grid; gap: 8px; max-width: 72ch; }
.t-notes p { color: var(--muted); font-size: 16px; }

.t-pro {
  margin-top: 32px; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(22px, 3.5vw, 36px); border-radius: 26px; background: linear-gradient(160deg, #2a1d15, #1d140f); box-shadow: inset 0 0 0 1px var(--line);
}
.t-pro h3 { font-size: clamp(24px, 2.4vw, 30px); }
/* Gold is JamLand Pro's color across the site (site.css): 9.3:1 or more here. */
.t-pro h3 span { display: block; color: var(--gold); }
.t-pro p { margin-top: 12px; color: var(--muted); max-width: 64ch; }
@media (max-width: 640px) {
  .t-pro { grid-template-columns: 1fr; }
  .t-pro img { max-width: 260px; }
}

/* ---------- closing: the teacher waitlist ---------- */

/* The same night village as site.css, as a lossless WebP (36 KB, not 128).
   By day the light version at the end of this file shows the daytime
   village instead, also as a lossless WebP. */
.closing-art { background-image: url("/teach/img/village-night.webp"); }
/* A longer line than the main page's, so a smaller size keeps it to a few
   lines and the form in view. */
.t-closing .closing-inner { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(56px, 8vw, 104px); }
.t-closing .closing-inner h2 { font-size: clamp(36px, 5vw, 64px); max-width: 18ch; }
.t-closing .closing-inner > .t-under { margin-top: 18px; font-size: 17px; }

/* ---------- the light version: the page by day ----------
   For anybody whose device is set to light, as on the app's page. site.css
   already turns the shared colors to its cream, brown ink and ember (and
   its own values win over the evening Increase Contrast ones at the top
   of this file, being more specific); this covers what this page draws
   in colors of its own. The screenshots don't change: the dashboard and the
   plan screens are cream already, and the phones keep their dark screens
   and bezels, like real phones lying on paper. */
@media (prefers-color-scheme: light) {
  /* Outlines for ghost buttons, the step numbers and the period switch:
     the field edge from site.css, 3.0:1 on --bg, 3.3:1 on --surface-2,
     3.7:1 on --surface. With Increase Contrast site.css deepens it to
     5.6:1 on --bg, and these follow. */
  :root[data-light] { --edge: var(--field-edge); }

  /* The dashboard's window: a frame and a soft brown shadow, as the main
     page gives its pictures by day, in place of the lamplit glow. The bar
     is paper with a hairline under it, since the screenshot below is
     cream too. */
  [data-light] .t-browser { box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(74, 48, 30, 0.5); }
  [data-light] .t-browser-bar { box-shadow: inset 0 -1px 0 var(--line); }
  [data-light] .t-browser-bar i { background: var(--line); }
  [data-light] .t-browser-url { background: rgba(42, 30, 22, 0.07); }
  [data-light] .t-window { box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(74, 48, 30, 0.45); }
  /* The session picture stays dark, like the phones. Faded into cream its
     foot turned a muddy brown, so by day it ends at its own rounded edge,
     just under the buttons, and sits on a shadow. */
  [data-light] .t-crop {
    -webkit-mask-image: none; mask-image: none;
    box-shadow: 0 30px 60px -24px rgba(74, 48, 30, 0.5);
  }

  /* The dashboard, teams and Pro panels are paper, like the main page's
     stacked cards by day. */
  [data-light] .t-panel,
  [data-light] .t-pro { background: linear-gradient(160deg, var(--surface), var(--surface-2)); }

  /* Pro's gold, deep enough for words on paper: 5.9:1 on --surface,
     5.2:1 on --surface-2 (site.css's Founder gold by day). */
  [data-light] .t-pro h3 span { color: var(--gold-light); }

  /* The closing: site.css turns it to the daytime village by day, but
     from its 148 KB PNG. This is the same picture, pixel for pixel, as a
     lossless WebP (35 KB), the way the night one above is. site.css still
     sets where it sits and its cream clearing, so the contrast it measured
     holds. */
  [data-light] .closing-art { background-image: url("/teach/img/village-day.webp"); }

  /* The featured plan keeps its orange ring and glow. The glow is the
     buttons' own, which site.css keeps by day too; the ring (2.8:1 on its
     card) only repeats what the filled button in it already says. */
}

/* Increase Contrast, by day: the featured plan's ring turns the deeper
   ember (8.6:1 on its card), so it still stands out once site.css has
   darkened the other cards' frames (6.8:1). */
@media (prefers-color-scheme: light) and (prefers-contrast: more) {
  [data-light] .t-plan.featured { box-shadow: inset 0 0 0 2px var(--highlight), 0 30px 60px -36px rgba(232, 117, 74, 0.6); }
}
