/* ---------------------------------------------------------------
   jessecamacho5.noahlot.com  —  THE DECODER
   Locked palette, Literata only, radius 0.
   --------------------------------------------------------------- */

:root {
  --ink:       #15171A;
  --navy:      #1E3A5F;
  --navy-deep: #16304E;
  --band:      #F6F6F4;
  --hairline:  #E4E5E2;
  --white:     #FFFFFF;

  /* seven sizes, no more */
  --t-label: 1.0625rem;   /* 17px */
  --t-small: 1.125rem;    /* 18px */
  --t-body:  1.1875rem;   /* 19px */
  --t-sub:   1.5rem;      /* 24px */
  --t-term:  1.625rem;    /* 26px */
  --t-h2:    2rem;        /* 32px */
  --t-h1:    2.75rem;     /* 44px */

  --wrap: 62.5rem;        /* 1000px */
  --gut:  1.5rem;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Literata", Georgia, "Century Schoolbook", serif;
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.62;
  overflow-wrap: break-word;
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gut);
  padding-right: var(--gut);
}

/* ---------------------------------------------------------- links */

a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  text-decoration-thickness: 1px;
  transition: color 180ms ease;
}
a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }

a:focus-visible,
.skip:focus {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 0;
}
/* fallback for engines without :focus-visible */
a:focus { outline: 2px solid var(--navy); outline-offset: 3px; }
a:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--navy);
  padding: 0.9rem 1.25rem;
  font-size: var(--t-body);
  z-index: 10;
}
.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
  border: 1px solid var(--navy);
}

/* the skip link lands here, so the landing has to be visible */
.decoder:focus { outline: 2px solid var(--navy); outline-offset: 3px; }
.decoder:focus:not(:focus-visible) { outline: none; }

/* --------------------------------------------------------- opening */

.intro {
  padding-top: 5rem;
  padding-bottom: 4.5rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 7fr 4fr;
  column-gap: 3.5rem;
  align-items: end;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: var(--t-label);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
}

h1 {
  margin: 0 0 1rem;
  font-size: var(--t-h1);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.intro-line {
  margin: 0 0 1.5rem;
  font-size: var(--t-sub);
  line-height: 1.35;
  color: var(--ink);
}

.intro-para {
  margin: 0;
  max-width: 62ch;
}

.intro-portrait { margin: 0; }

.intro-portrait img {
  width: 100%;
  max-width: 22.5rem;   /* 360px */
  border-bottom: 3px solid var(--navy);
}

h2 {
  margin: 0 0 1.25rem;
  font-size: var(--t-h2);
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  max-width: 24ch;
}

/* ---------------------------------------------------------- index */

.decoder > .wrap:first-child {
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--hairline);
}

.index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 2.5rem;
}

.index li { break-inside: avoid; }

.index a {
  display: block;
  min-height: 44px;
  padding: 0.6rem 0;
  font-size: var(--t-body);
  text-decoration-color: var(--hairline);
}
.index a:hover { text-decoration-color: currentColor; }

/* --------------------------------------------------------- entries */

.entries { margin: 0; padding: 0; }

.entry {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  column-gap: 3.5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 1.5rem;
}
/* no stray rule where a quote band already does the separating */
.band + div .entry:first-child { border-top: 0; }
/* the very last entry of the whole list closes the list */
.decoder > div:last-of-type .entry:last-child { border-bottom: 1px solid var(--hairline); }

dt { margin: 0; }

.term {
  display: block;
  font-size: var(--t-term);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.005em;
}

.term-note {
  display: block;
  margin-top: 0.5rem;
  font-size: var(--t-label);
  line-height: 1.45;
  color: var(--navy);
  font-style: italic;
}

dd { margin: 0; }

.half + .half { margin-top: 1.75rem; }

