@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Space+Mono:wght@400;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ===================================================================
   Maysoft / Frank Paolino author site — single shared stylesheet.
   Every page links to this one file. Pages should not carry their
   own <style> blocks — if a page needs a new visual treatment, add
   it here as a new class instead of inlining it on the page.
   =================================================================== */

:root {
  --blue: #3B5BFF;
  --blue-deep: #2C48E0;
  --ink: #1E1B4B;
  --ink-soft: #5B577E;
  --bg: #F5F6FF;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #FFFFFF;
  --line: rgba(30, 27, 75, 0.10);
  --glow: 0 10px 30px rgba(59, 91, 255, 0.22);
  --glow-lg: 0 20px 55px rgba(59, 91, 255, 0.30);
  --radius: 24px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(59,91,255,0.16), transparent 42%),
    radial-gradient(circle at 95% 15%, rgba(59,91,255,0.12), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(59,91,255,0.10), transparent 50%);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

/* ---------- Nav bar ---------- */

.brandbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(246, 244, 255, 0.75);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brandbar .name {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brandbar a.back {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.brandbar a.back:hover {
  background: var(--blue);
  color: #fff;
}

/* ---------- Article / typography ---------- */

article {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.eyebrow {
  display: inline-block;
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 16px;
}

h1 {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}

h2 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--ink);
  margin: 56px 0 18px;
  letter-spacing: -0.01em;
}

h3 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 8px;
}

h4 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 6px;
}

.dek {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 28px;
}

p { line-height: 1.7; margin: 0 0 18px; }
a { color: var(--blue); }

blockquote {
  margin: 32px 0;
  padding: 22px 26px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  font-family: "Sora", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 1.08rem;
  color: var(--ink);
}
blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 30px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-lg);
  background: var(--blue-deep);
}

.secondary {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 8px 8px 0;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.secondary:hover {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.cta-band {
  margin-top: 56px;
  padding: 38px 32px;
  border-radius: var(--radius);
  background: var(--blue);
  text-align: center;
  box-shadow: var(--glow-lg);
}
.cta-band p {
  margin: 0 0 18px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.cta-band .secondary {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.14);
}
.cta-band .secondary:hover {
  background: #fff;
  color: var(--ink);
}

/* ---------- Footer ---------- */

footer {
  text-align: center;
  padding: 40px 24px 64px;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
footer a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
footer a:hover { color: var(--blue); }
.social-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  vertical-align: middle;
}

/* ---------- Form fields (shared by every form on the site) ---------- */

input[type="email"],
input[type="text"],
textarea {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  width: 100%;
  max-width: 480px;
}
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59, 91, 255, 0.18);
}
textarea { min-height: 130px; resize: vertical; }

.form-row { margin-bottom: 18px; }
.form-row label,
.mailing-list-form label {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

/* ---------- Book grid (Books page) ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0 32px;
}
.book-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-lg);
}
.book-card img {
  width: 100%;
  height: auto;
  display: block;
}
.book-card .book-info {
  padding: 16px 18px;
}
.book-card .book-info h4 { margin: 0 0 6px; }
.book-card .book-link {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
}

.retailer-links a {
  margin-right: 16px;
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Large inline book cover, alternating sides (Books page feature blocks) */
.book-feature-cover {
  width: 190px;
  max-width: 42%;
  height: auto;
  box-shadow: var(--glow);
  border-radius: 10px;
  margin: 4px 0 16px 0;
}
.book-feature-cover.float-right { float: right; margin-left: 24px; }
.book-feature-cover.float-left { float: left; margin-right: 24px; }
@media (max-width: 560px) {
  .book-feature-cover.float-right,
  .book-feature-cover.float-left {
    float: none;
    display: block;
    width: 150px;
    max-width: 55%;
    margin: 0 auto 20px auto;
  }
}

/* Same idea, used inline on the About page's history section */
.book-cover-inline {
  float: right;
  width: 170px;
  max-width: 42%;
  height: auto;
  margin: 4px 0 16px 24px;
  box-shadow: var(--glow);
  border-radius: 10px;
}
.book-cover-inline.float-left { float: left; margin: 4px 24px 16px 0; }
@media (max-width: 560px) {
  .book-cover-inline,
  .book-cover-inline.float-left {
    float: none;
    display: block;
    width: 150px;
    max-width: 55%;
    margin: 0 auto 20px auto;
  }
}

/* Landing-page three-book spotlight */
/* Book coverflow: 3D carousel, one cover forward and scaled up, the
   rest angled and receding behind it. Click a side cover to bring it
   forward; click the forward cover to follow its Amazon link. Works
   for any number of books — just add or remove .coverflow-item
   entries in the markup. Needs the small inline <script> that ships
   alongside this markup (see the page that uses it) — this stylesheet
   only supplies the look. */
.book-coverflow {
  position: relative;
  margin: 24px 0 16px;
  padding: 20px 52px;
}
.coverflow-track {
  position: relative;
  height: 380px;
  perspective: 1400px;
}
.coverflow-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.5s ease;
}
.coverflow-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: var(--glow-lg);
}
.coverflow-item.is-active img {
  box-shadow: var(--glow-lg), 0 0 0 3px var(--blue);
}
.coverflow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--panel-solid);
  box-shadow: var(--glow);
  color: var(--blue);
  font-size: 1.2rem;
  font-family: "IBM Plex Sans", sans-serif;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.coverflow-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow: var(--glow-lg);
}
.coverflow-arrow.prev { left: 0; }
.coverflow-arrow.next { right: 0; }
@media (max-width: 640px) {
  .book-coverflow { padding: 16px 40px; }
  .coverflow-track { height: 300px; }
  .coverflow-item { width: 130px; }
  .coverflow-arrow { width: 36px; height: 36px; font-size: 1rem; }
}

