/* ═══════════════════════════════════════════════════════
   Optionality — Master Stylesheet
   Single CSS for entire site: index, essays/index, essay pages,
   confirmed, privacy.
   Last updated: April 2026
   ═══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --navy:   #0f1f35;
  --navy2:  #1e3a5f;
  --teal:   #2dd4bf;
  --gold:   #fbbf24;
  --slate:  #64748b;
  --light:  #f8fafc;
  --border: #e2e8f0;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(to bottom, #ffffff, var(--light));
  color: #0f172a;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Layout ── */
.wrap { max-width: 900px; margin: 0 auto; padding: 48px 24px 64px; }

/* ════════════════════════════════════════
   HEADER & NAV
   ════════════════════════════════════════ */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 0 18px;
  margin: 0 0 44px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  height: 32px;
  width: auto;
  display: block;
  transform: translateY(1px);
}

.brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .2px;
}

nav a,
.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}

nav a { margin-left: 20px; }

nav a:hover,
.footer-links a:hover { color: var(--navy); }

nav a::after,
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: rgba(45, 212, 191, .65);
  transition: .25s ease;
}

nav a:hover::after,
.footer-links a:hover::after { width: 100%; }

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */

footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--slate);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-copy  { font-size: 14px; color: var(--slate); }
.footer-links { display: flex; align-items: center; gap: 20px; }
.footer-tagline { margin-top: 16px; font-size: 13px; color: #94a3b8; }

/* ════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════ */

/* Buttons */
.btn {
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary,
button.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover,
button.primary:hover { background: var(--navy2); border-color: var(--navy2); }

.btn.secondary,
button.secondary { border: 1px solid var(--border); color: var(--navy); background: #fff; }
.btn.secondary:hover,
button.secondary:hover { background: #f1f5f9; }

button.btn { font-family: 'Inter', system-ui, -apple-system, sans-serif; border: none; }

/* Card */
.card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
}

/* Note / small text */
.note {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 10px;
  text-align: center;
}

/* Email input (shared across homepage, essays listing) */
input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 0 16px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, .55);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .12);
  outline: none;
  font-size: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

input[type="email"]:focus {
  border-color: rgba(45, 212, 191, .75);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .2);
}

/* Newsletter form row */
.notify-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 12px;
}

.notify-form .btn { height: 42px; padding: 0 20px; }

/* ════════════════════════════════════════
   HOMEPAGE — HERO
   ════════════════════════════════════════ */

/* Fade-in animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.5s; }
.fade-in-3 { animation-delay: 0.9s; }
.fade-in-4 { animation-delay: 1.3s; }
.fade-in-5 { animation-delay: 1.7s; }
.fade-in-6 { animation-delay: 2.1s; }
.fade-in-7 { animation-delay: 2.5s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; animation: none; }
}

/* Hero H1 */
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 42px;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
  text-align: center;
}

h1 span { display: block; }
h1 span + span { margin-top: 6px; }

/* Lead */
.lead {
  font-size: 18px;
  color: var(--slate);
  margin: 0 auto 32px;
  max-width: 64ch;
  text-align: center;
}

/* Actions row */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
  justify-content: center;
}

/* Homepage sections */
section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--navy);
}

p {
  font-size: 15px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin-bottom: 14px;
  color: var(--slate);
}

/* Homepage card (notify) */
.card p { margin-bottom: 14px; }

/* ── Essays teaser grid (homepage) ── */
.essays-teaser-grid { display: grid; gap: 16px; margin-top: 16px; }

.teaser-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  text-decoration: none;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.teaser-card:hover {
  border-color: rgba(45, 212, 191, .5);
  box-shadow: 0 2px 12px rgba(45, 212, 191, .08);
}

.teaser-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: var(--light);
}

.teaser-meta  { display: flex; flex-direction: column; justify-content: center; gap: 4px; }

.teaser-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.teaser-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  color: var(--navy);
  line-height: 1.3;
}

.teaser-excerpt { font-size: 13px; color: var(--slate); line-height: 1.5; }

.essays-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy2);
  text-decoration: none;
  margin-top: 16px;
}

.essays-view-all::after { content: "→"; transition: transform .2s ease; }
.essays-view-all:hover::after { transform: translateX(3px); }

/* ════════════════════════════════════════
   ESSAYS LISTING PAGE  (essays/index.html)
   ════════════════════════════════════════ */

.page-header { margin-bottom: 48px; }

.page-header h1 {
  font-size: 36px;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-align: left;
}

.page-header p {
  font-size: 17px;
  color: var(--slate);
  max-width: 56ch;
  text-align: left;
  margin-bottom: 0;
}

.essays-grid { display: grid; gap: 32px; }

.essay-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
  transition: opacity .2s ease;
}

.essay-card:hover { opacity: 0.8; }
.essay-card:last-child { border-bottom: none; }

.essay-thumb {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: var(--light);
}

.essay-meta { display: flex; flex-direction: column; justify-content: center; gap: 8px; }

.essay-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.essay-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  color: var(--navy);
  line-height: 1.3;
  margin: 0;
}