.label {
  margin: 0 0 0.35rem;
  font-size: var(--t-label);
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

.half p:not(.label) {
  margin: 0;
  max-width: 66ch;
}

/* ----------------------------------------------------- quote bands */

.band {
  margin: 0;
  padding: 5rem 0;
  background: var(--band);
}

.band blockquote {
  margin: 0 0 1.5rem;
  padding: 0;
  max-width: 44ch;
}

.band blockquote p {
  margin: 0;
  font-size: var(--t-term);
  line-height: 1.4;
  color: var(--ink);
  text-wrap: pretty;
}

.band figcaption {
  font-size: var(--t-small);
  line-height: 1.55;
  color: var(--ink);
  max-width: 44ch;
}

.verify {
  display: inline-block;
  margin-top: 0.75rem;
  min-height: 44px;
  padding: 0.6rem 0;
  font-size: var(--t-small);
}

/* -------------------------------------------------------- passages */

.passage {
  padding-top: 5rem;
  padding-bottom: 1rem;
}

.passage p {
  margin: 0 0 1.35rem;
  max-width: 64ch;
}

.passage em { font-style: italic; }

.ask {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  max-width: 64ch;
}

.ask li {
  padding: 1.05rem 0;
  border-top: 1px solid var(--hairline);
}
.ask li:last-child { border-bottom: 1px solid var(--hairline); }

.aside {
  font-size: var(--t-small);
  color: var(--ink);
}

/* --------------------------------------------------------- contact */

.contact {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.contact-body { max-width: 62ch; }

.contact-body p { margin: 0 0 1.1rem; }

.contact-lines {
  font-size: var(--t-sub);
  line-height: 1.9;
}

.contact-lines a {
  display: inline-block;
  min-height: 44px;
  padding: 0.45rem 0;
}

.place { color: var(--ink); }

.contact p > a {
  display: inline-block;
  min-height: 44px;
  padding: 0.5rem 0;
}

/* ----------------------------------------------------------- foot */

.site-foot { padding-bottom: 4.5rem; }

.site-foot .wrap {
  border-top: 1px solid var(--hairline);
  padding-top: 3rem;
}

.site-foot p {
  margin: 0 0 1rem;
  font-size: var(--t-small);
  line-height: 1.6;
  max-width: 62ch;
}
.site-foot p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------ load motion */

@keyframes rise {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: none; }
}

.intro   { animation: rise 600ms ease-out both; }
.decoder { animation: rise 600ms ease-out 90ms both; }

/* ---------------------------------------------------------- mobile */

@media (max-width: 60rem) {
  .index ol { columns: 2; }
  .entry { grid-template-columns: 12rem minmax(0, 1fr); column-gap: 2.5rem; }
  .intro-grid { column-gap: 2.5rem; }
}

@media (max-width: 46rem) {
  :root { --gut: 1.25rem; --t-h1: 2rem; --t-h2: 1.625rem; --t-sub: 1.3125rem; }

  .intro { padding-top: 2.75rem; padding-bottom: 3rem; }

  .intro-grid {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .intro-portrait {
    width: 70%;
    max-width: 17.5rem;   /* 280px */
    margin-bottom: 2.5rem;
  }
  .intro-portrait img { max-width: none; }

  .index ol { columns: 1; }

  .entry {
    display: block;
    padding: 2.25rem 0;
  }
  .entry dt { margin-bottom: 1.25rem; }
  .term-note { margin-top: 0.35rem; }

  .band { padding: 3.25rem 0; }
  .band blockquote { max-width: none; }
  .band blockquote p { font-size: var(--t-sub); }

  .passage { padding-top: 3.25rem; }
  .contact { padding-top: 3.25rem; }
}

/* =====================================================================
   THE REST OF THE SITE
   Same device throughout: a hairline-ruled row, term on the left,
   labelled blocks on the right. Navigation, interior banner, runs of
   entries, placeholders, the shared foot.
   ===================================================================== */

/* ------------------------------------------------------------ nav */

.site-nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--white);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0;
  font-size: var(--t-label);
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--navy);
  border-bottom-color: var(--hairline);
}

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

/* --------------------------------------------------- interior banner */

.banner {
  padding: 3.25rem 0 2.75rem;
  border-bottom: 1px solid var(--hairline);
  animation: rise 500ms ease-out both;
}

.banner-eyebrow {
  margin: 0 0 1rem;
  font-size: var(--t-label);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
}

