/* ==========================================================================
   michaelmaslansky.com — editorial design system
   Navy #0A1A2F · Brass #C9A227 · Ivory #F8F5EC
   ========================================================================== */

:root {
  --navy: #0A1A2F;
  --navy-soft: #12263F;
  --navy-line: #1E3350;
  --brass: #C9A227;
  --brass-soft: #DDBC55;
  --brass-dark: #A8861D;
  --ivory: #F8F5EC;
  --ivory-deep: #EFEADB;
  --ink: #1C2530;
  --ink-soft: #4A5567;
  --white: #FFFFFF;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 6px;
  --shadow: 0 18px 45px rgba(10, 26, 47, 0.10);
  --shadow-soft: 0 10px 28px rgba(10, 26, 47, 0.07);
  --maxw: 1160px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

html, body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.6em;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h4 { font-size: 1.15rem; }

h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; }

p { margin: 0 0 1.25em; }

a { color: var(--navy); text-decoration-color: rgba(201, 162, 39, 0.55); text-underline-offset: 3px; }
a:hover { color: var(--brass); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}

.lead { font-size: 1.2rem; color: var(--ink-soft); line-height: 1.7; }

.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-navy { background: var(--navy); color: rgba(248, 245, 236, 0.88); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-ivory-deep { background: var(--ivory-deep); }
.section-white { background: var(--white); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 12px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.section-navy .btn:focus-visible,
.cta-band .btn:focus-visible,
.cta-card .btn:focus-visible,
.hero .btn:focus-visible { outline-color: var(--ivory); }
.btn-gold { background: var(--brass); color: var(--navy); border-color: var(--brass); }
.btn-gold:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: #060F1D; border-color: #060F1D; color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid rgba(10, 26, 47, 0.4); padding: 11px 31px; }
.btn-outline:hover { border-color: var(--navy); background: var(--navy); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--ivory); border: 2px solid rgba(248, 245, 236, 0.55); padding: 11px 31px; }
.btn-outline-light:hover { border-color: var(--brass); color: var(--brass-soft); }

.text-link {
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--brass); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand span { color: var(--brass); }
.brand:hover { color: var(--white); }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(248, 245, 236, 0.85);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brass-soft); }
.site-nav .nav-cta { padding: 10px 22px; color: var(--navy); }
.site-nav .nav-cta:hover { color: var(--navy); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(248, 245, 236, 0.3);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ivory);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero ------------------------------------------------------------------- */
.hero {
  background: var(--navy);
  color: rgba(248, 245, 236, 0.9);
  padding: 96px 0 104px;
  position: relative;
  overflow: hidden;
}
.hero h1 { color: var(--white); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}
.hero .lead { color: rgba(248, 245, 236, 0.75); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 2rem; }
.hero-figure { margin: 0; position: relative; z-index: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 24px 50px rgba(4, 10, 19, 0.5);
}
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: -1;
}
.hero-credentials {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--navy-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: rgba(248, 245, 236, 0.6);
}
.hero-credentials strong { color: var(--brass-soft); font-weight: 600; }

/* Page hero (interior) ---------------------------------------------------- */
.page-hero {
  background: var(--navy);
  color: rgba(248, 245, 236, 0.85);
  padding: 72px 0;
}
.page-hero h1 { color: var(--white); max-width: 800px; }
.page-hero .lead { max-width: 720px; color: rgba(248, 245, 236, 0.72); margin-bottom: 0; }

.breadcrumbs {
  font-size: 0.85rem;
  margin-bottom: 1.6rem;
  color: rgba(248, 245, 236, 0.55);
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(248, 245, 236, 0.35); }
.breadcrumbs a { color: rgba(248, 245, 236, 0.7); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brass-soft); }
.breadcrumbs [aria-current="page"] { color: var(--brass-soft); }

/* Cards ------------------------------------------------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.card {
  background: var(--white);
  border: 1px solid rgba(10, 26, 47, 0.08);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--ink-soft); font-size: 0.98rem; flex-grow: 1; }
.card .text-link { align-self: flex-start; }
.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  border-radius: 50%;
}
.card-icon svg { width: 24px; height: 24px; }

/* Pull quote ------------------------------------------------------------- */
.pullquote {
  border-left: 3px solid var(--brass);
  padding: 0.4rem 0 0.4rem 2rem;
  margin: 2.4rem 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--navy);
}
.pullquote cite {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
.section-navy .pullquote { color: var(--ivory); }

/* Testimonials ------------------------------------------------------------ */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.testimonial {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: 34px 30px;
  margin: 0;
}
.testimonial p {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
  color: rgba(248, 245, 236, 0.92);
  line-height: 1.65;
}
.testimonial footer { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-soft); }

/* Book block -------------------------------------------------------------- */
.book-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.book-cover-wrap { margin: 0; filter: drop-shadow(0 24px 40px rgba(10, 26, 47, 0.25)); }

/* Split layout ------------------------------------------------------------ */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; }
.split figure { margin: 0; }

