/* =============================================================================
   rsjmiller.com — design system
   Extracted directly from the live Squarespace site's theme CSS.

   Key tokens decoded from Squarespace HSL palette:
   --white-hsl:       30, 20%, 96%  → #F8F6F3  warm cream   (site background)
   --lightAccent-hsl: 207, 27%, 16% → #1D2833  deep navy    (primary text, buttons)
   --black-hsl:       36, 92%, 62%  → #F8B841  gold/amber   (accents, links, CTAs)
   --darkAccent-hsl:  196, 48%, 85% → #C6E2EC  pale sky     (light accent)
   --accent-hsl:      0, 0%, 81%    → #CECECE  neutral gray

   Fonts (from --heading-font-* and --body-font-* vars):
   - Helvetica Neue, everywhere
   - Headings: 700 weight, LOWERCASE, -0.03em letter-spacing, 1.1 line-height
   - Body: 400 weight, normal case, 0.01em letter-spacing, 1.4 line-height
   ============================================================================= */

:root {
  /* Palette */
  --bg:             #F8F6F3;   /* warm cream (the site background) */
  --bg-alt:         #FFFFFF;   /* occasional pure white for cards */
  --text:           #1D2833;   /* deep navy — primary text + buttons */
  --text-strong:    #0E1820;   /* darker navy — h1 */
  --text-soft:      #6e6e6e;   /* medium gray */
  --text-tertiary:  #9e9e9e;   /* lighter gray — dates, meta */
  --accent:         #F8B841;   /* gold/amber — links, hover, CTAs */
  --accent-soft:    #FCE4B0;   /* pale gold for hover backgrounds */
  --accent-light:   #C6E2EC;   /* pale sky blue */
  --border:         #e4e4e4;
  --border-light:   #eeeeee;

  /* Fonts */
  --font-sans:      "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Type scale — clamp-based so it fluidly responds to viewport */
  --fs-h1: clamp(2.25rem, 5vw, 3.75rem);   /*  36–60px */
  --fs-h2: clamp(1.75rem, 3.8vw, 2.75rem); /*  28–44px */
  --fs-h3: clamp(1.3rem, 2.5vw, 1.75rem);  /*  21–28px */
  --fs-body:    16px;
  --fs-large:   18px;
  --fs-small:   14px;
  --fs-tiny:    12px;

  /* Heading characteristics */
  --h-tracking: -0.03em;
  --h-weight:   700;
  --h-line:     1.1;

  /* Body characteristics */
  --b-tracking: 0.01em;
  --b-line:     1.55;

  /* Layout */
  --content-max:  1500px;
  --reading-max:  720px;
  --gutter:       max(4vw, 24px);
  --space-xs:     8px;
  --space-sm:     16px;
  --space-md:     24px;
  --space-lg:     40px;
  --space-xl:     64px;
  --space-2xl:    96px;
  --space-3xl:    140px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--b-line);
  letter-spacing: var(--b-tracking);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--accent); }

button {
  font: inherit;
  cursor: pointer;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 16px 36px;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease;
}

button:hover {
  background: var(--accent);
  color: var(--text);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 14px 0;
  background: transparent;
  color: var(--text);
  border: none;
  border-bottom: 1px solid var(--border);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-bottom-color: var(--text);
}

input::placeholder, textarea::placeholder {
  color: var(--text-tertiary);
}

/* ---------- typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--h-weight);
  line-height: var(--h-line);
  letter-spacing: var(--h-tracking);
  text-transform: lowercase;
  color: var(--text-strong);
}

h1 { font-size: var(--fs-h1); margin-bottom: var(--space-md); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--space-sm); }
h3 { font-size: var(--fs-h3); margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
  color: var(--text);
}

p:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; color: var(--text-strong); }
em, i { font-style: italic; }

small {
  font-size: var(--fs-small);
  color: var(--text-soft);
}

blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--accent);
  color: var(--text-soft);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.reading {
  width: 100%;
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- site header (shared) ---------- */
.site-header {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.site-logo {
  display: block;
  flex-shrink: 0;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-nav a {
  color: var(--text);
  text-transform: lowercase;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--text);
  color: var(--text-strong);
}

/* ---------- site footer (shared) ---------- */
.site-footer {
  margin-top: var(--space-3xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-soft);
  font-size: var(--fs-small);
}

.site-footer-links {
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.site-footer-links a {
  color: var(--text);
  transition: color 0.15s;
}

.site-footer-links a:hover { color: var(--accent); }

.site-footer-meta {
  font-size: var(--fs-tiny);
  color: var(--text-tertiary);
  line-height: 2;
}

.site-footer-meta a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-meta a:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 16px 40px;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}

.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
}

/* ---------- post cards (daily archive + discover) ---------- */
.post {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

.post-date {
  color: var(--text-tertiary);
  font-size: var(--fs-tiny);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.post-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: var(--h-tracking);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  text-transform: lowercase;
}

.post-title a {
  color: inherit;
}

.post-title a:hover { color: var(--accent); }

.post-excerpt {
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: var(--space-sm);
  max-width: 680px;
}

.post-link {
  color: var(--text);
  font-size: var(--fs-small);
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}

.post-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- individual post page ---------- */
.post-full {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.post-full .post-title {
  font-size: var(--fs-h1);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.post-full .post-date {
  text-align: center;
  margin-bottom: var(--space-xl);
  font-size: var(--fs-small);
}

.post-full-content {
  font-size: var(--fs-large);
  line-height: 1.65;
  color: var(--text);
}

.post-full-content p { margin-bottom: var(--space-md); }

.post-full-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  color: var(--text-soft);
}

.post-nav a { color: var(--text); }
.post-nav a:hover { color: var(--accent); }

/* ---------- utility ---------- */
.center { text-align: center; }
.muted { color: var(--text-soft); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 700px) {
  :root {
    --space-xl: 48px;
    --space-2xl: 72px;
    --space-3xl: 96px;
  }

  .site-header-inner {
    gap: var(--space-md);
    justify-content: center;
  }

  .site-logo img { height: 40px; }

  .site-nav {
    gap: var(--space-md);
    justify-content: center;
    width: 100%;
    font-size: 13px;
  }

  .btn { padding: 14px 32px; }
}
