/* ==========================================================================
   Kaplan Tutoring Services
   Static rebuild of the WordPress site.

   Palette is sampled directly from the KTS logo (assets/img/logo.png):
     #800000  maroon      the top book
     #E3DBDB  page edge   the stacked page blocks
     #000000  ink         the lettering

   Typography uses system faces only. No external font requests are made,
   so the site loads with zero third-party connections. If you would rather
   use webfonts, see the note at the foot of this file.
   ========================================================================== */

:root {
  --maroon:      #800000;
  --maroon-deep: #5c0000;
  --maroon-soft: #f4eaea;
  --maroon-pale: #b8807f;
  --page:        #e3dbdb;
  --rule:        #d9d0ce;
  --ink:         #17130f;
  --ink-muted:   #574f49;
  --paper:       #fbfaf9;
  --paper-alt:   #f4efed;

  --serif: "Iowan Old Style", Charter, "Sitka Text", Cambria,
           "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --gutter:  clamp(1.1rem, 4vw, 2.5rem);
  --shell:   72rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

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

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

a { color: var(--maroon); text-underline-offset: .16em; }
a:hover { color: var(--maroon-deep); }

:focus-visible {
  outline: 3px solid var(--maroon);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--maroon);
  color: #fff;
  padding: .7rem 1.1rem;
  font-family: var(--sans);
  font-size: .9rem;
  z-index: 50;
}
.skip:focus { left: .5rem; top: .5rem; color: #fff; }

/* --- masthead ------------------------------------------------------------ */
/* The three-line bottom rule echoes the stacked book edges in the logo. */

.masthead {
  background: var(--paper);
  border-bottom: 3px solid var(--maroon);
  box-shadow: 0 3px 0 var(--page), 0 5px 0 var(--rule);
}

.masthead__bar {
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 2.5vw, 1.4rem);
  padding-block: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
  color: inherit;
  flex: 1 1 auto;
  min-width: 0;
}
.brand img { width: 62px; height: auto; display: block; flex: none; }
.brand__text { display: block; min-width: 0; }

.brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0;
}
.brand__tag {
  font-family: var(--sans);
  font-size: .78rem;
  line-height: 1.35;
  color: var(--ink-muted);
  margin: .22rem 0 0;
  max-width: 40ch;
}

.menu-toggle {
  display: none;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--paper-alt);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .55rem .85rem;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--page); }

/* --- navigation ---------------------------------------------------------- */

.nav { border-top: 1px solid var(--rule); }

.nav__list,
.nav__sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0 .1rem;
  font-family: var(--sans);
  font-size: .84rem;
}

.nav__list > li { position: relative; }

.nav__list a {
  display: block;
  padding: .75rem .58rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--maroon); background: var(--maroon-soft); }

.nav__list a[aria-current="page"] {
  color: var(--maroon);
  font-weight: 600;
  border-bottom-color: var(--maroon);
}

/* Test Preparation submenu. Opens on hover and on keyboard focus, so no
   script is needed for the dropdown itself. */
.nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--maroon);
  box-shadow: 0 6px 18px rgba(23, 19, 15, .1);
  padding: .25rem 0;
  z-index: 20;
  visibility: hidden;
  opacity: 0;
  transition: opacity .12s ease;
}
.has-sub:hover > .nav__sub,
.has-sub:focus-within > .nav__sub { visibility: visible; opacity: 1; }

.nav__sub a { padding: .55rem 1rem; border-bottom: 0; white-space: normal; }

.nav__caret { color: var(--maroon); font-size: .7em; margin-left: .3em; }

.nav__cta { margin-left: auto; }
.nav__cta a {
  background: var(--maroon);
  color: #fff;
  border-radius: 3px;
  margin: .4rem 0 .4rem .6rem;
  padding: .46rem .9rem;
  font-weight: 600;
}
.nav__cta a:hover { background: var(--maroon-deep); color: #fff; }
.nav__cta a[aria-current="page"] { color: #fff; border-bottom-color: transparent; }

@media (max-width: 61rem) {
  .menu-toggle { display: block; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; font-size: .95rem; }
  .nav__list > li { border-bottom: 1px solid var(--rule); }
  .nav__sub {
    position: static;
    visibility: visible;
    opacity: 1;
    border: 0;
    box-shadow: none;
    background: var(--paper-alt);
    padding: 0;
  }
  .nav__sub a { padding-left: 1.9rem; }
  .nav__caret { display: none; }
  .nav__cta { margin-left: 0; }
  .nav__cta a { margin: .5rem 0; text-align: center; }
}

/* --- page head ----------------------------------------------------------- */

.pagehead { background: var(--paper-alt); border-bottom: 1px solid var(--rule); }
.pagehead__inner { padding-block: clamp(1.6rem, 5vw, 2.6rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 .55rem;
}

h1 {
  font-size: clamp(1.75rem, 4.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 22ch;
}

.pagehead__lede {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-muted);
  margin: .8rem 0 0;
  max-width: 52ch;
}

/* --- content ------------------------------------------------------------- */

main { display: block; }

.content {
  padding-block: clamp(2rem, 6vw, 3.4rem);
  max-width: var(--measure);
  margin-inline: 0;
}

.content > :first-child { margin-top: 0; }

.content p { margin: 0 0 1.15em; }

.content h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 2.4em 0 .75em;
}

/* Signature device: three stacked bars of decreasing width, reading as the
   edge of the book stack in the logo. */
.content h2::before,
.content h3.tutor::before {
  content: "";
  display: block;
  width: 2.9rem;
  height: 11px;
  margin-bottom: .75rem;
  background:
    linear-gradient(var(--maroon),      var(--maroon))      0 0   / 2.9rem  3px no-repeat,
    linear-gradient(var(--maroon-pale), var(--maroon-pale)) 0 4px / 2.05rem 3px no-repeat,
    linear-gradient(var(--page),        var(--page))        0 8px / 1.25rem 3px no-repeat;
}

.content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2.2em 0 .6em;
  letter-spacing: -.005em;
}

.content ul, .content ol { margin: 0 0 1.3em; padding-left: 1.35em; }
.content li { margin-bottom: .45em; }

.content ul { list-style: square; }
.content ul::marker, .content li::marker { color: var(--maroon); }

/* The author enlarged this list inline to mark it as the headline summary
   of services. That intent is carried here instead. */
.service-list {
  font-size: 1.1rem;
  line-height: 1.55;
  border-left: 3px solid var(--page);
  padding: .2rem 0 .2rem 1.9rem;
  margin-bottom: 1.6em;
}
.service-list li { margin-bottom: .6em; }

blockquote {
  margin: 1.6em 0;
  padding: .1rem 0 .1rem 1.4rem;
  border-left: 3px solid var(--maroon);
  color: var(--ink);
}
blockquote p { margin: 0 0 .5em; }
blockquote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--maroon);
}

