/* ---------------------------------------------------------------
   Jesse J. Camacho — concept 1, "The Letter"
   Single column of continuous prose, testimonials as margin notes.
   Literata only. Locked palette. Radius 0.
   --------------------------------------------------------------- */

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

  --measure: 41rem;      /* prose column, about 60 characters at 20px */
  --note-w: 18rem;       /* margin note width on desktop */
  --note-gap: 2.5rem;    /* gutter between prose and margin note */

  --serif: "Literata", Georgia, "Century Schoolbook", serif;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;          /* 20px */
  font-weight: 400;
  line-height: 1.65;
  padding-bottom: 5.5rem;      /* clearance for the fixed bottom bar */
  text-rendering: optimizeLegibility;
}

/* --- skip link ------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  font-size: 1rem;
  padding: 0.85rem 1.25rem;
  text-decoration: underline;
  z-index: 20;
}
.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* --- shell ------------------------------------------------------ */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3.25rem clamp(1.25rem, 4vw, 2.5rem) 0;
}

.letter {
  max-width: var(--measure);
}

.letter > * { margin: 0 0 3.5rem; }
.letter > *:last-child { margin-bottom: 2.5rem; }

/* --- the opening block ------------------------------------------- */

.intro {
  display: grid;
  grid-template-columns: 7fr 4fr;
  align-items: end;
  gap: 3rem;
  padding: 1rem 0 4.75rem;
}

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

.tagline {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;           /* 24px */
  line-height: 1.35;
  color: var(--navy);
}

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

.intro-portrait { margin: 0; }

.intro-portrait img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border-bottom: 3px solid var(--navy);
}

/* --- type ------------------------------------------------------- */

h1 {
  font-size: 2.75rem;          /* 44px */
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1rem;             /* 16px */
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin: 0 0 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  clear: both;
}

h2 .num {
  display: inline-block;
  min-width: 2.25rem;
  color: var(--navy);
  font-weight: 400;
}

/* the letter's first line: a display line, not a section label */
h2.opening {
  font-size: 2.25rem;          /* 36px */
  font-weight: 400;
  line-height: 1.26;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-top: 0;
  padding-top: 0;
  margin: 0 0 1.75rem;
}

p { margin: 0 0 1.35rem; }
.letter > * > p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.5rem;           /* 24px */
  line-height: 1.5;
}

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

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

/* --- margin notes ----------------------------------------------- */

.note {
  margin: 2.25rem 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--hairline);
  color: var(--ink);
}

.note blockquote {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;         /* 18px */
  line-height: 1.55;
}
.note blockquote p { margin: 0; }
.note blockquote p::before { content: "\201C"; }
.note blockquote p::after  { content: "\201D"; }

.note .who {
  margin: 0;
  font-size: 1rem;             /* 16px */
  line-height: 1.5;
  color: var(--navy);
}

/* --- closing ---------------------------------------------------- */

.verify { margin-top: 1.75rem; }

.sign {
  margin: 2.5rem 0 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  clear: both;
}

.signature {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  line-height: 1.4;
}

.reach {
  margin: 0;
  line-height: 1.9;
}
.reach a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: 0.25rem;
}
.reach .tel { font-size: 1.5rem; }

.fine {
  font-size: 1rem;             /* 16px */
  line-height: 1.6;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.fine-top {
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.s-close .fine:last-child { margin-bottom: 0; }

/* --- persistent bottom bar --------------------------------------- */

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--hairline);
  z-index: 10;
}

