/* ADHD Is Trauma — adhdtruma.com
   Paper above, red below, torn between: the cover's logic as the page's logic. */

:root{
  color-scheme: light;

  --paper:      #F4F3EF;
  --paper-deep: #EAE8E1;
  --ink:        #1A1712;
  --ink-soft:   #5E5A51;
  --pencil:     #8C877C;
  --rule:       #D6D2C8;
  --red:        #BF271D;
  --red-deep:   #96190F;
  --red-ink:    #FBF4F2;

  --measure: 34rem;
  --gutter: clamp(1rem, 5vw, 4rem);

  --display: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --text:    "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --form:    "Courier Prime", "Courier New", ui-monospace, monospace;
}

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

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

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.66;
  text-rendering: optimizeLegibility;
}

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

a{ color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover{ color: var(--red); }

:focus-visible{ outline: 3px solid var(--red); outline-offset: 3px; }

.wrap{ max-width: 68rem; margin-inline:auto; padding-inline: var(--gutter); }
.skip{
  position:absolute; left:-9999px; top:0; background:var(--ink); color:var(--paper);
  padding:.75rem 1rem; z-index:50;
}
.skip:focus{ left:.5rem; top:.5rem; }

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

h1,h2,h3{ margin:0; font-weight:400; line-height:1.12; letter-spacing:-0.01em; }

.h-section{
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  margin-bottom: .6rem;
}
.lede{
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.3rem);
  line-height:1.55;
  max-width: var(--measure);
  color: var(--ink-soft);
}

section{ padding-block: clamp(3.5rem, 7vw, 6.5rem); }

/* ---------------------------------------------------------- torn edge */

.tear{ display:block; width:100%; height: clamp(26px, 3.2vw, 46px); margin-bottom:-1px; }
.tear path{ fill: var(--red); }
/* the paler lip is the thickness of the torn sheet, as on the cover */
.tear .lip{ fill: #D9D6CE; }
.tear--up path{ fill: var(--paper); }

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

.hero{ padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem); }
.hero-grid{
  display:grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items:start;
}
@media (min-width: 56rem){
  .hero-grid{ grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items:center; }
}

.stamp{
  display:inline-block;
  font-family: var(--form);
  font-size: .78rem;
  letter-spacing:.06em;
  color: var(--pencil);
  border:1px solid var(--rule);
  padding:.3rem .6rem;
  transform: rotate(-1.4deg);
  margin-bottom: 1.6rem;
}

.hero h1{
  font-family: var(--display);
  font-size: clamp(3rem, 1.6rem + 7vw, 6.5rem);
  line-height:.92;
  letter-spacing:-0.025em;
  margin-bottom: .9rem;
}
.hero h1 .is{ font-style: italic; }

.tagline{
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem);
  color: var(--red);
  margin:0 0 1.6rem;
}

.hero p{ max-width: var(--measure); }
.byline{ font-family: var(--form); font-size:.85rem; color: var(--pencil); margin-top:2rem; }

.actions{ display:flex; flex-wrap:wrap; gap:.75rem; margin-top:2rem; }

