/* The Christmas Project — site styles */

:root {
  --green-900: #12301f;
  --green-800: #1a4430;
  --green-700: #225a3e;
  --green-100: #e6efe8;
  --red-700: #a3202b;
  --red-600: #b8262f;
  --red-100: #f8e4e3;
  --gold: #d9a441;
  --cream: #fbf7f0;
  --paper: #ffffff;
  --ink: #1f2420;
  --ink-soft: #4d564f;
  --line: #e2ddd3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 48, 31, .06), 0 8px 24px rgba(18, 48, 31, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red-700); }
a:hover { color: var(--red-600); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--green-900);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--green-900);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-family: var(--serif); font-size: 1.3rem; font-weight: 700;
}
.brand:hover { color: #fff; }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 1.1rem; gap: 8px; } .brand-mark { width: 30px; height: 30px; } }
@media (max-width: 350px) { .site-header .container { padding: 0 14px; gap: 8px; } .brand { font-size: 1rem; } .nav-toggle { padding: 6px 10px; } }
.brand-mark { width: 34px; height: 34px; flex: none; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .95rem; cursor: pointer;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: rgba(255,255,255,.88); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }
.site-nav a.nav-cta { background: var(--red-600); color: #fff; margin-left: 6px; }
.site-nav a.nav-cta:hover { background: var(--red-700); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--green-900); padding: 8px 20px 18px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { background: var(--green-100); color: var(--green-900); }
.btn-outline { border-color: var(--green-700); color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-700); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--green-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */

.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--green-900);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: .55; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(18,48,31,.92) 0%, rgba(18,48,31,.6) 55%, rgba(18,48,31,.25) 100%);
}
.hero .container { position: relative; z-index: 1; padding-top: clamp(64px, 10vw, 120px); padding-bottom: clamp(64px, 10vw, 120px); }
.hero h1 { color: #fff; font-size: clamp(1.6rem, 7.2vw, 3.4rem); }
.nowrap { white-space: nowrap; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 54ch; color: rgba(255,255,255,.92); margin-bottom: 1.6em; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}

.page-hero { background: var(--green-900); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; margin-bottom: .25em; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 60ch; margin: 0; font-size: 1.1rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--paper); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

.photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--green-100); }
.photo img { width: 100%; height: 100%; object-fit: cover; }

.stat-band { background: var(--red-700); color: #fff; }
.stat-band .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 36px; padding-bottom: 36px; text-align: center; }
.stat-band strong { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.stat-band span { font-size: .95rem; color: rgba(255,255,255,.88); }
@media (max-width: 640px) { .stat-band .container { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--green-100); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px 24px 26px; }
.card-body p { color: var(--ink-soft); margin: 0; }

/* Story quote */
.story {
  background: var(--green-800); color: #fff; border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px); position: relative;
}
.story h2 { color: #fff; }
.story p { color: rgba(255,255,255,.9); font-size: 1.08rem; }

/* Photo mosaic on home */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.mosaic a { border-radius: 10px; overflow: hidden; display: block; background: var(--green-100); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mosaic a:hover img { transform: scale(1.04); }
.mosaic .wide { grid-column: span 2; }
.mosaic .tall { grid-row: span 2; }
@media (max-width: 760px) { .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } }

/* CTA band */
.cta-band { background: var(--green-900); color: #fff; }
.cta-band .container { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
.cta-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 30px; }
.cta-box h3 { color: #fff; font-size: 1.5rem; }
.cta-box p { color: rgba(255,255,255,.85); }
@media (max-width: 760px) { .cta-band .container { grid-template-columns: 1fr; } }

/* Info panels (donate / contact) */
.info-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .info-grid { grid-template-columns: 1fr; } }
.panel { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 36px); }
.panel + .panel { margin-top: 24px; }
.address { font-style: normal; font-size: 1.15rem; line-height: 1.6; padding: 18px 20px; background: var(--cream); border-left: 4px solid var(--red-600); border-radius: 6px; margin: 12px 0 0; }
.gift-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.gift-table th, .gift-table td { text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.gift-table td:last-child { text-align: right; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--red-700); }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line svg { width: 26px; height: 26px; flex: none; color: var(--red-600); margin-top: 3px; }
.contact-line .label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); font-weight: 600; }
.contact-line .value { font-size: 1.2rem; }

/* ---------- Gallery ---------- */

.year-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.year-nav a {
  padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  color: var(--green-800); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.year-nav a:hover { border-color: var(--green-700); }
.year-block { margin-bottom: 56px; scroll-margin-top: 90px; }
.year-block h2 { display: flex; align-items: baseline; gap: 12px; }
.year-block h2 small { font-family: var(--sans); font-size: .95rem; color: var(--ink-soft); font-weight: 500; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gallery-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--green-100); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery-grid a:hover img { transform: scale(1.05); }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(8, 18, 12, .94); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 56px 64px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font-size: .9rem; }
@media (max-width: 600px) { .lightbox { padding: 64px 8px; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 10px; transform: none; } }

