/* Josh Maya — joshmaya.com
   Calm, paper-like, literary. No frameworks. */

:root {
  --paper: #F4ECE0;
  --paper-deep: #EBE3D6;
  --ink: #2A2624;
  --ink-soft: #5C564F;
  --ink-faint: #8A837A;
  --rule: #D4CBBE;
  --note: #7A3E32;
  --note-bg: #F3E4D8;
  --lovebirds: #8A3B32;
  --max: 40rem;
  --wide: 52rem;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(42, 38, 36, 0.45);
}

a:hover {
  text-decoration-color: var(--ink);
}

a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* ----- header / nav ----- */
.site-header {
  max-width: var(--wide);
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: none;
}

.wordmark:hover { text-decoration: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--ink);
}

/* ----- main ----- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4.5rem;
}

.narrow { max-width: var(--max); }

h1, h2, h3 {
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: 2.6rem;
  font-weight: 500;
}

h2 {
  font-size: 1.7rem;
  margin-top: 2.4rem;
}

h3 {
  font-size: 1.28rem;
  margin: 0 0 0.35em;
}

p { margin: 0 0 1.05em; }

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 2rem;
}

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

hr.quiet {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ----- Josh placeholders ----- */
.josh-note {
  font-style: italic;
  color: var(--note);
  background: var(--note-bg);
  padding: 0.05em 0.35em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ----- drawing placeholders ----- */
.drawing-ph {
  border: 1px solid var(--ink);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 1.25rem;
  min-height: 12rem;
}

.drawing-ph.cover {
  aspect-ratio: 3 / 4;
  min-height: 0;
  width: 100%;
}

/* ----- home ----- */
.hero {
  text-align: center;
  padding: 2rem 0 3.25rem;
}

.hero-bird {
  width: 9.5rem;
  margin: 0 auto 1.75rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4rem);
  margin: 0;
  letter-spacing: 0.04em;
}

.hero-rule {
  width: 3.25rem;
  height: 0;
  margin: 1rem auto 0;
  border: 0;
  border-top: 2px solid var(--lovebirds);
  background: none;
  color: inherit;
}

.hero .intro {
  font-size: 1.2rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 auto 0.4rem;
  max-width: 28rem;
}

.featured {
  background: var(--paper-deep);
  padding: 2.4rem 1.75rem 2.2rem;
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 2rem;
  align-items: start;
}

.featured .cover-col { width: 10.5rem; }

.featured .cover-art {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.featured .status {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.15rem 0.55rem;
  margin: 0 0 0.85rem;
}

.featured h2 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  letter-spacing: 0.08em;
}

.featured .meta {
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 0.85rem;
}

.featured-art {
  width: 7rem;
  margin: 1.4rem 0 0;
}

.home-links {
  margin-top: 3rem;
  text-align: center;
  color: var(--ink-soft);
}

.ornament {
  width: 2.4rem;
  margin: 0 auto 1.5rem;
  opacity: 0.9;
}

/* ----- shelf ----- */
.shelf-intro { margin-bottom: 2.25rem; }

.book {
  display: grid;
  grid-template-columns: 8.25rem 1fr;
  gap: 1.6rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}

.book:last-of-type { border-bottom: 0; }

.book .cover-col { width: 8.25rem; }

