/* EduSyl BD page CSS: only what sits inside a visual or the kit lacks. Tokens, grid, buttons,
   nav, sections and footer come from system.css and layout.css. */

/* brand navy for the dark band and the footer (the logo's own navy, not near-black) */
.band-navy { --p-inv-bg: #16223f; --p-inv-surface: #1f2d50; --p-inv-muted: #b4bccf; }
.band-navy.ground-inverse { --bg: #16223f; --surface: #1f2d50; --muted: #b4bccf; }

/* skip link: first child of the header's .wrap, hidden until focused */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; z-index: 20; top: 12px; left: var(--gut); padding: var(--s-2) var(--s-3);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }

/* the logo: the client's mark beside the name, "BD" in the logo's orange as on the mark */
.brand img { height: 32px; width: auto; }
.brand span { font-weight: 600; letter-spacing: -0.02em; }
.brand b { font-weight: 600; color: #c46c08; }
.brand--inv img { background: #fff; border-radius: 6px; padding: 3px 4px; height: 34px; box-sizing: content-box; }
.brand--inv b { color: var(--p-accent); }

/* ------------------------------------------------------------------ hero: the shelf on the stage */
/* the head row as layout.css lays it out for a product on the stage (h1 left, lead and buttons right) */
@media (min-width: 1024px) {
  .hero--shelf .hero__head { grid-template-rows: auto auto; row-gap: var(--s-5); }
  .hero--shelf .hero__head > :first-child { display: contents; }
  .hero--shelf .hero__head h1 { grid-column: 1 / span 7; grid-row: 1 / span 2; align-self: end; margin: 0; }
  .hero--shelf .hero__head .hero__lead { grid-column: 9 / -1; grid-row: 1; align-self: end; margin: 0; max-width: none; }
  .hero--shelf .hero__head > .btn-row { grid-column: 9 / -1; grid-row: 2; justify-content: flex-start; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero--shelf .hero__head h1 { grid-column: 1 / span 6; }
  .hero--shelf .hero__head .hero__lead, .hero--shelf .hero__head > .btn-row { grid-column: 7 / -1; }
}
/* the stage is the page's own ground: no box, no gradient; the shelf stands on it */
.hero--shelf .hero__stage.shelf-stage {
  background: none; border-radius: 0; overflow: visible;
  margin-top: var(--s-6); margin-bottom: calc(var(--s-5) - var(--hpadb, 64px));
  min-height: 240px; flex: 1 1 auto; aspect-ratio: auto;
}
.shelf {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 0.5%;
  padding: 0 1%; border-bottom: 10px solid #1f2b4d;
}
.shelf::after { /* the shelf's lit front edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 3px; background: color-mix(in oklab, #1f2b4d 70%, white);
}

/* a book seen from the front: its cover */
.bk { position: relative; height: var(--h); flex: 0 0 var(--w); color: var(--bi, #fff); background: var(--c); }
.bk--cover {
  display: flex; flex-direction: column; padding: clamp(10px, 1.6vw, 24px) clamp(10px, 1.4vw, 22px);
  border-radius: 3px 8px 8px 3px;
  box-shadow: inset 10px 0 0 rgb(0 0 0 / .14), inset 11px 0 0 rgb(255 255 255 / .12), 0 18px 28px -18px rgb(31 43 77 / .55);
}
.bk--cover.bk--light { --bi: #1f2b4d; box-shadow: inset 10px 0 0 rgb(31 43 77 / .08), inset 11px 0 0 rgb(255 255 255 / .5), 0 18px 28px -18px rgb(31 43 77 / .45); }
.bk--cover.bk--orange { --bi: #1f2b4d; }
.bk__kicker { padding-left: 10px; font-size: clamp(13px, 0.9vw, 14px); font-weight: 500; }
.bk__title { padding-left: 10px; margin-top: auto; font: var(--display-weight) clamp(18px, 2.2vw, 34px)/1.05 var(--font-display); letter-spacing: -0.02em; }
.bk__rule { margin: clamp(10px, 1.2vw, 18px) 0 clamp(8px, 1vw, 14px) 10px; width: 40%; height: 3px; background: currentColor; opacity: .5; }
.bk__foot { padding-left: 10px; font-size: clamp(12px, 0.9vw, 14px); line-height: 1.35; opacity: .85; }

/* a book seen on its spine */
.bk--spine { border-radius: 3px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06), inset -6px 0 0 rgb(0 0 0 / .08); }
.bk--spine::before, .bk--spine::after { content: ""; position: absolute; left: 14%; right: 14%; height: 2px; background: currentColor; opacity: .35; }
.bk--spine::before { top: 9%; } .bk--spine::after { bottom: 9%; }
.bk--spine span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: clamp(12px, 1vw, 15px); font-weight: 500; white-space: nowrap; }

/* a pile of books lying flat */
.bk-pile { flex: 0 0 var(--w); display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; align-self: flex-end; }
.bk-pile span { display: block; height: clamp(16px, 2.2vw, 30px); background: var(--c); border-radius: 2px 6px 6px 2px; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .12); }
.bk-pile span:nth-child(1) { margin-inline: 8% 2%; }
.bk-pile span:nth-child(2) { margin-inline: 0 6%; }
.bk-pile span:nth-child(3) { margin-inline: 4% 0; }

@media (max-width: 1023px) {
  .sp-hide { display: none; }
  .shelf { gap: 1.2%; }
  .bk--cover { flex-basis: 22%; }
  .bk--spine { flex-basis: 8%; }
  .shelf-stage .ly-spot { display: none; }
  .hero--shelf .hero__stage.shelf-stage { overflow-x: clip; }   /* the covers carry their own titles where the spots would not line up */
}
@media (max-width: 639px) {
  .hero--shelf .hero__stage.shelf-stage { margin-bottom: 10px; min-height: 240px; overflow-x: clip; }
  .sp-phone-hide { display: none; }
  .shelf { gap: 2%; padding: 0; }
  .bk--cover { flex-basis: 29%; padding: 10px 8px; }
  .bk--spine { flex-basis: 9%; }
  .bk--cover .bk__foot, .bk--cover .bk__kicker { display: none; }
  .bk__title { font-size: 16px; padding-left: 8px; }
  .bk__rule { margin-left: 8px; }
  .bk--spine span { font-size: 11px; }
  /* the header: the mark, the name, the main button and the menu fit 342px */
  .nav .brand img { height: 24px; }
  .nav .brand { font-size: 18px; gap: 6px; }
  .nav:not(.is-open) .nav__actions .btn { padding-inline: 12px; }
}

/* ------------------------------------------------------------------ #books: covers in a tile */
#books .tile { --tile-ratio: 16 / 8.2; }
@media (min-width: 640px) and (max-width: 1023px) { #books .tile { --tile-ratio: 4 / 5; } }
@media (max-width: 639px) { #books .tile { --tile-ratio: 16 / 9; } }
.covers { display: flex; align-items: flex-end; justify-content: center; gap: 4%; padding: 8% 10% 0; }
.covers--navy { background: #1f2b4d; }
.covers--orange { background: #f7941d; }
.mini {
  flex: 0 0 24%; height: var(--h); background: var(--c); color: var(--bi, #fff); border-radius: 3px 8px 0 0;
  display: flex; align-items: flex-start; padding: 8% 7%; box-shadow: inset 8px 0 0 rgb(0 0 0 / .12);
  transition: transform 600ms var(--ease);
}
.mini b { font: var(--display-weight) clamp(15px, 1.5vw, 22px)/1.1 var(--font-display); letter-spacing: -0.01em; padding-left: 6px; }
a.tile:hover .mini { transform: translateY(-6px); }
a.tile:hover .mini:nth-child(2) { transition-delay: 60ms; }
a.tile:hover .mini:nth-child(3) { transition-delay: 120ms; }
@media (prefers-reduced-motion: reduce) { .mini { transition: none; } a.tile:hover .mini { transform: none; } }

/* ------------------------------------------------------------------ #about: the motto set large */
.motto { margin: 0 0 var(--s-8); font: var(--display-weight) clamp(56px, 9.4vw, 152px)/0.95 var(--font-display); letter-spacing: -0.045em; }
.motto__accent { color: #c46c08; }
.pillars .pillar { border-top: 2px solid var(--ink); padding-top: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.pillar h3 { font: 500 var(--t-card)/1.3 var(--font-text); }
.pillar p { max-width: 40ch; }
@media (max-width: 639px) { .motto { margin-bottom: var(--s-6); } .pillars { row-gap: var(--s-5); } }

/* ------------------------------------------------------------------ #courses: three steps set large */
.steps-big { list-style: none; margin: 0; padding: 0; row-gap: var(--s-6); }
.steps-big li { display: grid; gap: var(--s-3); align-content: start; border-top: 1px solid var(--line-strong); padding-top: var(--s-5); }
.steps-big__n { font: var(--display-weight) clamp(80px, 13vw, 200px)/0.85 var(--font-display); letter-spacing: -0.05em; color: var(--p-accent); }
.steps-big h3 { font: 500 var(--t-card)/1.3 var(--font-text); }
.steps-big p { max-width: 36ch; }
#courses .section-head p { color: var(--ink); }
#courses .section-head { margin-bottom: var(--s-9); }
@media (max-width: 1023px) { #courses .section-head { margin-bottom: var(--head-gap); } }

/* ------------------------------------------------------------------ #order: form and contact card */
.form textarea { min-height: 140px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.5em; font-size: var(--t-body); }
.form__status.is-error { color: #b3261e; }
.form__status.is-ok { color: #1c6b3a; }
.field :is(input, select, textarea):focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.contact-card { display: grid; gap: var(--s-6); align-content: start; }
.contact-card img { width: 100%; max-width: 300px; height: auto; }
.contact-list { margin: 0; display: grid; gap: var(--s-4); }
.contact-list div { display: grid; gap: var(--s-1); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.contact-list dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.contact-list dd { margin: 0; font-size: var(--t-lead); }
@media (max-width: 1023px) {
  .contact-card { grid-column: 1 / -1; margin-top: var(--s-6); }
  .contact-card img { display: none; }
  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
}
@media (max-width: 639px) { .contact-card { display: none; } }

/* ------------------------------------------------------------------ footer */
.footer--dark .footer__col a, .footer--dark .footer__legal a { color: var(--ink); }
.footer--dark .footer__lede { color: var(--muted); max-width: 34ch; }

/* ------------------------------------------------------------------ simple inner pages (privacy, terms, 404) */
.page-doc { padding: calc(var(--nav) + var(--s-9)) 0 var(--s-9); }
.page-doc .wrap > * { max-width: 68ch; }
.page-doc h1 { font: var(--display-weight) clamp(36px, 3vw + 20px, 56px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); margin: 0 0 var(--s-6); }
.page-doc h2 { font: 500 var(--t-card)/1.3 var(--font-text); margin: var(--s-7) 0 var(--s-3); letter-spacing: 0; }
.page-doc p, .page-doc li { line-height: 1.7; }
.page-doc .muted { color: var(--muted); }
.page-foot { border-top: 1px solid var(--line); padding: var(--s-6) 0; font-size: var(--t-small); color: var(--muted); }
.page-foot a { color: var(--ink); }

@media (max-width: 639px) {
  .steps-big { row-gap: var(--s-5); }
  .steps-big li { padding-top: var(--s-4); gap: var(--s-2); }
  .steps-big__n { font-size: 52px; }
}

/* tablet: the shelf keeps book proportions and stands at the stage's foot */
@media (min-width: 640px) and (max-width: 1023px) {
  .shelf { top: auto; height: min(100%, 62vw); gap: 1%; padding: 0; }
  .bk--cover { flex-basis: 20.5%; }
  .bk--spine { flex-basis: 6.5%; }
}
/* phone: three covers and one spine fit the 342px column; the tiles stay on one screen */
@media (max-width: 639px) {
  .shelf { gap: 1%; justify-content: space-between; }
  .bk--cover { flex-basis: 39%; padding: 12px 10px; }
  .bk--spine { flex-basis: 9%; }
  .bk__title { font-size: 18px; }
  #books .tile { --tile-ratio: 16 / 7; }
  #books .tile > p { display: none; }
}
@media (max-width: 639px) { .form textarea { min-height: 96px; } .form { gap: var(--s-3); } }
.page-doc ul { list-style: disc; padding-left: 1.4em; margin: var(--s-3) 0 0; }
.page-doc :is(p, ul) + :is(p, ul) { margin-top: var(--s-3); }
