/* ===================================================
   Eatough.net — Family Site Stylesheet
   Warm & inviting design, 2025 refresh
   =================================================== */

/* Google Fonts — loaded in HTML via <link> */

/* --- Custom Properties --- */
:root {
  --color-bg:        #FAFAF7;
  --color-parchment: #F5F0E8;
  --color-header-bg: #7A5C3A;
  --color-header-text: #FDF6ED;
  --color-accent:    #5C7A4E;
  --color-text:      #2D2816;
  --color-text-muted:#6B5E48;
  --color-link:      #6B4226;
  --color-link-hover:#9B6240;
  --color-border:    #D4C4A8;
  --color-card-hover:#EDE5D4;

  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'Lato', Arial, sans-serif;

  --max-width: 900px;
  --radius:    8px;
  --shadow:    0 2px 8px rgba(90, 60, 20, 0.10);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }

/* --- Layout --- */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Site Header --- */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  padding: 1rem 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-header__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-header-text);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-header__title:hover {
  color: #FFE8C8;
  text-decoration: none;
}

.site-header__home {
  font-size: 0.9rem;
  color: #D4B896;
  text-decoration: none;
  border: 1px solid rgba(212, 184, 150, 0.5);
  padding: 0.3em 0.75em;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}

.site-header__home:hover {
  background: rgba(255,255,255,0.1);
  color: var(--color-header-text);
  text-decoration: none;
}

/* --- Main Content --- */
.site-main {
  flex: 1;
  padding: 2rem 0 3rem;
}

/* --- Page Header (below site header, within content) --- */
.page-hero {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-hero__title {
  font-size: 2rem;
  color: var(--color-header-bg);
  margin-bottom: 0.3em;
}

.page-hero__subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  font-style: italic;
  margin: 0;
}

/* --- Parchment content card --- */
.page-content {
  background: var(--color-parchment);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
}

/* --- Homepage navigation cards --- */
.section-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.family-card {
  display: flex;
  flex-direction: column;
  background: var(--color-parchment);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.family-card:hover {
  background: var(--color-card-hover);
  box-shadow: 0 4px 14px rgba(90, 60, 20, 0.16);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.family-card__name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-link);
  margin-bottom: 0.3em;
}

.family-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  flex: 1;
}

.family-card__arrow {
  font-size: 0.8rem;
  color: var(--color-border);
  margin-top: 0.75rem;
  align-self: flex-end;
}

/* --- External links list --- */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--color-border);
  font-size: 0.95rem;
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list a {
  font-weight: 600;
}

/* --- Page with photo layout --- */
.page-intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.page-intro__text { flex: 1; min-width: 220px; }
.page-intro__image { flex-shrink: 0; }
.page-intro__image img {
  border-radius: var(--radius);
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow);
}

/* --- Photo pair row --- */
.photo-pair {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.photo-pair figure {
  flex: 1;
  min-width: 160px;
  margin: 0;
  text-align: center;
}

.photo-pair img {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
}

.photo-pair figcaption {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
  font-style: italic;
}

/* --- Archive grid (Michele's photo archive) --- */
.archive-section {
  margin-bottom: 2rem;
}

.archive-section h3 {
  color: var(--color-header-bg);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.archive-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-parchment);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem 0.5rem;
  transition: background 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}

.archive-item:hover {
  background: var(--color-card-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text);
}

.archive-item img {
  border-radius: 4px;
  border: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
  object-fit: cover;
  width: 100%;
  max-width: 110px;
  height: 80px;
}

.archive-item span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-link);
  line-height: 1.3;
}

/* --- Software / data tables --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.data-table th {
  text-align: left;
  background: var(--color-header-bg);
  color: var(--color-header-text);
  padding: 0.6rem 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

.data-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) td {
  background: rgba(212, 196, 168, 0.12);
}

.data-table tr.section-row td {
  background: var(--color-parchment);
  font-weight: 700;
  color: var(--color-header-bg);
  font-family: var(--font-heading);
  padding-top: 0.75rem;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

/* --- Inline photo (float) --- */
.float-right {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.float-right img {
  border-radius: var(--radius);
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow);
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* --- Free stuff item cards --- */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.item-card {
  display: flex;
  gap: 2rem;
  background: var(--color-parchment);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.item-card__photos {
  flex-shrink: 0;
  width: 220px;
}

.item-card__photos a {
  display: block;
}

.item-card__photos img {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
}

.item-card__info {
  flex: 1;
  min-width: 0;
}

.item-card__title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.item-card__title h2 {
  margin: 0;
  font-size: 1.3rem;
}

.item-status {
  display: inline-block;
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.7em;
  border-radius: 20px;
  vertical-align: middle;
}

.item-status--available {
  background: #D4EDDA;
  color: #2D6A3F;
  border: 1px solid #A8D5B5;
}

.item-status--claimed {
  background: #E2E3E5;
  color: #3D4349;
  border: 1px solid #C8C9CB;
}

.item-status--pending {
  background: #FFF3CD;
  color: #856404;
  border: 1px solid #FFE08A;
}

.item-card__price {
  display: inline-block;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-header-bg);
  background: #FDE8CB;
  border: 1px solid #E8C89A;
  border-radius: 20px;
  padding: 0.2em 0.75em;
  vertical-align: middle;
  white-space: nowrap;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-header-bg);
  color: #C8A882;
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
}

.site-footer a {
  color: #D4B896;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .page-content {
    padding: 1.25rem 1rem;
  }

  .nav-cards {
    grid-template-columns: 1fr 1fr;
  }

  .page-intro {
    flex-direction: column;
  }

  .float-right {
    float: none;
    margin: 0 0 1rem;
  }
}

@media (max-width: 400px) {
  .nav-cards {
    grid-template-columns: 1fr;
  }
}