.book .cover-art {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.book .cover-art.self-frame {
  border: 1px solid #000;
  border: 0;
  background: #fff;
}

.book .cover-art.sketch {
  /* pencil sketch already on blue paper */
}

/* Paper drawings: sit on the page rather than in a frame.
   Paper tones in the JPEGs are matched to --paper; a short
   feathered mask softens the hard crop. Multiply is not used,
   because off-white paper would go muddy over the page. */
.art-paper,
.book .cover-art.paper {
  background: transparent;
  border: 0;
  --feather: 16px;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 var(--feather), #000 calc(100% - var(--feather)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--feather), #000 calc(100% - var(--feather)), transparent 100%);
  -webkit-mask-composite: source-in;
  -webkit-mask-repeat: no-repeat;
  mask-image:
    linear-gradient(to right, transparent 0, #000 var(--feather), #000 calc(100% - var(--feather)), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 var(--feather), #000 calc(100% - var(--feather)), transparent 100%);
  mask-composite: intersect;
  mask-repeat: no-repeat;
}

.about-portrait {
  max-width: 18.5rem;
  margin: 0.1rem 0 1.85rem;
  --feather: 12px;
}

.accent-art {
  width: 12.5rem;
  max-width: 100%;
  margin: 1.15rem 0 0.15rem;
}

.accent-art.tall {
  width: 14.5rem;
}

.book .cover-art.paper {
  background: transparent;
  --feather: 7px;
}

.status {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0.12rem 0.5rem;
  margin: 0 0 0.55rem;
}

.status.coming {
  color: var(--ink);
  border-color: var(--ink);
}

.book .kind {
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 0.55rem;
}

.group-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 2.75rem 0 0.25rem;
}

/* ----- excerpts ----- */
.excerpt {
  margin: 0 0 3.25rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.excerpt:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.excerpt header { margin-bottom: 1.35rem; }

.excerpt .from {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

.poem {
  margin: 0;
  font-family: inherit;
  font-size: 1.08rem;
  line-height: 1.75;
  letter-spacing: 0;
  white-space: pre-wrap;
}

.prose-excerpt {
  font-size: 1.12rem;
  line-height: 1.7;
}

.excerpt-art {
  width: 6.5rem;
  margin: 0 0 1.25rem;
}

.attribution {
  margin-top: 1.25rem;
  color: var(--ink-faint);
  font-size: 0.92rem;
}

/* ----- about / forms ----- */
form.signup {
  margin: 1.25rem 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

form.signup label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

form.signup input[type="email"] {
  font-family: inherit;
  font-size: 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  padding: 0.4rem 0.15rem;
  min-width: 16rem;
  flex: 1;
}

form.signup input[type="email"]::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

form.signup button {
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.4rem 0.95rem;
  cursor: default;
}

.form-note,
.fine-print {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

.buy-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.buy-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}

/* ----- footer ----- */
.site-footer {
  max-width: var(--wide);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-moon {
  width: 2.1rem;
  margin: 0 auto 0.85rem;
}

.site-footer p { margin: 0.2rem 0; }

/* ----- responsive ----- */
@media (max-width: 640px) {
  html { font-size: 17px; }

  .site-header {
    padding: 1.25rem 1.15rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  main { padding: 2rem 1.15rem 3.5rem; }

  h1 { font-size: 2.15rem; }

  .hero { padding: 1.25rem 0 2.25rem; }

  .hero-bird { width: 7.25rem; }

  .featured,
  .book {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .featured { padding: 1.6rem 1.15rem 1.5rem; }

  .featured .cover-col,
  .book .cover-col {
    width: 7.5rem;
  }

  form.signup input[type="email"] {
    min-width: 0;
    width: 100%;
  }

  .poem { font-size: 0.95rem; }
}

@media (min-width: 900px) {
  main { padding-top: 3.25rem; }
}


/* ----- home music ----- */
.home-music-label {
  margin-top: 3.25rem;
}

.album-grid {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 1.15rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.25rem;
}

.album-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.album-card:hover {
  text-decoration: none;
}

.album-card:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.album-card img {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.album-card h3 {
  font-size: 1.15rem;
  margin: 0.7rem 0 0.15rem;
  letter-spacing: 0.02em;
}

.album-card .kind {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
  font-size: 0.98rem;
}

.home-music-links {
  margin: 0;
  color: var(--ink-soft);
}

/* ----- music page ----- */
.artist-links,
.release-links {
  color: var(--ink-soft);
}

.book.release h2 {
  margin-top: 0;
  font-size: 1.7rem;
  letter-spacing: 0.03em;
}

.status.out {
  color: var(--ink);
  border-color: var(--ink);
}

/* ----- footer links ----- */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.2rem 0.55rem;
  margin: 0.45rem 0 0.65rem !important;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

@media (max-width: 640px) {
  .album-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .album-card {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 1rem;
    align-items: start;
  }

  .album-card img {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .album-card h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0.15rem 0 0.2rem;
  }

  .album-card .kind {
    grid-column: 2;
    grid-row: 2;
  }
}


/* ----- cover / title links to sample pages ----- */
a.cover-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.cover-link:hover,
a.cover-link:focus-visible {
  text-decoration: none;
}

.featured h2 a,
.book h3 a {
  color: inherit;
  text-decoration: none;
}

.featured h2 a:hover,
.book h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* ----- home Substack note ----- */
.home-substack {
  margin: 3rem auto 0;
  max-width: 28rem;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}

.home-substack p { margin: 0; }

/* ----- LOVEBIRDS sample page ----- */
.sample-head {
  display: grid;
  grid-template-columns: 8.25rem 1fr;
  gap: 1.6rem;
  align-items: start;
  margin: 0 0 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.sample-head .cover-col { width: 8.25rem; }

.sample-head .cover-art {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.sample-head h1 {
  margin: 0 0 0.45rem;
  font-size: 2rem;
  letter-spacing: 0.08em;
}

.sample-head .meta {
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 0.85rem;
}

.feather-cluster {
  position: relative;
  width: 13.5rem;
  height: 12.25rem;
  max-width: 100%;
  margin: 1.35rem auto 1.6rem;
}

.feather-cluster .feather {
  position: absolute;
  height: auto;
  display: block;
}

.feather-cluster .f1 {
  width: 1.35rem;
  top: 0;
  left: 4.15rem;
}

.feather-cluster .f5 {
  width: 2.2rem;
  top: 3.05rem;
  left: 8.15rem;
}

.feather-cluster .f3 {
  width: 5.15rem;
  top: 5.85rem;
  left: 2.35rem;
}

.sample-foot {
  margin: 2.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}

.sample-foot a + span {
  margin: 0 0.35rem;
}

@media (max-width: 640px) {
  .sample-head {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .sample-head .cover-col { width: 7.5rem; }

  .feather-cluster {
    width: 12.25rem;
    height: 11.25rem;
    margin-left: auto;
    margin-right: auto;
  }
}
