/*
Theme Name: Jay Sennett Archive
Theme URI: https://archive.jaysennett.com/
Author: Jay Sennett
Description: Literary archive theme with the supplied gateway as the static homepage and a matching serif blog/entry template.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: jaysennett-archive
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --sienna: #c5481f;
  --sienna-deep: #8b2d13;
  --blush: #f2b49a;
  --cream: #f4e3d8;
  --paper: #fffefe;
  --ink: #0d0d0c;
  --soft-ink: #5f5a56;
  --rule: #d8d0ca;
  --focus: #144b74;
  --display: Didot, "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  --text: Baskerville, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --measure: 70ch;
  --page: 76rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: var(--text);
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--text);
  font-size: clamp(1rem, 0.98rem + 0.22vw, 1.18rem);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

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

.skip-link {
  position: fixed;
  z-index: 100000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--focus);
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Exact static gateway homepage */

.gateway-main {
  min-height: 100svh;
  padding:
    max(1.4rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1.6rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  display: grid;
  place-items: center;
}

.gateway {
  width: min(100%, 72rem);
  display: grid;
  gap: 1.75rem;
  justify-items: center;
}

.circle {
  position: relative;
  isolation: isolate;
  width: min(96vw, 44rem);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: clamp(1.7rem, 5vw, 3.2rem);
  color: #fff;
  background: var(--sienna);
  box-shadow:
    0 0 0 0.95rem var(--blush),
    0 0 0 1.65rem var(--paper);
  overflow: hidden;
}

.circle::before {
  content: none;
}

.circle-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 33rem;
  display: grid;
  justify-items: center;
  text-align: center;
  color: #fff;
}