/* ---------- Registration form ---------- */

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.form-aside { order: -1; }
.form-aside .panel { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px 28px; align-items: center; padding: 22px 28px; }
.form-aside h3 { font-size: 1.15rem; margin: 0; }
.form-aside ol { padding-left: 1.2em; margin: 0; color: var(--ink-soft); }
.form-aside .hint { margin: 0 !important; }
@media (max-width: 900px) { .form-aside .panel { grid-template-columns: 1fr; } }
.form-aside li { margin-bottom: .3em; }


fieldset {
  min-width: 0;
  border: 0; margin: 0 0 24px; padding: clamp(22px, 4vw, 32px);
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
}
legend {
  float: left; width: 100%; padding: 0; margin-bottom: 18px;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--green-900);
}
legend + * { clear: both; }
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red-600); color: #fff; font-family: var(--sans); font-size: .95rem; margin-right: 10px; vertical-align: 3px;
}

.field-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 18px; }
.col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }
@media (max-width: 640px) { .col-4, .col-3 { grid-column: span 6; } .col-2 { grid-column: span 3; } }

.field label, .field .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.req { color: var(--red-600); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid #cfc9bd; border-radius: 9px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(34, 90, 62, .18);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red-600); background: #fff8f8; }
.field .error { display: none; color: var(--red-700); font-size: .88rem; margin-top: 5px; }
.field.invalid .error { display: block; }
.hint { font-size: .86rem; color: var(--ink-soft); margin-top: 5px; }

.lang-toggle { display: inline-flex; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.lang-toggle button { border: 0; background: transparent; font: inherit; font-weight: 600; padding: 7px 16px; border-radius: 999px; cursor: pointer; color: var(--green-800); }
.lang-toggle button[aria-pressed="true"] { background: var(--green-700); color: #fff; }
.form-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }

.table-wrap { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 12px; }
.members-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.members-table th {
  background: var(--green-800); color: #fff; text-align: left; font-size: .85rem; font-weight: 600;
  padding: 10px 8px; white-space: nowrap;
}
.members-table td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; background: #fff; }
.members-table tr:nth-child(even) td { background: #fcfaf6; }
.members-table input, .members-table select {
  width: 100%; font: inherit; font-size: .95rem; padding: 8px 9px; border: 1.5px solid #cfc9bd; border-radius: 7px; background: #fff; color: var(--ink);
}
.members-table input:focus, .members-table select:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(34, 90, 62, .18); }
.members-table .invalid { border-color: var(--red-600); background: #fff8f8; }
.members-table th.col-id { color: #fff; padding-top: 10px; }
.members-table .col-id { width: 46px; text-align: center; font-weight: 700; color: var(--green-800); padding-top: 16px; }
.members-table .col-age { width: 70px; }
.members-table .col-sex { width: 110px; }
.members-table .col-bday { width: 150px; }
.members-table .col-rel { width: 150px; }
.members-table .col-size { width: 100px; }
.members-table .col-del { width: 40px; }
.del-row { background: none; border: 0; color: var(--red-700); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.del-row:hover { background: var(--red-100); }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.add-row { border: 2px dashed #bfb8aa; background: transparent; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 600; color: var(--green-800); cursor: pointer; }
.add-row:hover { border-color: var(--green-700); background: var(--green-100); }
.member-count { color: var(--ink-soft); font-size: .95rem; }

/* Stack table rows into cards on phones */
@media (max-width: 700px) {
  .table-wrap { border: 0; overflow: visible; }
  .members-table { min-width: 0; }
  .members-table thead { display: none; }
  .members-table, .members-table tbody, .members-table tr, .members-table td { display: block; width: 100%; }
  .members-table tr { border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 14px; padding: 10px 12px; background: #fff; position: relative; }
  .members-table tr:nth-child(even) td, .members-table td { background: transparent; border: 0; padding: 5px 0; }
  .members-table td::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 3px; }
  .members-table td.col-bday, .members-table td.col-age, .members-table td.col-sex,
  .members-table td.col-rel, .members-table td.col-size { width: 100%; }
  .members-table .col-id { text-align: left; padding-top: 4px; width: auto; }
  .members-table .col-id::before { display: inline; margin-right: 6px; }
  .members-table .col-del { position: absolute; top: 6px; right: 8px; width: auto; }
  .members-table .col-del::before { display: none; }
}

.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--green-700); }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.error { color: var(--red-700); }

.notice { background: var(--red-100); border-left: 4px solid var(--red-600); border-radius: 8px; padding: 14px 16px; margin-bottom: 24px; }

.confirmation { text-align: center; }
.confirmation .check-badge { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; }
.confirmation .check-badge svg { width: 38px; height: 38px; }
.summary { text-align: left; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.summary dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; margin: 0 0 18px; }
.summary dt { font-weight: 600; color: var(--ink-soft); }
.summary dd { margin: 0; }
.summary table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.summary th, .summary td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 600px) { .summary dl { grid-template-columns: 1fr; } .summary dt { margin-top: 8px; } }

[hidden] { display: none !important; }

/* ---------- Footer ---------- */

.site-footer { background: #0c2116; color: rgba(255,255,255,.75); padding: 48px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-family: var(--serif); font-size: 1.1rem; margin: 0 0 10px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: rgba(255,255,255,.55); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Print (registration confirmation) ---------- */

@media print {
  .site-header, .site-footer, .page-hero, .no-print, .form-aside { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .panel, fieldset { box-shadow: none; }
}

.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; }