.essay-subtitle { font-size: 14px; color: var(--slate); font-style: italic; }
.essay-excerpt  { font-size: 14px; color: var(--slate); line-height: 1.6; }
.essay-date     { font-size: 13px; color: #94a3b8; margin-top: 4px; }

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy2);
  margin-top: 4px;
}

.read-link::after { content: "→"; transition: transform .2s ease; }
.essay-card:hover .read-link::after { transform: translateX(3px); }

/* Newsletter signup block (essays listing) */
.notify-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.notify-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 14px;
}

.notify-card {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
}

.notify-card p {
  font-size: 15px;
  color: var(--slate);
  margin-bottom: 16px;
  line-height: 1.6;
}

.notify-note {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 8px;
}

/* ════════════════════════════════════════
   INDIVIDUAL ESSAY PAGES
   ════════════════════════════════════════ */

.article-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 40px;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-align: left;
}

.article-subtitle {
  font-size: 20px;
  color: var(--slate);
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.4;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.article-byline .author { font-weight: 600; color: var(--navy2); }
.article-byline .divider { color: var(--border); }

/* Hero image */
.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  display: block;
}

.hero-credit { font-size: 12px; color: #94a3b8; margin-bottom: 40px; text-align: right; }
.hero-credit a { color: #94a3b8; text-decoration: none; }
.hero-credit a:hover { color: var(--slate); }

/* Article body */
.article-body { max-width: 68ch; }

.article-body p {
  font-size: 17px;
  color: #1e293b;
  margin-bottom: 24px;
  line-height: 1.8;
}

.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  color: var(--navy);
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
  text-align: left;
}

.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 32px 0 12px;
}

/* Block quote */
.article-body blockquote {
  border-left: 3px solid var(--teal);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
}

.article-body blockquote p {
  font-size: 17px;
  color: var(--slate);
  font-style: italic;
  margin-bottom: 0;
}

.article-body blockquote cite {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  font-style: normal;
  margin-top: 8px;
}

/* Pull quote */
.pull-quote {
  border-top: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  padding: 24px 0;
  margin: 40px 0;
}

.pull-quote p {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 0;
  font-style: italic;
}

/* Inline image with caption */
.article-image { margin: 40px 0; }
.article-image img { width: 100%; border-radius: 6px; display: block; }
.article-image figcaption { font-size: 13px; color: #94a3b8; margin-top: 8px; text-align: center; }
.article-image figcaption a { color: #94a3b8; text-decoration: none; }

/* Closing question */
.closing-question {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin: 48px 0 32px;
}

.closing-question .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.closing-question p {
  font-size: 17px;
  color: var(--navy);
  font-style: italic;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Subscribe CTA */
.subscribe-cta {
  background: var(--navy);
  border-radius: 12px;
  padding: 32px;
  margin: 48px 0;
  text-align: center;
}

.subscribe-cta p {
  color: rgba(248, 250, 252, 0.75);
  font-size: 15px;
  margin-bottom: 20px;
}

.subscribe-cta a {
  display: inline-block;
  background: var(--teal);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity .2s;
}

.subscribe-cta a:hover { opacity: 0.85; }

/* Series navigation */
.series-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.series-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy2);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 45%;
}

.series-nav a:hover { color: var(--navy); }
.series-nav .prev::before { content: "←"; flex-shrink: 0; }
.series-nav .next { margin-left: auto; text-align: right; }
.series-nav .next::after  { content: "→"; flex-shrink: 0; }

/* ════════════════════════════════════════
   STANDALONE PAGES (confirmed, privacy)
   ════════════════════════════════════════ */

/* Back button variant */
.btn-back {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all .2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--navy);
  white-space: nowrap;
}
.btn-back:hover { background: #f1f5f9; }

/* Standalone page H1 */
.standalone-wrap { max-width: 780px; margin: 0 auto; padding: 48px 20px 64px; }

.standalone-wrap h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 34px;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-align: left;
}

.standalone-wrap h2 {
  font-size: 20px;
  color: var(--navy);
  margin: 28px 0 10px;
  text-align: left;
}

.standalone-wrap p,
.standalone-wrap li { color: var(--slate); }
.standalone-wrap p  { margin: 0 0 14px; }
.standalone-wrap ul { padding-left: 18px; margin: 0 0 14px; }
.standalone-wrap a  { color: var(--navy2); }

.meta { color: #94a3b8; font-size: 13px; margin-bottom: 24px; }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 600px) {
  h1                   { font-size: 32px; }
  .article-title       { font-size: 28px; }
  .standalone-wrap h1  { font-size: 28px; }
  .hero-image          { height: 240px; }
  nav                  { display: none; }
  header               { margin-bottom: 34px; }

  .footer-top          { flex-direction: column; align-items: flex-start; gap: 16px; }
  .series-nav          { flex-direction: column; }
  .series-nav a        { max-width: 100%; }

  .essay-card          { grid-template-columns: 1fr; }
  .essay-thumb         { width: 100%; height: 180px; }

  .teaser-card         { grid-template-columns: 1fr; }

  .page-header h1,
  .page-header p       { text-align: center; }
}