/* ---------- Portrait photos ---------- */

.landing-photo,
.frank-photo {
  float: right;
  width: 190px;
  max-width: 40%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--glow);
  margin: 4px 0 16px 28px;
}
@media (max-width: 560px) {
  .landing-photo,
  .frank-photo {
    float: none;
    display: block;
    width: 150px;
    max-width: 55%;
    margin: 0 auto 20px auto;
  }
}

/* ---------- Mailing list blocks ---------- */

.landing-mailing-list,
.mailing-list-form {
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  padding: 44px 32px;
}
.landing-mailing-list h2,
.mailing-list-form h2 { margin-top: 0; }
.landing-mailing-list input[type="email"],
.mailing-list-form input[type="email"] {
  width: 100%;
  max-width: 360px;
  margin-bottom: 14px;
}

/* ---------- Contact page ---------- */

.contact-people { margin: 24px 0 32px; }
.person-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  padding: 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--glow);
  background-image:
    linear-gradient(180deg, rgba(30,27,75,0.05) 0%, rgba(30,27,75,0.05) 45%, rgba(30,27,75,0.9) 100%),
    url('https://maysoft.com/info.nsf/buscard.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.person-card .person-name,
.person-card .person-role {
  color: #F4F6F8;
  margin: 0 0 2px 0;
}
.person-card .person-email {
  color: #F4F6F8;
  text-decoration: underline;
}

.contact-form-fields,
.newsletter-contact-form {
  margin: 24px 0;
}

/* ---------- Iris story page: character cards ---------- */

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin: 20px 0 32px 0;
}
.character-card {
  padding: 18px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--glow);
}
.character-card .character-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}
.character-card .character-name { margin: 0 0 2px 0; }
.character-card .character-role {
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 10px 0;
}
.character-card p { margin: 0 0 8px 0; }

.hero-cover {
  width: 200px;
  max-width: 42%;
  height: auto;
  float: right;
  margin: 4px 0 16px 24px;
  box-shadow: var(--glow-lg);
  border-radius: 10px;
}
@media (max-width: 560px) {
  .hero-cover {
    float: none;
    display: block;
    width: 160px;
    max-width: 55%;
    margin: 0 auto 20px auto;
  }
}

.buy-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 32px 0;
}
.buy-tile {
  flex: 1 1 200px;
  text-align: center;
  padding: 20px 14px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--glow);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.buy-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-lg);
}
.buy-tile .buy-tile-label {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

/* ===================================================================
   Blog additions — append this block to the end of site.css.
   Reuses existing tokens (--blue, --ink, --panel, --glow, --radius,
   etc.) so blog pages match the rest of the site automatically.
   =================================================================== */

/* ---------- Blog list (index page) ---------- */

.blog-list {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.blog-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--glow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-lg);
}
.blog-card .blog-thumb {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg);
}
.blog-card .blog-card-body {
  flex: 1;
  min-width: 0;
}
.blog-card h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}
.blog-card .blog-card-excerpt {
  margin: 0 0 10px;
  color: var(--ink-soft);
}
.blog-card .blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}
.blog-card .blog-card-meta .date {
  color: var(--ink-soft);
}
.blog-card .blog-card-meta .tags {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 560px) {
  .blog-card {
    flex-direction: column;
  }
  .blog-card .blog-thumb {
    width: 100%;
    height: 180px;
  }
}

/* ---------- Blog post (single post page) ---------- */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: "Space Mono", monospace;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.post-meta .post-date {
  font-weight: 700;
  color: var(--ink);
}

.post-hero {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--glow);
  margin: 0 0 36px;
  display: block;
}

.post-tags {
  margin: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.post-tags a {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: background 0.2s ease, color 0.2s ease;
}
.post-tags a:hover {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}

/* In-body images within a post's prose (as opposed to .post-hero,
   which sits under the byline before the body starts). */
.post-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--glow);
  margin: 8px 0 28px;
  display: block;
}

/* Responsive 16:9 video embed (YouTube iframe, etc.) */
.post-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--glow);
  margin: 8px 0 28px;
}
.post-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Hide the dek/subtitle line entirely when the field is empty, rather
   than leaving a stray blank heading in the layout. */
.dek:empty {
  display: none;
  margin: 0;
}

/* ---------- Post body (Domino rich-text field) ----------
   The Body field is old Notes rich text — Domino renders it straight
   to bare <p>/<img>/<font>/<b> tags with no classes, and there's no
   way to hand-add classes inside it. Instead, wrap the field in
   <div class="post-body">...</div> on the form (once — this reaches
   every post, old and new, since it's rendered at view time) and
   these rules restyle the bare tags it emits. */

.post-body p {
  line-height: 1.7;
  margin: 0 0 18px;
  color: var(--ink);
}

/* Notes exports blank lines as near-empty <p> tags (just a space, or
   just a <br>). Collapse them instead of leaving big gaps. */
.post-body p:empty,
.post-body p:has(> br:only-child) {
  margin: 0;
  min-height: 0;
}

/* Old copy is wrapped in <font face="Arial">; defer to the site's
   own typeface instead of Arial. */
.post-body font {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* A paragraph whose only content is a bold run is being used as an
   informal subheading ("The Arch", "Building a Brick Oven in One
   Minute") — style it like a real one instead of plain bold text. */
.post-body p:has(> b:only-child) {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 40px 0 8px;
}

.post-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--glow);
  margin: 8px 0 28px;
  display: block;
}

.post-body a {
  color: var(--blue);
}

.post-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--glow);
  margin: 8px 0 28px;
  display: block;
}
