/* chrisbrogan.com shared styles */
:root {
  --ink: #2a1722;
  --ink-soft: #5c4350;
  --paper: #fff3ec;
  --panel: #ffffff;
  --line: #e9cfc3;
  --sun: #ffb627;
  --rose: #f7a1b3;
  --ember: #ff5a36;
  --plum: #5b2a4a;
  --amber: #f29e4c;
  --accent: var(--sun);
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --gutter: clamp(20px, 5vw, 64px);
}

body.page-about { --accent: var(--rose); }
body.page-services { --accent: var(--ember); }
body.page-board { --accent: var(--plum); }
body.page-books { --accent: var(--amber); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  z-index: 10;
}
.skip:focus { left: 8px; }

/* header */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 22px var(--gutter);
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.site-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(clamp(48px, 9vw, 120px) + 80px) var(--gutter) clamp(56px, 9vw, 120px);
  min-height: clamp(460px, 68vh, 760px);
}
.sun {
  position: absolute;
  right: -9vw;
  top: -10vw;
  width: clamp(280px, 54vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  z-index: 0;
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
  from { transform: translateY(36px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.hero-copy { position: relative; z-index: 1; max-width: 40rem; }
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 8.2vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(20px, 3vw, 36px);
}
.lede {
  font-size: clamp(1.2rem, 1vw + 1rem, 1.5rem);
  line-height: 1.5;
  max-width: 34rem;
  margin: 0 0 32px;
}

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* sections */
.section {
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}
.section.tint { background: #ffe6d8; }
/* two sections that read as one block (home page summary + link rows) */
.section.flush-bottom { padding-bottom: 0; }
.section.flush-top { padding-top: clamp(20px, 3vw, 36px); }
.section.flush-bottom .bio-block:last-child { border-bottom: 0; }
.wrap { max-width: 64rem; margin: 0 auto; }
.section h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.prose { max-width: 38rem; }
.prose p { margin: 0 0 1.1em; }

/* link rows on the home page */
.rows { border-top: 1px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: minmax(8rem, 18rem) 1fr;
  gap: 8px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  align-items: baseline;
}
.row:hover .row-title { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--accent); }
.row-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.row-text { margin: 0; max-width: 34rem; color: var(--ink-soft); }

/* service blocks */
.service {
  display: grid;
  grid-template-columns: minmax(10rem, 17rem) 1fr;
  gap: 10px 40px;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
}
.service:last-of-type { border-bottom: 1px solid var(--ink); }
.service h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0; }
.service p { margin: 0 0 14px; max-width: 36rem; }
.service a { font-family: var(--display); font-weight: 700; }

/* books */
.book {
  display: grid;
  grid-template-columns: clamp(110px, 16vw, 160px) 1fr;
  gap: 24px clamp(24px, 5vw, 56px);
  padding: 30px 0;
  border-top: 1px solid var(--ink);
  align-items: start;
}
.book:last-of-type { border-bottom: 1px solid var(--ink); }
.tile {
  aspect-ratio: 2 / 3;
  background: var(--accent);
  border-radius: 6px 14px 14px 6px;
  padding: 16px 14px;
  display: flex;
  align-items: flex-end;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.7vw, 1.3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  box-shadow: inset 8px 0 0 rgba(42, 23, 34, 0.18);
}
.book:nth-of-type(5n+2) .tile { background: var(--rose); }
.book:nth-of-type(5n+3) .tile { background: var(--sun); }
.book:nth-of-type(5n+4) .tile { background: var(--ember); }
.book:nth-of-type(5n) .tile { background: var(--plum); color: var(--paper); }
.book h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 6px; }
.book .byline { margin: 0 0 14px; color: var(--ink-soft); }
.book p { max-width: 36rem; }

/* block board steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; max-width: 40rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 4px 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.2;
}

/* about page */
.bio-block {
  display: grid;
  grid-template-columns: minmax(10rem, 17rem) 1fr;
  gap: 10px 40px;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
}
.bio-block:last-child { border-bottom: 1px solid var(--ink); }
.bio-block-first { border-top: 0; padding-top: 0; }
.bio-block > h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0; }
.bio-block .prose { max-width: 40rem; }
.plain-list { margin: 0 0 1.1em; padding-left: 1.2em; }
.plain-list li { margin-bottom: 0.6em; padding-left: 0.2em; }
.plain-list li::marker { color: var(--accent); }
.facts { margin: 0; max-width: 40rem; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 4px 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.facts dt { font-family: var(--display); font-weight: 700; }
.facts dd { margin: 0; }
.faq { max-width: 40rem; }
.faq h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 1.6em 0 0.3em;
}
.faq h3:first-child { margin-top: 0; }
.faq p { margin: 0; }

/* Block Board: demo videos and closing band */
.page-board .sun { top: 84px; }
.loop {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: var(--plum) center / cover no-repeat;
}
.loop-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.demos { margin-top: 28px; }
.demo {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px clamp(24px, 4.5vw, 64px);
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
}
.demo:last-child { border-bottom: 1px solid var(--ink); }
.demo h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.demo p { margin: 0; max-width: 28rem; }
.demo:nth-child(1) .loop { background-image: url("/media/loop-3.jpg"); }
.demo:nth-child(2) .loop { background-image: url("/media/loop-2.jpg"); }
.demo:nth-child(3) .loop { background-image: url("/media/loop-1.jpg"); }
.band-section { padding-top: 0; }
.band {
  background: var(--plum);
  color: var(--paper);
  border-radius: 28px;
  padding: clamp(32px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}
.band-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.8vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 17em;
  margin: 0;
}
.btn.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.btn-light:hover { background: transparent; color: var(--paper); }

/* form panel */
.form-panel {
  max-width: 36rem;
  margin-top: 8px;
  min-height: 160px;
}

/* centered letter signup */
#stay-in-touch .wrap { text-align: center; }
#stay-in-touch .prose,
#stay-in-touch .form-panel { margin-left: auto; margin-right: auto; }
#stay-in-touch .form-panel { text-align: left; }
/* the EmailOctopus embed renders a fixed-width block; center it inside the panel */
.form-panel .inline-container,
.form-panel [data-form] ~ .inline-container {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* footer */
.site-footer {
  padding: 40px var(--gutter) 56px;
  border-top: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  font-size: 0.95rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer p { margin: 0; }

/* small screens */
@media (max-width: 720px) {
  .hero { padding-top: calc(clamp(150px, 42vw, 240px) + 70px); }
  .sun { right: -18vw; top: -20vw; width: 74vw; }
  .row, .service, .bio-block { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .site-nav { gap: 0 18px; }
  .site-nav a { padding: 12px 2px; }
  .service a, .site-footer nav a { display: inline-block; padding: 12px 0; }
  .site-footer nav { gap: 0 20px; }
  .page-board .sun { top: 112px; width: 60vw; right: -12vw; }
  .page-board .hero { padding-top: 376px; }
  .facts > div { grid-template-columns: 1fr; }
  .book { grid-template-columns: 110px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sun { animation: none; }
  .btn { transition: none; }
}