.banner h1 {
  margin: 0 0 0.85rem;
  max-width: 20ch;
}

.banner-line {
  margin: 0;
  max-width: 58ch;
  font-size: var(--t-sub);
  line-height: 1.42;
}

main:focus { outline: 2px solid var(--navy); outline-offset: 3px; }
main:focus:not(:focus-visible) { outline: none; }

/* ------------------------------------------------------ runs of entries */

.run > .wrap { padding-top: 3.75rem; }

.run h2 { margin-bottom: 0.85rem; }

.lead {
  margin: 0 0 1.75rem;
  max-width: 64ch;
}

.run .entries .entry:last-child { border-bottom: 1px solid var(--hairline); }

/* longer left-hand headings: case names, degrees, admissions */
.entries--wide .entry { grid-template-columns: 18rem minmax(0, 1fr); }
.entries--wide .term { font-size: var(--t-sub); line-height: 1.28; }

.term-note.is-plain { font-style: normal; }

/* a quoted voice sitting inside an entry, under the two blocks */
.half blockquote {
  margin: 0 0 0.6rem;
  padding: 0;
  max-width: 66ch;
}

.half blockquote p {
  margin: 0;
  font-size: var(--t-sub);
  line-height: 1.4;
  text-wrap: pretty;
}

.attrib {
  margin: 0;
  font-size: var(--t-small);
  line-height: 1.55;
  max-width: 66ch;
}

.attrib .verify {
  display: block;
  margin-top: 0.25rem;
}

/* ------------------------------------------------- full recommendations */

.rec-text p { margin: 0 0 1.2rem; max-width: 66ch; }
.rec-text p:last-child { margin-bottom: 0; }

details.more { margin-top: 1.35rem; }

details.more > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0;
  color: var(--navy);
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
details.more > summary:hover { color: var(--navy-deep); }
details.more[open] > .rec-text { padding-top: 0.35rem; }

/* a fixed-width first column must actually hold its width */
.entry dt { min-width: 0; }
.term { overflow-wrap: break-word; }

.term a {
  display: inline-block;
  min-height: 44px;
  padding: 0.3rem 0;
  color: var(--navy);
}

.band-note {
  margin: 0;
  max-width: 52ch;
  font-size: var(--t-sub);
  line-height: 1.45;
}

.big-link {
  display: inline-block;
  min-height: 44px;
  padding: 0.5rem 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------- photo placeholders */

.photo-slot {
  margin: 2.75rem 0 0;
  padding: 2.75rem 1.5rem;
  background: var(--band);
  border: 1px dashed var(--hairline);
  border-radius: 0;
}

.photo-slot p {
  margin: 0;
  max-width: 46ch;
  font-size: var(--t-small);
  line-height: 1.55;
}

.photo-slot .slot-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

/* -------------------------------------------------------- notice block */

.notice {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 3px solid var(--navy);
}

.notice p {
  margin: 0 0 1rem;
  max-width: 66ch;
  font-size: var(--t-small);
  line-height: 1.6;
}
.notice p:last-child { margin-bottom: 0; }

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

.foot-routes {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.75rem;
  align-items: center;
  margin: 0 0 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-small);
}

.foot-routes a,
.foot-routes .place {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0;
}

/* ------------------------------------------- the rest of it, on a phone */

@media (max-width: 60rem) {
  .entries--wide .entry { grid-template-columns: 14rem minmax(0, 1fr); }
}

@media (max-width: 46rem) {
  .site-nav ul { column-gap: 1.1rem; }
  .site-nav a { font-size: var(--t-small); }

  .banner { padding: 2.25rem 0 2rem; }
  .banner h1 { max-width: none; }
  .banner-line { font-size: var(--t-sub); }

  .run > .wrap { padding-top: 2.75rem; }

  .entries--wide .entry { display: block; }
  .entries--wide .term { font-size: var(--t-term); }

  .photo-slot { padding: 2rem 1.25rem; }

  .foot-routes { column-gap: 1.25rem; }
}

/* --------------------------------------------------- reduced motion */

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