/* ============================================
   Caledonia – Ken & Dana Gray
   Warm, personal, unhurried.
   ============================================ */

/* --- Tokens --- */
:root {
  --heather:    #3D2B4A;
  --oatmeal:    #F5F0E8;
  --gold:       #C9A96E;
  --slate:      #6B7B8D;
  --ink:        #1C1C1C;
  --soft-white: #FDFAF5;
  --card-bg:    #FFFFFF;
  --border:     #E5DDD0;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'Inter', system-ui, sans-serif;
}

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

/* --- Base --- */
html { font-size: 18px; scroll-behavior: smooth; }

body {
  background-color: var(--soft-white);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--heather); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* --- Navigation --- */
.nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.25rem 2rem 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link {
  color: var(--oatmeal);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  text-decoration: none;
}

.nav-link.active {
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

/* --- Header (full hero) --- */
.site-header {
  background-color: var(--heather);
  background-image:
    linear-gradient(
      to bottom,
      rgba(30, 16, 40, 0.45) 0%,
      rgba(30, 16, 40, 0.55) 100%
    ),
    url('../images/thistle.jpg');
  background-size: cover;
  background-position: center 30%;
  color: var(--oatmeal);
  padding-bottom: 4rem;
}

.hero {
  text-align: center;
  padding: 3rem 2rem 0;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--oatmeal);
  line-height: 1.05;
}

.hero-rule {
  width: 4rem;
  height: 2px;
  background-color: var(--gold);
  margin: 1.25rem auto;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--oatmeal);
  opacity: 0.8;
}

/* --- Header (compact, inner pages) --- */
.site-header--compact {
  padding-bottom: 1.5rem;
  background-position: center 40%;
}

.page-title-block {
  text-align: center;
  padding: 1.5rem 2rem 0;
}

.site-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--oatmeal);
  letter-spacing: 0.01em;
}

.site-name:hover { text-decoration: none; opacity: 0.85; }

.site-header--compact .hero-rule {
  width: 3rem;
  margin: 0.75rem auto 0;
}

/* --- Main content area --- */
.main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}

/* --- Intro text (home page) --- */
.intro {
  text-align: center;
  padding: 3.5rem 1rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #444;
  font-style: italic;
}

/* --- Cards (home page) --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 4rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(61, 43, 74, 0.1);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--heather);
  margin-bottom: 0.6rem;
}

.card-body {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.card-link {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heather);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
  transition: color 0.2s;
}

.card-link:hover {
  color: var(--gold);
  text-decoration: none;
}

/* --- Inner page styles --- */
.main--page {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.page-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--heather);
  margin-bottom: 0.5rem;
}

.page-intro {
  font-style: italic;
  color: var(--slate);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* --- Prose (About, Contact) --- */
.prose {
  max-width: 640px;
}

.prose p {
  margin-bottom: 1.4rem;
  font-size: 1rem;
  color: #333;
}

.prose em {
  color: var(--slate);
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.contact-email a {
  color: var(--heather);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
}

.contact-email a:hover {
  text-decoration: none;
  color: var(--gold);
}

/* --- Photo album grid --- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.album-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  color: var(--ink);
}

.album-card:hover {
  box-shadow: 0 4px 16px rgba(61, 43, 74, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.album-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--oatmeal);
  overflow: hidden;
}

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.album-thumb--placeholder {
  background: linear-gradient(135deg, var(--oatmeal) 0%, #E8DFC8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-thumb--placeholder::after {
  content: '◻';
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.4;
}

.album-info {
  padding: 0.85rem 1rem;
}

.album-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heather);
  margin-bottom: 0.2rem;
}

.album-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.02em;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--heather);
  color: var(--oatmeal);
  text-align: center;
  padding: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-top: auto;
}

/* --- Resource lists (Learn page) --- */
.resource-section { margin-bottom: 3rem; }

.resource-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--heather);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.resource-list { list-style: none; }

.resource-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.resource-list a { color: var(--heather); }
.resource-list a:hover { color: var(--gold); }

.resource-tag {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .nav { gap: 1.25rem; }
  .cards { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .hero { padding: 2rem 1rem 0; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .card, .album-card { transition: none; }
}