.content b, .content strong { font-weight: 700; }

.photo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto;
  border: 1px solid var(--rule);
  padding: 5px;
  background: #fff;
}

.center { text-align: center; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* Preformatted mail-in form. Kept as preformatted text because the rule
   lines are the content. */
.content pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .74rem;
  line-height: 2.1;
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--maroon);
  padding: 1.1rem 1.2rem;
  margin: 0 0 1.4rem;
  overflow-x: auto;
  white-space: pre;
}
.content pre.addr {
  line-height: 1.7;
  background: var(--paper-alt);
  font-size: .78rem;
}

/* --- tutor bios ---------------------------------------------------------- */

.content h3.tutor {
  font-size: 1.05rem;
  letter-spacing: .03em;
  margin-top: 2.6em;
  scroll-margin-top: 1.5rem;
}

.tutor__status {
  display: inline-block;
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .15rem .45rem;
  margin-left: .5rem;
  vertical-align: .12em;
}

.tutor-index {
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--maroon);
  padding: 1.1rem 1.3rem;
  margin: 0 0 2.2rem;
}
.tutor-index h2 { margin: 0 0 .7rem; font-size: .78rem; }
.tutor-index h2::before { display: none; }
.tutor-index__h {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 .7rem;
}
.tutor-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.6rem;
  font-family: var(--sans);
  font-size: .84rem;
}
.tutor-index li { margin-bottom: .3em; break-inside: avoid; }
@media (max-width: 34rem) { .tutor-index ul { columns: 1; } }

/* --- pending-content notice ---------------------------------------------- */

.pending {
  border: 2px solid var(--maroon);
  background: var(--maroon-soft);
  padding: 1.2rem 1.35rem;
  margin: 0 0 2rem;
}
.pending__h {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0 0 .55rem;
}
.pending p { margin: 0 0 .7em; }
.pending p:last-child { margin-bottom: 0; }
.pending code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .1em .35em;
  word-break: break-all;
}

/* --- contact strip and footer -------------------------------------------- */

.contact {
  border-top: 1px solid var(--rule);
  background: var(--paper-alt);
}
.contact__inner {
  padding-block: clamp(1.6rem, 4vw, 2.2rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.6rem;
  align-items: baseline;
}
.contact__h {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0;
  flex: 0 0 100%;
}
.contact__item { font-size: 1.05rem; margin: 0; }
.contact__item a { text-decoration: none; font-weight: 700; }
.contact__item a:hover { text-decoration: underline; }

.foot {
  border-top: 3px solid var(--maroon);
  box-shadow: inset 0 3px 0 var(--page), inset 0 5px 0 var(--rule);
  background: var(--paper);
}
.foot__inner {
  padding-block: 1.6rem 2.2rem;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  justify-content: space-between;
}
.foot__inner p { margin: 0; }
.foot a { color: var(--ink-muted); }
.foot a:hover { color: var(--maroon); }

/* --- print --------------------------------------------------------------- */

@media print {
  .masthead, .nav, .menu-toggle, .contact, .skip, .tutor-index { display: none; }
  body { background: #fff; font-size: 11pt; }
  .content { max-width: none; padding-block: 0; }
  .content pre { border: 0; background: none; padding: 0; font-size: 10pt; }
  .content h2::before, .content h3.tutor::before { display: none; }
  a { color: inherit; text-decoration: none; }
  .foot { border-top: 1px solid #000; box-shadow: none; }
}

/* --------------------------------------------------------------------------
   Webfonts, if you want them later
   --------------------------------------------------------------------------
   This build ships with system faces so that no request leaves the visitor's
   browser. To swap in webfonts, self-host the files (do not hotlink a CDN if
   you want to keep that property), add an @font-face block here, and put the
   family name at the front of --serif or --sans above. Nothing else changes.
   -------------------------------------------------------------------------- */