.bar-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.bar-label {
  font-size: 1rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-tel {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

/* --- desktop: notes move into the right-hand rail ----------------- */

@media (min-width: 1140px) {
  .wrap { padding-top: 5rem; }

  .note {
    float: right;
    clear: right;
    width: var(--note-w);
    /* pull the note fully outside the prose column so the text
       measure is untouched: outer width becomes negative */
    margin-right: calc(-1 * (var(--note-w) + var(--note-gap)));
    margin-top: 0.4rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
  }

  .note blockquote { font-size: 1.125rem; line-height: 1.5; }
}

/* --- intro stacks: portrait above the text ------------------------ */

@media (max-width: 820px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0.5rem 0 3.5rem;
  }
  .intro-portrait { order: -1; }
  .intro-portrait img { width: 70%; max-width: 280px; }
}

/* --- small screens ------------------------------------------------ */

@media (max-width: 560px) {
  .wrap { padding-top: 2.25rem; }
  h1 { font-size: 2.25rem; }
  h2.opening { font-size: 1.75rem; line-height: 1.28; }
  .tagline { font-size: 1.375rem; }
  .lead { font-size: 1.375rem; }
  h2 .num { min-width: 1.75rem; }
  .letter > * { margin-bottom: 3rem; }
  .bar-label { display: none; }
  .bar-in { justify-content: flex-start; }
}

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

.banner {
  padding: 3.25rem 0 2.5rem;
}

.banner-in,
.nav-in,
.foot-in {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.letterhead {
  margin: 0 0 1.35rem;
  font-size: 1rem;             /* 16px */
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.banner h1 { max-width: 20ch; }

.banner-line {
  margin: 0;
  font-size: 1.5rem;           /* 24px */
  line-height: 1.45;
  max-width: 44rem;
}

/* --- navigation: hairline rules, plain labels ---------------------- */

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

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

.nav li { margin: 0; }

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.0625rem;        /* 17px */
  color: var(--navy);
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 2px;
}

/* --- quiet hairline listings --------------------------------------- */

.list {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
}

.list li {
  padding: 0.9rem 0;
  font-size: 1.125rem;         /* 18px */
  line-height: 1.55;
  border-top: 1px solid var(--hairline);
}

.list li:first-child { border-top: 0; padding-top: 0.2rem; }

.list .cite {
  display: block;
  color: var(--navy);
}

/* --- the seven, printed in full ------------------------------------ */

.rec { margin: 0 0 3.25rem; }
.rec:last-of-type { margin-bottom: 0; }

.rec .who {
  margin: -0.5rem 0 1.25rem;
  font-size: 1rem;             /* 16px */
  line-height: 1.5;
  color: var(--navy);
}

.rec blockquote {
  margin: 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--hairline);
}

.rec blockquote p:last-child { margin-bottom: 0; }

/* --- photograph placeholders ---------------------------------------- */

.ph {
  margin: 2.5rem 0;
  padding: 2.5rem 1.5rem;
  background: var(--band);
  border: 1px dashed var(--navy);
}

.ph p {
  margin: 0;
  font-size: 1rem;             /* 16px */
  line-height: 1.5;
  color: var(--navy);
}

/* --- footer --------------------------------------------------------- */

.foot {
  margin-top: 4.5rem;
  background: var(--band);
  border-top: 1px solid var(--hairline);
}

.foot-in {
  padding-top: 2.75rem;
  padding-bottom: 3rem;
  max-width: 68rem;
}

.foot p { max-width: 44rem; }

.foot-reach {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;         /* 18px */
  line-height: 1.5;
}

.foot-reach a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: 0.15rem;
}

.foot-reach .sep { color: var(--navy); padding: 0 0.35rem; }

.foot-note {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;         /* 18px */
  line-height: 1.6;
}

.foot .fine { margin-bottom: 0.6rem; }
.foot .fine:last-child { margin-bottom: 0; }

/* --- small screens, additions --------------------------------------- */

@media (max-width: 560px) {
  .banner { padding: 2.25rem 0 2rem; }
  .banner h1 { max-width: none; }
  .banner-line { font-size: 1.375rem; }
  .nav ul { column-gap: 1.35rem; }
  .rec blockquote { padding-left: 1.125rem; }
}

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

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

.intro  { animation: rise 620ms ease-out both; }
.banner { animation: rise 620ms ease-out both; }
.letter { animation: rise 620ms ease-out 140ms both; }
.bar    { animation: rise 620ms ease-out 320ms both; }

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

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

@media print {
  .bar, .skip, .nav { display: none; }
  body { padding-bottom: 0; }
  .note { float: none; width: auto; margin: 2rem 0; }
  .foot { background: none; }
}
