/* Cool Nerds — black ink on clean paper, to suit the sunglasses logo, with one cool-blue accent.
   One typeface throughout (Source Serif 4); --display is its bold/heading use. */
:root {
  --paper: #f6f7f8;
  --card: #ffffff;
  --ink: #111316;
  --muted: #5d6470;
  --line: #dde1e6;
  --accent: #1d5fd1;
  --accent-soft: #e6eefc;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif);
}
a { color: var(--accent); }

.page { min-height: 100vh; display: flex; flex-direction: column; max-width: 48rem; margin: 0 auto; padding: 0 1rem; }
.content { flex: 1; }

/* ---------- masthead ---------- */
.masthead { text-align: center; padding: 2.5rem 0 .5rem; }
.brand { margin: 0; line-height: 0; }
.logo { width: min(24rem, 86vw); height: auto; display: block; margin: 0 auto; }
.logo.small { width: 11rem; }
.tagline {
  margin: 1.1rem 0 0; color: var(--muted);
  font: 500 clamp(.95rem, 2.6vw, 1.15rem)/1.4 var(--display); letter-spacing: .02em;
}
.tagline span { white-space: nowrap; }

/* ---------- menu ---------- */
.menu {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
  margin: 1.75rem auto 0;
}
.menu a {
  display: inline-block; padding: .5rem 1.15rem; border: 1.5px solid var(--ink); border-radius: 999px;
  color: var(--ink); text-decoration: none; font: 700 .98rem/1.2 var(--display);
  white-space: nowrap;
}
.menu a:hover { background: var(--accent-soft); }
.menu a[aria-current] { background: var(--ink); color: var(--paper); }
.menu a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- panels ---------- */
.panel {
  margin: 2rem 0 2.5rem; padding: 2.25rem 2.5rem 2.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 1px 0 var(--line), 0 14px 32px -22px rgba(17, 19, 22, .35);
}
.panel[hidden] { display: none; }
.panel h2 {
  font: 700 clamp(1.7rem, 4.4vw, 2.3rem)/1.15 var(--display);
  margin: 0 0 1.25rem; letter-spacing: -.01em; text-wrap: balance;
}
.panel h3 { font: 700 1.3rem/1.25 var(--display); margin: 2.25rem 0 .75rem; }
.panel p { margin: 0 0 1rem; }

.definition {
  font-size: 1.3rem; line-height: 1.5; font-weight: 600;
  border-left: 4px solid var(--accent); padding-left: 1.1rem; margin-bottom: 1.5rem !important;
}

.attributes { margin: 0; padding: 0; list-style: none; counter-reset: attr; }
.attributes li {
  counter-increment: attr; position: relative; padding: .7rem 0 .7rem 3rem;
  border-bottom: 1px solid var(--line);
}
.attributes li:last-child { border-bottom: 0; }
.attributes li::before {
  content: counter(attr); position: absolute; left: 0; top: .8rem;
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: var(--paper);
  font: 700 .95rem/2rem var(--display); text-align: center;
}
.attributes strong { font-family: var(--display); }

.pull {
  font: 700 clamp(1.2rem, 3vw, 1.45rem)/1.4 var(--display); letter-spacing: -.005em;
  margin: 1.75rem 0 !important; padding: 1rem 1.25rem; background: var(--accent-soft);
  border-radius: 6px; text-wrap: balance;
}

/* tagline */
.motto {
  text-align: center; font: 700 clamp(1.15rem, 3.2vw, 1.5rem)/1.35 var(--display); margin: 0 0 1.75rem !important;
}
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.pillar { border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: 6px; padding: 1rem 1.1rem .25rem; }
.pillar h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.pillar h3 span { display: block; font-weight: 500; font-size: 1rem; color: var(--muted); }
.pillar p { font-size: 1rem; line-height: 1.55; }
.closing { margin-top: 1.75rem !important; font-style: italic; text-align: center; text-wrap: balance; }

/* essay */
.essay .dek { font-style: italic; color: var(--muted); font-size: 1.2rem; margin-bottom: 1.5rem; }
.essay .final { text-align: center; background: var(--ink); color: var(--paper); }
.welcome { text-align: center; font: 700 1.3rem var(--display); margin-top: 1.5rem !important; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 1rem 0 1.25rem; color: var(--muted);
  font: 400 .85rem/1.5 var(--display); text-align: center;
}
.site-footer .legal { margin: 0; }

/* ---------- plain pages ---------- */
.plain { text-align: center; padding: 4rem 0; }
.plain h1 { font: 700 2.2rem/1.1 var(--display); margin-top: 2rem; }

@media (max-width: 40rem) {
  .panel { padding: 1.5rem 1.15rem 1.75rem; margin-top: 1.5rem; }
  .pillars { grid-template-columns: 1fr; }
  .menu { gap: .3rem; }
  .menu a { padding: .4rem .6rem; font-size: .8rem; }
}
