/*
 * thecrombies.com - public family landing page.
 * Static, self-contained, no build step. Served by Caddy file_server.
 */

:root {
  --bg: #faf6ef;
  --ink: #2b3a36;
  --muted: #6d7d77;
  --accent: #2f6b56;       /* warm forest green */
  --accent-deep: #234f40;
  --card: #ffffff;
  --line: #e7e0d4;
  --shadow: 0 1px 2px rgba(35, 79, 64, .06), 0 8px 24px rgba(35, 79, 64, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.25rem, 5vw, 3rem) clamp(1.5rem, 4vw, 3rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}

.tagline {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 30ch;
}

.hero-photo { position: relative; }

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: block;
}

.hero-photo figcaption { display: none; }

/* shown only when the photo is missing (onerror adds .placeholder) */
.hero-photo.placeholder img { display: none; }

.hero-photo.placeholder {
  aspect-ratio: 4 / 3;
  border: 2px dashed var(--line);
  border-radius: 18px;
  background:
    repeating-linear-gradient(45deg, #fff 0 14px, #f4eee3 14px 28px);
  display: grid;
  place-items: center;
}

.hero-photo.placeholder figcaption {
  display: block;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
  padding: 1rem;
}

.hero-photo code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1rem .35rem;
  font-size: .82em;
}

/* ---------- Main ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }

.intro {
  max-width: 60ch;
  margin: 1rem auto 3.5rem;
  text-align: center;
  font-size: 1.08rem;
  color: var(--ink);
}

/* ---------- Tools ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  color: var(--accent-deep);
}

.hint { color: var(--muted); font-size: .9rem; }
.lock { margin-right: .15rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 2px 4px rgba(35,79,64,.08), 0 14px 32px rgba(35,79,64,.12);
}

.card-icon { font-size: 1.9rem; display: block; margin-bottom: .6rem; }
.card h3 { font-size: 1.1rem; color: var(--accent-deep); margin-bottom: .2rem; }
.card p { color: var(--muted); font-size: .9rem; }

/* ---------- Archive link ---------- */
.archive-link {
  margin: 4rem auto 0;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 4rem;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
}