.btn{
  display:inline-block;
  font-family: var(--text);
  font-size:1rem;
  padding:.8rem 1.5rem;
  border:1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration:none;
  cursor:pointer;
  transition: background .12s linear, color .12s linear;
}
.btn:hover{ background: var(--red); border-color: var(--red); color:#fff; }
.btn--ghost{ background:transparent; color: var(--ink); }
.btn--ghost:hover{ background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--onred{ background:#fff; border-color:#fff; color: var(--red-deep); }
.btn--onred:hover{ background: var(--ink); border-color: var(--ink); color:#fff; }

.cover{
  position:relative;
  max-width: min(24rem, 100%);
  margin-inline:auto;
  box-shadow: 0 1px 0 rgba(0,0,0,.14), 0 18px 34px -18px rgba(0,0,0,.42);
  transform: rotate(1.2deg);
}

/* ---------------------------------------------------------- the list */

.band{ background: var(--red); color: var(--red-ink); }
.band a{ color:#fff; }
.band .h-section{ color:#fff; }

.switch{
  display:grid;
  grid-template-columns: 1fr;
  width:100%; max-width:32rem;
  border:1.5px solid rgba(255,255,255,.55);
  margin: .5rem 0 2.2rem;
}
.switch button{
  font-family: var(--text);
  font-size: clamp(.9rem,.86rem + .2vw,1rem);
  background:transparent;
  color: var(--red-ink);
  border:0;
  padding:.7rem 1.1rem;
  cursor:pointer;
}
.switch button[aria-pressed="true"]{ background:#fff; color: var(--red-deep); }
.switch button + button{ border-top:1.5px solid rgba(255,255,255,.55); }

@media (min-width: 34rem){
  .switch{ display:inline-flex; width:auto; }
  .switch button + button{
    border-top:0;
    border-left:1.5px solid rgba(255,255,255,.55);
  }
}

.list-head{ min-height: 5.2rem; }
.list-head .reading{
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem);
  line-height:1.1;
  margin:0 0 .4rem;
  color:#fff;
}
.list-head .reading-note{ color: rgba(255,255,255,.82); max-width: var(--measure); margin:0; }

.checklist{
  list-style:none; margin: 2.2rem 0 0; padding:0;
  display:grid; gap:.1rem 2.5rem;
  grid-template-columns: 1fr;
  font-family: var(--form);
  font-size: .95rem;
}
/* Fill down, then across: the left column is the inattention half of the real
   form, the right column the hyperactivity half. */
@media (min-width: 46rem){
  .checklist{
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(9, auto);
    grid-auto-flow: column;
  }
}

.checklist li{
  display:grid;
  grid-template-columns: 1.7rem 1fr;
  align-items:baseline;
  padding:.5rem 0;
  border-bottom:1px solid rgba(255,255,255,.22);
}
.tick{
  display:inline-grid; place-items:center;
  width:1.05rem; height:1.05rem;
  border:1.5px solid rgba(255,255,255,.7);
  color:#fff; font-size:.85rem; line-height:1;
}
.tick span{ opacity:0; transform: scale(.4) rotate(-12deg); }
.checklist.ticked .tick span{
  opacity:1; transform:none;
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.checklist.ticked li:nth-child(n) .tick span{ transition-delay: calc(var(--i,0) * 55ms); }

.list-foot{
  margin-top:2.4rem;
  padding-top:1.6rem;
  border-top:1.5px solid rgba(255,255,255,.4);
  max-width: 42rem;
}
.list-foot p{ margin:0 0 .7rem; }
.list-foot strong{ font-weight:400; font-family: var(--display); font-size:1.25rem; }

/* ---------------------------------------------------------- evidence */

.claims{ margin-top: 2.8rem; display:grid; gap: 2.4rem; }
@media (min-width: 52rem){ .claims{ grid-template-columns:1fr 1fr; gap:2.8rem 3.5rem; } }

.claim h3{
  font-family: var(--display);
  font-size: clamp(1.25rem,1.1rem + .7vw,1.55rem);
  margin-bottom:.5rem;
}
.claim p{ margin:0 0 .7rem; max-width: 32rem; }
.claim cite{
  font-family: var(--form);
  font-style:normal;
  font-size:.8rem;
  color: var(--pencil);
  display:block;
  border-top:1px solid var(--rule);
  padding-top:.5rem;
}

.note{
  margin-top: 3.5rem;
  border-left:3px solid var(--red);
  padding: .2rem 0 .2rem 1.4rem;
  max-width: 40rem;
}
.note p{ margin:0 0 .8rem; }
.note p:last-child{ margin-bottom:0; }

/* ---------------------------------------------------------- author / kit */

.two{ display:grid; gap: clamp(2.5rem,5vw,4rem); }
@media (min-width: 52rem){ .two{ grid-template-columns: 1fr 1fr; } }

.kit{ background: var(--paper-deep); }
.kit ul{ margin:1.2rem 0 0; padding-left:1.1rem; max-width:32rem; }
.kit li{ margin-bottom:.4rem; }

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

.form{ margin-top:2.5rem; max-width: 38rem; }
.field{ margin-bottom:1.5rem; }
.field label{
  display:block;
  font-family: var(--form);
  font-size:.82rem;
  color: var(--ink-soft);
  margin-bottom:.4rem;
}
.field input[type=text],
.field input[type=email],
.field select,
.field textarea{
  width:100%;
  font-family: var(--text);
  font-size:1rem;
  color: var(--ink);
  background:#FCFBF8;
  border:1.5px solid var(--rule);
  border-radius:2px;
  padding:.7rem .8rem;
}
.field textarea{ min-height: 11rem; resize:vertical; line-height:1.6; }
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: var(--ink); outline:none; box-shadow: 0 0 0 3px rgba(191,39,29,.18);
}
.field .hint{ font-size:.88rem; color: var(--ink-soft); margin:.45rem 0 0; }
.field .err{ color: var(--red-deep); font-size:.88rem; margin:.45rem 0 0; }
.field.bad input, .field.bad select, .field.bad textarea{ border-color: var(--red); }

.check{ display:grid; grid-template-columns:1.3rem 1fr; gap:.65rem; align-items:start; }
.check input{ margin-top:.35rem; width:1rem; height:1rem; accent-color: var(--red); }
.check label{ font-family: var(--text); font-size:.95rem; color: var(--ink); margin:0; }

.hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

.sent{
  border:1.5px solid var(--ink);
  background:#FCFBF8;
  padding:1.5rem 1.6rem;
  max-width:38rem;
  margin-top:2.5rem;
}
.sent h3{ font-family: var(--display); font-size:1.5rem; margin-bottom:.5rem; }
.sent p{ margin:0; }

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

footer{
  background: var(--ink);
  color: #D9D5CA;
  padding-block: clamp(3rem,5vw,4.5rem);
  font-size:.95rem;
}
footer a{ color:#fff; }
footer a:hover{ color:#fff; text-decoration-color: var(--red); }
footer .h-section{ color:#fff; font-size:clamp(1.3rem,1.1rem + .8vw,1.7rem); }
.help{ margin:1.2rem 0 0; padding:0; list-style:none; max-width:34rem; }
.help li{ padding:.45rem 0; border-bottom:1px solid rgba(255,255,255,.14); }
.help strong{ font-weight:400; color:#fff; }
.colophon{
  margin-top:2.5rem; padding-top:1.5rem;
  border-top:1px solid rgba(255,255,255,.18);
  font-family: var(--form); font-size:.78rem; color:#9C968A;
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
  .checklist .tick span{ opacity:1; transform:none; }
}
