:root {
  --wood-dark: #4a3220;
  --wood: #7a5230;
  --wood-light: #a97e4f;
  --cream: #faf6ef;
  --paper: #fffdf8;
  --accent: #b4552d;
  --accent-dark: #8f3f20;
  --ink: #2e2118;
  --muted: #6f5b45;
  --line: #e5d8c3;
  --good: #2e7d4f;
  --warn: #a33b2a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

header.site {
  background: linear-gradient(160deg, var(--wood-dark), var(--wood));
  color: #f7ecd9;
  padding: 2.2rem 1.2rem 1.6rem;
  text-align: center;
}

header.site h1 {
  margin: 0 0 0.3rem;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}

header.site p.sub {
  margin: 0;
  color: #e8d5b5;
  font-style: italic;
}

nav.site {
  background: var(--wood-dark);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.4rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

nav.site a {
  color: #f2e3c8;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

nav.site a:hover, nav.site a.active { background: rgba(255,255,255,0.14); }

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}

section.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 1px 4px rgba(74,50,32,0.08);
}

h2 {
  color: var(--wood-dark);
  margin-top: 0;
  font-size: 1.35rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.35rem;
}

h3 { color: var(--wood); margin-bottom: 0.4rem; }

label.field { display: block; margin: 0.7rem 0 0.25rem; font-weight: bold; }

select, input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
  font-family: system-ui, -apple-system, sans-serif;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

textarea { min-height: 4.5rem; resize: vertical; }

.wood-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .wood-grid { grid-template-columns: 1fr 1fr; } }

p.note {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

ul.components { list-style: none; padding: 0; margin: 0.5rem 0; }

ul.components li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--line);
}

ul.components li:last-child { border-bottom: none; }

ul.components input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
  transform: translateY(2px);
}

ul.components .cname { flex: 1; }
ul.components .cprice { font-family: system-ui, sans-serif; color: var(--muted); white-space: nowrap; }

.totals {
  margin-top: 1rem;
  border-top: 2px solid var(--line);
  padding-top: 0.8rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.totals .row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  color: var(--muted);
}

.totals .row.grand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--wood-dark);
  border-top: 1px solid var(--line);
  margin-top: 0.4rem;
  padding-top: 0.6rem;
}

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.6rem;
  font-size: 1.05rem;
  font-family: system-ui, -apple-system, sans-serif;
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.8rem;
}

button:hover, .btn:hover { background: var(--accent-dark); }
button:disabled { background: #b9a88f; cursor: not-allowed; }

.btn-whatsapp { background: #1f7a4d; }
.btn-whatsapp:hover { background: #166039; }

.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.form-status { margin-top: 0.8rem; font-family: system-ui, sans-serif; }
.form-status.ok { color: var(--good); font-weight: bold; }
.form-status.err { color: var(--warn); font-weight: bold; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.gallery-grid figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-grid img { width: 100%; height: auto; display: block; }
.gallery-grid figcaption { padding: 0.5rem 0.7rem; font-size: 0.9rem; color: var(--muted); }

.student-section { margin-top: 2rem; }
.student-section:first-child { margin-top: 1rem; }
.student-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
  color: var(--wood-dark);
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.3rem;
}
.student-blurb { margin: 0.3rem 0 0; color: var(--muted); font-style: italic; }

.gallery-grid figure.photo { cursor: zoom-in; }
.gallery-grid figure.photo:hover img { transform: scale(1.03); }
.gallery-grid figure.photo img { transition: transform 0.2s ease; }
.gallery-grid figure.photo:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(24, 14, 7, 0.92);
  padding: 2.5rem 3.5rem;
}
.lb-frame { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lb-frame img {
  max-width: 100%; max-height: 78vh;
  border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  background: #fff;
}
.lb-cap { color: #f3e9d7; margin-top: 0.6rem; font-size: 1rem; }
.lb-count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #b9a98f; font-size: 0.85rem; }
.lb-close {
  position: absolute; top: 0.8rem; right: 1.2rem;
  background: none; border: none; color: #f3e9d7;
  font-size: 2.2rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.5rem;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; color: #f3e9d7;
  font-size: 2rem; line-height: 1; cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%;
}
.lb-nav:hover { background: rgba(255,255,255,0.25); }
.lb-prev { left: 0.8rem; }
.lb-next { right: 0.8rem; }
@media (max-width: 600px) {
  .lightbox { padding: 3rem 0.5rem; }
  .lb-prev { left: 0.2rem; }
  .lb-next { right: 0.2rem; }
}

.empty-note {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--line);
  border-radius: 10px;
  margin-top: 1rem;
}

.handout-list { list-style: none; padding: 0; margin: 1rem 0 0; }

.handout-list li {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.9rem 0;
  border-bottom: 1px dotted var(--line);
}

.handout-list li:last-child { border-bottom: none; }

.handout-list .hwork { display: block; color: var(--muted); font-size: 0.92rem; }

.handout-list .btn { margin-top: 0; white-space: nowrap; }

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 1rem;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

table.orders {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  margin-top: 1rem;
}

table.orders th, table.orders td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

table.orders th { background: var(--wood-dark); color: #f2e3c8; }
table.orders tr:nth-child(even) td { background: #f8f1e4; }

.order-items { margin: 0; padding-left: 1.1rem; }
.order-items li { margin: 0; }

footer.site {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem 1rem 2.5rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.token-gate { max-width: 420px; margin: 2rem auto; }
.hidden { display: none !important; }
