/* ============================================================
   colinhanner.com — single stylesheet
   Reference as styles.css?v=N in HTML and bump N on every change.

   The design: “The Masthead” — bold condensed caps (Anton) over
   Inter, white paper, press green where the editor’s pen goes,
   heavy ink rules, 1px hairlines inside.

   The page is one screen: name and bio hold the room, and the
   three sections are collapsed drawers (native <details>) that
   open in place. One motion idea: things settle into place.

   Contents
   1. Design tokens (type scale, spacing, colors, fonts)
   2. Base
   3. The sheet (one-screen layout)
   4. Drawers
   5. Clips
   6. About
   7. Newsletter and colophon
   8. Motion
   9. Mobile (600px)
   10. Print
   ============================================================ */

/* ---------- 1. Design tokens ---------- */

:root {
  /* type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.5rem;
  --text-xl: 1.875rem;
  --text-2xl: 2.375rem;
  --text-hero: clamp(3rem, 7vw + 1rem, 6rem);

  /* spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* measures */
  --measure: 33em;   /* running text width */
  --wrap-max: 62rem; /* page container */

  /* recurring details */
  --track-caps: 0.14em; /* letterspacing for all caps labels */
  --settle: 0.45s ease-out; /* the one motion: settle into place */

  /* fonts and colors */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --paper: #FFFFFF;
  --ink: #111111;
  --muted: #6D6D6D;
  --accent: #1F8A4C;
  --hairline: #E6E6E6;
}

/* ---------- 2. Base ---------- */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover { text-decoration-thickness: 2px; }

::selection {
  background: var(--accent);
  color: var(--paper);
}

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

.skip {
  position: absolute;
  left: -100vw;
  top: 0;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-sm);
}

.skip:focus-visible {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 20;
}

.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  width: 100%;
}

/* ---------- 3. The sheet (one-screen layout) ----------
   Collapsed, everything fits one viewport: name, bio, and the
   photo strip fill the room, drawers sit below. The photo is
   the flexible piece — it absorbs whatever height is left, so
   the page meets the bottom edge exactly. Opening a drawer may
   grow the page; that is the only time it scrolls. */

.sheet {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--space-5);
}

.hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-6) var(--space-7);
}

.hero h1 {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.dek {
  margin: 0;
  max-width: var(--measure);
  font-size: var(--text-md);
  line-height: 1.5;
  text-wrap: pretty;
}

/* The photo strip — a wide crop of the full picture; it grows
   and shrinks so the collapsed page always fits the window */
.hero-photo {
  flex: 1 1 0;
  min-height: 6rem;
  max-height: 16rem;
  margin: var(--space-6) 0 0;
  display: flex;
  flex-direction: column;
}

.hero-photo img {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  border: 2px solid var(--ink);
}

.hero-photo figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- 4. Drawers ---------- */

.drawer { border-top: 2px solid var(--ink); }

.drawer:last-child { border-bottom: 2px solid var(--ink); }

.drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  cursor: pointer;
  list-style: none;
}

.drawer summary::-webkit-details-marker { display: none; }

.kicker {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.15s ease;
}

.drawer-ind {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.15s ease;
}

.drawer summary:hover .kicker,
.drawer summary:hover .drawer-ind { color: var(--accent); }

.drawer[open] .drawer-ind {
  transform: rotate(45deg);
  color: var(--ink);
}

.drawer-body { padding-block: var(--space-4) var(--space-7); }

/* ---------- 5. Clips ---------- */

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

.clip {
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--hairline);
}

.clip:first-child { padding-top: var(--space-2); }

.clip:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.clip-meta {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--muted);
}

.clip-hed {
  margin: 0;
  max-width: 30em;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.clip-hed a {
  color: var(--ink);
  text-decoration: none;
}

.clip-hed a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* The forthcoming tease — deliberately unreadable; the real
   information lives in the meta line above it */
.clip-hed--blurred {
  filter: blur(7px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.clip-sum {
  margin: var(--space-2) 0 0;
  max-width: var(--measure);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- 6. About ---------- */

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

.about-text p {
  margin: 0 0 var(--space-5);
  text-wrap: pretty;
}

.about-text p:last-child { margin-bottom: 0; }

/* ---------- 7. Newsletter ---------- */

.foot-note {
  margin: 0 0 var(--space-5);
  max-width: var(--measure);
  font-size: var(--text-sm);
  color: var(--muted);
  text-wrap: pretty;
}

.newsletter-embed {
  display: block;
  width: 100%;
  max-width: 480px;
  height: 150px;
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
}

/* ---------- 8. Motion ----------
   One idea, used twice: things settle into place. The hero
   settles on load; a drawer’s contents settle when it opens.
   Reduced motion shows the final state. */

@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .dek,
  .hero-photo {
    animation: settle var(--settle) both;
  }

  .dek { animation-delay: 0.08s; }

  .hero-photo { animation-delay: 0.16s; }

  .drawer[open] .drawer-body {
    animation: settle var(--settle) both;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- 9. Mobile ---------- */

@media (max-width: 600px) {
  .hero { padding-block: var(--space-5) var(--space-6); }

  .hero-photo { margin-top: var(--space-5); }

  .drawer-body { padding-bottom: var(--space-6); }
}

/* ---------- 10. Print ---------- */

@media print {
  .newsletter-embed { display: none; }
}