.eyebrow,
.gateway-title,
.path-title,
.path-subtitle,
.permanent-link {
  font-family: var(--display);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.93);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gateway-title {
  margin: 0;
  color: #fff;
  font-size: clamp(3rem, 8vw, 5.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.intro {
  max-width: 24ch;
  margin: 1rem auto 1.55rem;
  color: rgba(255, 255, 255, 0.93);
  font-size: 1rem;
  line-height: 1.4;
}

.path-list {
  width: 100%;
  max-width: 29rem;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem;
  align-items: start;
  justify-items: center;
}

.path-item {
  width: 100%;
  display: grid;
  justify-items: center;
}

.path-circle {
  width: 100%;
  max-width: 12.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 1.2rem 1.05rem;
  text-align: center;
  text-decoration: none;
}

a.path-circle:hover,
a.path-circle:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.path-circle-coming {
  cursor: default;
}

.path-circle > span {
  display: block;
}

.path-title {
  font-size: clamp(1.08rem, 2.6vw, 1.42rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.path-subtitle {
  margin-top: 0.42rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  line-height: 1.2;
  letter-spacing: 0.025em;
  text-wrap: balance;
}

.permanent-link {
  color: var(--soft-ink);
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

/* Shared masthead for blog, pages, and entries */

.site-masthead {
  min-height: 7.4rem;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1.35rem, env(safe-area-inset-right))
    1rem
    max(1.35rem, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  background: var(--cream);
}

.site-monogram {
  display: block;
  width: 6rem;
  color: var(--sienna);
  text-decoration: none;
}

.site-monogram img {
  display: block;
  width: 100%;
}

/* Brand mark / breadcrumb */

.brandmark-hero {
  min-height: 29rem;
  display: grid;
  place-items: center;
  padding: 3.25rem 1.5rem;
  color: #000;
  background: var(--sienna);
}

.brandmark {
  width: min(18rem, 86vw);
  margin: 0;
  font-family: var(--display);
}

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

.brandmark-label,
.brandmark-current {
  display: block;
  width: 100%;
  padding: 0.62rem 0.55rem 0.55rem;
  color: var(--ink);
  background: var(--blush);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--display);
}

.brandmark-label {
  font-size: 1.28rem;
  letter-spacing: 0.015em;
}

.brandmark-current {
  font-size: 0.78rem;
  line-height: 1.25;
  letter-spacing: 0.045em;
}

.brandmark-nodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.05rem;
  padding: 0.4rem 0.95rem;
}

.brandmark-node {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #000;
}

.brandmark-rule {
  height: 1.2rem;
  margin: 0 0.95rem;
  background: var(--blush);
}

/* Blog index */

.blog-shell,
.content-shell {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
  padding: clamp(4.75rem, 12vw, 8rem) 0 clamp(5rem, 12vw, 9rem);
}

.blog-shell {
  max-width: var(--page);
}

.blog-title,
.entry-title,
.page-title,
.post-card-title,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.site-footer {
  font-family: var(--display);
}

.blog-title,
.page-title {
  max-width: 14ch;
  margin: 0 0 clamp(2.8rem, 7vw, 4.5rem);
  font-size: clamp(3.6rem, 9.2vw, 7.2rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

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

.post-card {
  max-width: var(--measure);
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.post-card:last-child {
  border-bottom: 1px solid var(--rule);
}

.post-card-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08;
}

.post-card-title a {
  color: var(--ink);
  text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus-visible {
  color: var(--sienna-deep);
  text-decoration: underline;
}

.post-meta,
.entry-deck {
  color: var(--soft-ink);
}

.post-meta {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.post-excerpt {
  margin: 0;
  max-width: var(--measure);
}

.pagination {
  margin-top: 2rem;
}

/* Single post and page template */

.entry {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
  padding: clamp(4.75rem, 12vw, 8rem) 0 clamp(5rem, 12vw, 9rem);
}

.entry-inner {
  max-width: var(--measure);
}

.entry-title {
  max-width: 14ch;
  margin: 0 0 1.3rem;
  font-size: clamp(3.6rem, 9.2vw, 7.2rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.entry-deck {
  margin: 0 0 clamp(2.8rem, 7vw, 4.5rem);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.entry-content {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2rem, 6vw, 3.2rem) 0;
}

.entry-content > * {
  max-width: var(--measure);
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content figure {
  margin-top: 0;
  margin-bottom: 1.45rem;
}

.entry-content h2 {
  margin: 2.6rem 0 1rem;
  color: var(--sienna-deep);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.08;
}

.entry-content h3 {
  margin: 2rem 0 0.85rem;
  color: var(--sienna-deep);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.12;
}

.entry-content blockquote {
  margin: 1.55rem 0 1.5rem;
  padding-left: clamp(1rem, 4vw, 1.8rem);
  border-left: 0.25rem solid var(--sienna);
  font-size: clamp(1.24rem, 3.3vw, 1.68rem);
  line-height: 1.55;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content cite {
  font-style: italic;
}

.entry-content .wp-block-group {
  margin: 2rem 0 1.7rem;
  padding: 1.35rem 1.45rem 1.45rem;
  background: var(--cream);
  border-left: 0.35rem solid var(--sienna);
}

.entry-content .wp-block-group > *:last-child {
  margin-bottom: 0;
}

.entry-content .has-small-font-size,
.entry-content figcaption,
.entry-content .wp-block-footnotes {
  color: var(--soft-ink);
}

.entry-content .alignwide {
  width: min(100vw - 2rem, 90rem);
  max-width: none;
}

.entry-content .alignfull {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
}

.site-footer {
  width: min(100% - 2rem, var(--page));
  margin-inline: auto;
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  color: var(--soft-ink);
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
}

.search-form {
  max-width: var(--measure);
  display: flex;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.search-form label {
  flex: 1;
}

.search-field,
.search-submit {
  min-height: 2.9rem;
  border: 1px solid var(--ink);
}

.search-field {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: var(--paper);
}

.search-submit {
  padding: 0.65rem 1rem;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed !important;
  z-index: 100000;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1rem;
  clip: auto;
  color: #fff;
  background: var(--focus);
}

@media (max-width: 28rem) {
  .gateway-main {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .circle {
    width: min(96vw, 33rem);
    padding: 1.35rem;
    box-shadow:
      0 0 0 0.68rem var(--blush),
      0 0 0 1.14rem var(--paper);
  }

  .circle-inner {
    max-width: 24rem;
  }

  .gateway-title {
    font-size: clamp(2.45rem, 10vw, 3.55rem);
    line-height: 1;
  }

  .intro {
    margin: 0.75rem auto 1rem;
    font-size: 0.9rem;
  }

  .path-list {
    max-width: 20.5rem;
    gap: 0.78rem;
  }

  .path-circle {
    max-width: 9.2rem;
    padding: 0.86rem 0.74rem;
  }

  .path-title {
    font-size: 0.94rem;
    line-height: 1.06;
  }

  .path-subtitle {
    margin-top: 0.28rem;
    font-size: 0.64rem;
    line-height: 1.18;
  }

  .permanent-link {
    max-width: 28ch;
    font-size: 0.9rem;
  }

  .site-masthead {
    min-height: 7rem;
  }

  .site-monogram {
    width: 5.3rem;
  }

  .brandmark-hero {
    min-height: 29rem;
  }

  .entry,
  .blog-shell,
  .content-shell,
  .site-footer {
    width: min(100% - 1.75rem, var(--page));
  }

  .entry,
  .blog-shell,
  .content-shell {
    padding-top: 4.7rem;
  }

  .entry-title,
  .blog-title,
  .page-title {
    font-size: clamp(3.55rem, 15vw, 4.7rem);
    line-height: 1.02;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media print {
  .circle,
  .brandmark-hero {
    box-shadow: none;
    border: 1px solid #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