/* Photography --------------------------------------------------------------- */
.photo-figure { margin: 0; }
.photo-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.photo-figure.portrait img { aspect-ratio: 4 / 5; }
.photo-figure figcaption {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.prose .photo-figure { margin: 0 0 2.6rem; }

/* Checklist --------------------------------------------------------------- */
.checklist { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 0.9rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 18px;
  height: 18px;
  background: var(--brass);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

/* Stats ------------------------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; text-align: center; }
.stat-number { font-family: var(--serif); font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--brass); font-weight: 600; line-height: 1; }
.stat-label { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.6rem; color: rgba(248, 245, 236, 0.65); }

/* CTA band ---------------------------------------------------------------- */
.cta-band { background: var(--navy); color: rgba(248, 245, 236, 0.85); padding: 80px 0; text-align: center; }
.cta-band h2 { color: var(--white); max-width: 680px; margin-left: auto; margin-right: auto; }
.cta-band p { max-width: 560px; margin-left: auto; margin-right: auto; color: rgba(248, 245, 236, 0.7); }
.cta-band .btn { margin-top: 1.2rem; }

/* Prose (long-form pages) -------------------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }

/* Blog index -------------------------------------------------------------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.post-card {
  background: var(--white);
  border: 1px solid rgba(10, 26, 47, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card > a { display: block; }
.post-card > a img { width: 100%; aspect-ratio: 40 / 21; object-fit: cover; }
.post-card-body { padding: 28px 28px 32px; display: flex; flex-direction: column; flex-grow: 1; }
.post-card .post-meta { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.7rem; }
.post-card h2, .post-card h3 { font-size: 1.35rem; }
.post-card h2 a, .post-card h3 a { text-decoration: none; color: var(--navy); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--brass); }
.post-card p { color: var(--ink-soft); font-size: 0.97rem; flex-grow: 1; }

/* Blog post — 3-column layout ---------------------------------------------- */
.post-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
  padding: 72px 0 96px;
}
.post-toc { position: sticky; top: 108px; }
.post-toc h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}
.post-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(10, 26, 47, 0.15); }
.post-toc li { margin: 0; }
.post-toc a {
  display: block;
  padding: 7px 0 7px 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  line-height: 1.4;
}
.post-toc a:hover { color: var(--navy); }
.post-toc a.active { color: var(--navy); font-weight: 600; border-left-color: var(--brass); }

.post-article { max-width: 720px; }
.post-article > figure { margin: 0 0 2.4rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-article > figure img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.post-article h2 { margin-top: 2.2em; scroll-margin-top: 110px; }
.post-article ul, .post-article ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.post-article li { margin-bottom: 0.5em; }
.post-kicker { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.4rem; font-weight: 600; }
.post-byline { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 2rem; }

.post-aside { position: sticky; top: 108px; }
.cta-card {
  background: var(--navy);
  color: rgba(248, 245, 236, 0.85);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
}
.cta-card h3 { color: var(--white); font-size: 1.3rem; }
.cta-card p { font-size: 0.95rem; color: rgba(248, 245, 236, 0.72); }
.cta-card .btn { width: 100%; text-align: center; margin-top: 0.4rem; }
.cta-card-book {
  margin-top: 28px;
  background: var(--white);
  border: 1px solid rgba(10, 26, 47, 0.1);
  color: var(--ink-soft);
}
.cta-card-book h3 { color: var(--navy); }
.cta-card-book p { color: var(--ink-soft); }

/* Contact form ------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid rgba(10, 26, 47, 0.2);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }

.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; align-items: start; }
.contact-aside {
  background: var(--white);
  border: 1px solid rgba(10, 26, 47, 0.08);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-soft);
}
.contact-aside h3 { font-size: 1.2rem; }
.contact-aside ul { list-style: none; margin: 0; padding: 0; }
.contact-aside li { margin-bottom: 0.8rem; color: var(--ink-soft); }

/* Footer -------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: rgba(248, 245, 236, 0.7); padding: 72px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--navy-line);
}
.footer-brand .brand { font-size: 1.3rem; }
.footer-brand p { font-size: 0.93rem; margin-top: 1rem; color: rgba(248, 245, 236, 0.55); max-width: 320px; }
.site-footer h4 {
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.65rem; }
.site-footer a { color: rgba(248, 245, 236, 0.7); text-decoration: none; font-size: 0.95rem; }
.site-footer a:hover { color: var(--brass-soft); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 0;
  font-size: 0.85rem;
  color: rgba(248, 245, 236, 0.45);
}
.footer-bottom a { font-size: 0.85rem; color: rgba(248, 245, 236, 0.55); margin-left: 18px; }

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .post-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .post-aside { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
  .cta-card-book { margin-top: 0; }
}

@media (max-width: 900px) {
  .hero-grid, .split, .book-block, .contact-layout { grid-template-columns: 1fr; gap: 44px; }
  .hero-figure { max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .section { padding: 64px 0; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--navy-line);
    padding: 12px 24px 24px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; width: 100%; font-size: 1.05rem; }
  .site-nav .nav-cta { margin-top: 12px; text-align: center; }

  .post-layout { grid-template-columns: 1fr; padding-top: 48px; }
  .post-toc { position: static; order: 1; }
  .post-article { order: 2; }
  .post-aside { order: 3; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 64px 0 72px; }
  .footer-bottom { flex-direction: column; }
  .footer-bottom a { margin-left: 0; margin-right: 18px; }
}
