/* ============================================================
   Moshe Mikanovsky — Author site
   Fresh, clean, literary theme
   ============================================================ */

:root {
  --ink: #1c1a24;
  --ink-soft: #4a4658;
  --muted: #6f6b7d;
  --paper: #fbfaf7;
  --paper-2: #f3f1ea;
  --card: #ffffff;
  --line: #e7e3d8;
  --accent: #6a3d5b;      /* deep plum */
  --accent-2: #a4632f;    /* warm amber */
  --accent-soft: #f0e7ec;
  --max: 1120px;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(28, 26, 36, 0.08);
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.4rem; margin: 1.4em 0 .5em; }
h4 { font-size: 1.15rem; margin: 1.3em 0 .4em; }

p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

blockquote {
  margin: 1.6em 0;
  padding: .4em 0 .4em 1.4em;
  border-left: 3px solid var(--accent-2);
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.18rem;
}
blockquote p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

hr { border: none; border-top: 1px solid var(--line); margin: 2.5em 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 74px;
}
.brand { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand small { display: block; font-family: var(--font-sans); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

.menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; }
.menu > li > a {
  display: block; padding: 10px 14px; color: var(--ink-soft);
  font-size: .95rem; font-weight: 500; border-radius: 8px;
}
.menu > li > a:hover, .menu > li.current > a { color: var(--accent); background: var(--accent-soft); text-decoration: none; }

.menu .btn-buy > a {
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 999px; margin-left: 8px;
}
.menu .btn-buy > a:hover { background: #532e48; color: #fff; }

/* dropdown */
.has-sub > .submenu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 8px; list-style: none; margin: 6px 0 0;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink-soft); font-size: .92rem; }
.submenu a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.has-sub > a::after { content: "▾"; font-size: .7em; margin-left: 6px; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; color: var(--accent-2); font-weight: 600; margin-bottom: 14px; }
.hero p.lead { font-size: 1.22rem; color: var(--ink-soft); }
.hero-art img { border-radius: 12px; box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: .18s;
}
.btn:hover { background: #532e48; text-decoration: none; color: #fff; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Page shell ---------- */
.page { padding: 48px 0 80px; }
.page-narrow { max-width: 760px; }
.page-header { margin-bottom: 8px; }
.page-header .eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .76rem; color: var(--accent-2); font-weight: 600; }
.content { font-size: 1.06rem; }
.content img { border-radius: 10px; margin: 1.4em auto; }
.content a { text-decoration: underline; text-underline-offset: 3px; }
.content table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: .98rem; }
.content th, .content td { border-bottom: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.content figure { margin: 1.6em 0; }
.content figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .5em; }

/* ---------- Cards / listings ---------- */
.section-intro { max-width: 720px; color: var(--ink-soft); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 36px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: .18s; display: flex; flex-direction: column; overflow: hidden;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card:not(.has-thumb) .card-body { padding: 26px; }
.card .date { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-2); font-weight: 600; margin-bottom: 10px; }
.card h3 { margin: 0 0 10px; font-size: 1.3rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { color: var(--ink-soft); font-size: .97rem; margin-bottom: 16px; }
.card .more { margin-top: auto; font-weight: 600; font-size: .9rem; }
/* thumbnail */
.card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card.has-thumb:hover .card-thumb img { transform: scale(1.04); }
/* post hero image */
.post-hero { margin: 0 0 8px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper-2); }
.post-hero img { width: 100%; height: auto; display: block; max-height: 460px; object-fit: cover; }

/* feature tiles on home */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 30px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tile h3 { margin-top: 0; font-size: 1.2rem; }
.tile p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 12px; }

.band { background: var(--accent-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; margin: 64px 0; }

/* embeds */
.embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin: 1.6em 0; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-audio { margin: 1.6em 0; }
.embed-audio audio { width: 100%; }

/* store links */
.store-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; }
.store-list a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-decoration: none; font-weight: 500; color: var(--ink); }
.store-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Forms ---------- */
.form { max-width: 560px; margin-top: 28px; }
.form label { display: block; font-weight: 600; font-size: .92rem; margin: 16px 0 6px; }
.form .req { color: var(--accent-2); }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form textarea { min-height: 150px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .btn { margin-top: 20px; border: 0; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc9d6; padding: 52px 0 32px; margin-top: 80px; }
.site-footer a { color: #fff; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: center; }
.footer-brand { font-family: var(--font-serif); font-size: 1.4rem; color: #fff; }
.social { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: .18s;
}
.social a:hover { background: var(--accent); text-decoration: none; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-legal { width: 100%; border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 22px; font-size: .85rem; color: #9a94a6; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-legal a { color: #cfc9d6; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { max-width: 360px; }
  .menu-toggle { display: block; }
  .menu {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 12px; gap: 2px;
    box-shadow: var(--shadow); display: none;
  }
  .menu.open { display: flex; }
  .menu .btn-buy > a { margin: 6px 0 0; text-align: center; }
  .has-sub > .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; margin: 0; }
  .has-sub > a::after { content: ""; }
}

/* Native audio/video inside content */
.content-video video { width: 100%; height: auto; border-radius: 12px; }
.content video { width: 100%; height: auto; border-radius: 12px; }
.content audio { width: 100%; }
/* image galleries from WP */
.content .wp-block-gallery ul.blocks-gallery-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; padding: 0; }
.content .wp-block-gallery figure { margin: 0; }
/* file download block */
.content .wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 1.4em 0; }
.content .wp-block-file object { width: 100% !important; border-radius: 8px; }
.content .wp-block-file__button { background: var(--accent); color: #fff !important; padding: 8px 16px; border-radius: 999px; text-decoration: none !important; font-size: .9rem; }

/* About the author (home) */
.about { padding: 64px 0 8px; }
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center; }
.about-photo img { border-radius: 16px; box-shadow: var(--shadow); background: #000; }
.about-copy .eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; color: var(--accent-2); font-weight: 600; }
.about-copy p { color: var(--ink-soft); }
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .about-photo { max-width: 220px; }
}
