/* hoentaylor.com: the "Paperback" design.
   Rule: all text is black, except on the navy theme color, where it is cream.
   Lines, boxes and buttons may be other colors. */

:root {
  --page: #faf7f0;        /* cream paper */
  --text: #000000;
  --theme: #1f3a5f;       /* deep navy: buttons, top bar, footer, link underlines */
  --on-theme: #faf7f0;    /* text on the theme color */
  --rule: #d6ccba;        /* thin lines */
  --field: #ffffff;       /* form fields */
  --field-border: #6f6656;
  --error: #a4161a;       /* error borders and marks (the message text stays black) */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; color: var(--text); font: 19px/1.6 var(--serif); }
a { color: var(--text); text-decoration-color: var(--theme); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--theme); outline-offset: 3px; }
main:focus { outline: none; }
img { max-width: 100%; height: auto; }
/* Side padding only, so it doesn't cancel main's space above and below the page contents. */
.wrap { max-width: 980px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* "Skip to content": hidden until a keyboard user reaches it */
.skip { position: absolute; left: 12px; top: -100px; z-index: 10; padding: 10px 16px; background: var(--theme); color: var(--on-theme); }
.skip:focus { top: 12px; }
.skip:focus-visible { outline-color: var(--text); }

/* Header and menu */
header.site { text-align: center; padding: 40px 0 0; border-top: 6px solid var(--theme); }
.name { font-size: 44px; line-height: 1.2; letter-spacing: 0.18em; text-transform: uppercase; margin: 0; font-weight: normal; }
.name a { text-decoration: none; }
.tagline { margin: 6px 0 24px; font-style: italic; }
header.site nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
header.site nav ul { list-style: none; margin: 0 auto; padding: 8px 24px; max-width: 980px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 32px; }
header.site nav a { display: inline-block; text-decoration: none; font-size: 18px; letter-spacing: 0.02em; line-height: 2.1; border-bottom: 2px solid transparent; }
header.site nav a:hover { border-bottom-color: var(--theme); }
header.site nav a[aria-current="page"] { border-bottom: 3px solid var(--theme); }

/* Page content */
main { display: block; padding-top: 48px; padding-bottom: 56px; }
h1, h2, h3 { font-weight: normal; line-height: 1.25; }
h1 { font-size: 44px; margin: 0 0 20px; }
h2 { font-size: 30px; margin: 40px 0 12px; }
h3 { font-size: 23px; margin: 28px 0 8px; }
p, ul, ol, blockquote { margin: 0 0 16px; }
.text { max-width: 40em; }                 /* comfortable line length for reading */
.kicker { margin: 0; font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; }
.small { font-size: 16px; }
h1 .small { display: block; font-size: 20px; line-height: 1.4; margin-top: 6px; }   /* a subtitle */
blockquote { border-left: 3px solid var(--rule); padding-left: 20px; margin-left: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
figure { margin: 24px 0; }
figure img { display: block; }

/* Book feature: cover beside text, stacked on phones */
.feature { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.feature + .feature { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--rule); }
.cover { width: 100%; box-shadow: 0 10px 28px rgba(40, 30, 10, 0.28); }
.feature h2 { margin-top: 4px; }
.feature.solo > div { grid-column: 2; }      /* a book with no cover yet lines up with the others */

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.button { display: inline-block; padding: 12px 22px; border-radius: 3px; text-decoration: none; font: inherit; font-size: 17px; line-height: 1.3; border: 2px solid var(--theme); cursor: pointer; }
.primary { background: var(--theme); color: var(--on-theme); }
.secondary { background: transparent; color: var(--text); }
.button:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* Lists of links: stores, articles, stories */
.links { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.links > li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.links .title { font-size: 22px; }
.links p { margin: 4px 0 0; }

/* Three columns on the home page */
.more { border-top: 1px solid var(--rule); margin-top: 56px; padding-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.more h2 { font-size: 24px; margin: 0 0 8px; }
.more p { font-size: 17px; margin-bottom: 10px; }

/* Stories */
/* Every paragraph's first line is indented, with no space between paragraphs.
   A paragraph with class="noindent" (after a scene break, say) isn't indented.
   An empty paragraph, <p></p>, makes a blank line (browsers would otherwise give it no height). */
.story p { margin: 0; text-indent: 1.5em; }
.story .noindent { text-indent: 0; }
.story p:empty { height: 1lh; }
.byline { font-style: italic; }

/* Forms */
form { max-width: 34em; }
.field { margin-bottom: 22px; }
label { display: block; font-weight: bold; margin-bottom: 4px; }
.hint { display: block; font-size: 16px; margin-bottom: 6px; }
input[type="text"], input[type="email"], textarea {
  display: block; width: 100%; padding: 10px 12px; font: inherit; font-size: 18px; color: var(--text);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 3px;
}
textarea { min-height: 12em; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--error); }
.error { font-size: 16px; margin: 6px 0 0; padding-left: 10px; border-left: 4px solid var(--error); }
.notice { padding: 14px 18px; border: 2px solid var(--theme); border-radius: 3px; margin-bottom: 24px; }
.notice.problem { border-color: var(--error); }
.notice p:last-child { margin-bottom: 0; }
/* Hidden trap field for spam robots; people never see it */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Placeholder text written by Claude, to be replaced. The dashed box shows what's still a draft. */
.draft { outline: 2px dashed #b36b00; outline-offset: 4px; }

/* Footer */
footer.site { background: var(--theme); color: var(--on-theme); padding: 24px 0; text-align: center; font-size: 16px; }
footer.site p { margin: 0 0 6px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
footer.site a { display: inline-block; line-height: 2; color: var(--on-theme); text-decoration-color: var(--on-theme); }
footer.site a:focus-visible { outline-color: var(--on-theme); }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  header.site { padding-top: 28px; }
  .name { font-size: 32px; }
  h1 { font-size: 36px; }
  h2 { font-size: 27px; }
  .tagline { margin-bottom: 18px; }
  header.site nav ul { padding: 6px 8px; gap: 0 16px; }
  header.site nav a { font-size: 17px; }
  main { padding-top: 32px; padding-bottom: 40px; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature .cover { max-width: 240px; display: block; margin: 0 auto; }
  .feature.solo > div { grid-column: 1; }
  .more { grid-template-columns: 1fr; gap: 28px; }
}
