/* El Remanso — calm, warm, elegant */

@font-face { font-family: "Cardo"; src: url("../fonts/cardo-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/cardo-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dmsans.woff") format("woff"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --sand: #f2eadb;
  --paper: #faf6ee;
  --line: #e0d3bd;
  --ink: #3a3027;
  --muted: #7d6e5e;
  --terracotta: #a65a3a;
  --terracotta-dark: #8a4528;
  --olive: #67703f;
  --serif-display: "Cardo", "Iowan Old Style", Georgia, serif;
  --serif-text: "Lora", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 42rem;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: 1.075rem;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-dark); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

/* ---------- Header ---------- */
.hero {
  position: relative;
  height: clamp(340px, 62vh, 640px);
  overflow: hidden;
  background: #6d8fb0;
}
.hero--small { height: clamp(220px, 34vh, 340px); }
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 12%;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,30,60,.18) 0%, rgba(10,30,60,0) 55%, rgba(40,30,20,.22) 100%);
}
.hero__title {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; color: #fff; padding: clamp(3.5rem, 13vh, 8.5rem) 1rem 0;
  text-decoration: none;
}
.hero__title:hover { color: #fff; }
.hero__name {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1; margin: 0; letter-spacing: .01em;
  text-shadow: 0 2px 24px rgba(0,0,0,.28);
}
.hero--small .hero__title { justify-content: center; padding-top: 0; }
.hero--small .hero__name { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero__tagline {
  font-family: var(--sans); font-size: .8rem; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase;
  margin-top: 1rem; opacity: .95;
  text-shadow: 0 1px 10px rgba(0,0,0,.35);
}

/* ---------- Navigation ---------- */
.nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.nav ul {
  list-style: none; margin: 0 auto; padding: 0 1rem;
  display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem 2.25rem;
}
.nav a {
  display: inline-block; padding: 1rem 0 .9rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--terracotta); }

/* ---------- Layout ---------- */
main { padding: 3.5rem 1.25rem 4rem; }
.wrap { max-width: var(--measure); margin: 0 auto; }
.wrap--wide { max-width: 64rem; margin: 0 auto; }

.page-title {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.15;
  text-align: center; margin: 0 0 .5rem;
}
.page-intro { text-align: center; color: var(--muted); margin: 0 auto 3rem; max-width: 34rem; font-style: italic; }

.eyebrow {
  font-family: var(--sans); font-size: .74rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.ornament { text-align: center; color: var(--line); font-size: 1.4rem; letter-spacing: .6em; margin: 3rem 0; }

/* ---------- Post list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4rem; }
.post-card a { color: inherit; text-decoration: none; display: block; }
.post-card__img {
  aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius);
  background: var(--line);
}
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.post-card a:hover .post-card__img img { transform: scale(1.025); }
.post-card__body { text-align: center; padding: 1.5rem .5rem 0; }
.post-card__title {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.2; margin: .5rem 0 .6rem;
}
.post-card a:hover .post-card__title { color: var(--terracotta); }
.post-card__excerpt { color: var(--muted); margin: 0 auto; max-width: 34rem; }
.post-card__more {
  display: inline-block; margin-top: 1rem;
  font-family: var(--sans); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--terracotta);
}

/* ---------- Article ---------- */
.article__header { text-align: center; margin-bottom: 2.5rem; }
.article__title {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 3.2rem); line-height: 1.12; margin: .6rem 0 0;
}
.article__cover { margin: 0 0 2.75rem; }
.article__cover img { width: 100%; border-radius: var(--radius); }
.prose > * + * { margin-top: 1.4em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-family: var(--serif-display); font-weight: 400; font-size: 1.8rem; line-height: 1.25; margin: 2.2em 0 .4em; }
.prose h3 { font-family: var(--serif-display); font-weight: 400; font-size: 1.4rem; margin: 1.8em 0 .3em; }
.prose blockquote { margin: 2em 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--terracotta); font-style: italic; color: var(--muted); }
.prose figure { margin: 2.5rem 0; }
.prose figure img { width: 100%; }
.prose figure img, .gallery img { border-radius: var(--radius); cursor: zoom-in; }
figcaption {
  font-family: var(--sans); font-size: .82rem; color: var(--muted);
  text-align: center; margin-top: .7rem; line-height: 1.5;
}
.prose ul, .prose ol { padding-left: 1.3rem; }


.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

.post-nav {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line); font-family: var(--sans); font-size: .85rem;
}
.post-nav a { text-decoration: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(28,22,16,.92);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 84vh; max-width: 100%; width: auto; border-radius: var(--radius); }
.lightbox p { color: #eadfcd; font-family: var(--sans); font-size: .85rem; margin: .9rem 0 0; text-align: center; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; font-size: 2.2rem; cursor: pointer;
  width: 3rem; height: 3rem; line-height: 1; opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox .lb-close { top: .75rem; right: .75rem; }
.lightbox .lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Forms (comments + ideas) ---------- */
.section-title { font-family: var(--serif-display); font-weight: 400; font-size: 1.9rem; text-align: center; margin: 0 0 .3rem; }
.section-sub { text-align: center; color: var(--muted); font-style: italic; margin: 0 0 2rem; }
.section-title.gallery-title { margin: 3.5rem 0 1.25rem; }
.comments { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--line); }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; }
.form label { display: block; font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.form .optional { text-transform: none; letter-spacing: 0; font-weight: 400; }
.form input[type="text"], .form input[type="url"], .form input[type="password"], .form textarea, .form select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .65rem .8rem;
}
.form textarea { min-height: 7rem; resize: vertical; line-height: 1.6; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(166,90,58,.15); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.form-note { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin: 0; }
.form-status { font-family: var(--sans); font-size: .88rem; margin: 0; }
.form-status.ok { color: var(--olive); }
.form-status.err { color: #a33; }

.btn {
  font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  background: var(--terracotta); color: #fff; border: 0; border-radius: var(--radius);
  padding: .85rem 1.4rem; cursor: pointer;
}
.btn:hover { background: var(--terracotta-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn--ghost { background: transparent; color: var(--terracotta); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--paper); color: var(--terracotta-dark); }
.btn--small { padding: .5rem .8rem; font-size: .7rem; }

.comment-list { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1.75rem; }
.comment__meta { font-family: var(--sans); font-size: .82rem; color: var(--muted); }
.comment__meta strong { color: var(--ink); font-weight: 600; font-size: .92rem; margin-right: .4rem; }
.comment__body { margin: .3rem 0 0; white-space: pre-line; }
.comment__reply {
  margin: 1rem 0 0 1.25rem; padding: .9rem 1.1rem; background: var(--paper);
  border-left: 2px solid var(--terracotta); border-radius: 0 var(--radius) var(--radius) 0;
}
.comment__reply .comment__meta strong { color: var(--terracotta); }
.idea-grid .empty { column-span: all; }
.empty { text-align: center; color: var(--muted); font-style: italic; }

/* ---------- Ideas ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 3.5rem 0 2rem; }
.chip {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .06em;
  background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 99px;
  padding: .45rem 1rem; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.idea-grid { columns: 2 18rem; column-gap: 1.25rem; }
.idea {
  break-inside: avoid; margin: 0 0 1.25rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.idea img { width: 100%; cursor: zoom-in; }
.idea__body { padding: 1.1rem 1.2rem 1.2rem; }
.idea__cat { font-family: var(--sans); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--olive); }
.idea__text { margin: .35rem 0 .6rem; white-space: pre-line; }
.idea__link { font-family: var(--sans); font-size: .85rem; word-break: break-word; }
.idea__by { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.idea .comment__reply { margin: .9rem 0 0; }
.photo-pick { font-family: var(--sans); font-size: .9rem; }
.photo-preview { margin-top: .6rem; max-width: 12rem; border-radius: var(--radius); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: .55rem; top: .5rem; bottom: .5rem; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 2.4rem 2.6rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--sand); border: 1px solid var(--muted);
}
.timeline li.done::before { background: var(--olive); border-color: var(--olive); }
.timeline li.current::before { background: var(--terracotta); border-color: var(--terracotta); box-shadow: 0 0 0 5px rgba(166,90,58,.18); }
.timeline__when { font-family: var(--sans); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.timeline li.current .timeline__when { color: var(--terracotta); font-weight: 600; }
.timeline__title { font-family: var(--serif-display); font-size: 1.55rem; line-height: 1.25; margin: .15rem 0 .2rem; font-weight: 400; }
.timeline li.upcoming .timeline__title { color: var(--muted); }
.timeline__text { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); background: var(--paper);
  text-align: center; padding: 2.5rem 1rem; color: var(--muted);
  font-family: var(--sans); font-size: .82rem; letter-spacing: .04em;
}
.footer__name { font-family: var(--serif-display); font-size: 1.5rem; color: var(--ink); letter-spacing: 0; display: block; margin-bottom: .2rem; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.admin-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.admin-item img { max-width: 16rem; border-radius: var(--radius); margin: .6rem 0; }
.admin-item textarea { width: 100%; font: inherit; font-size: .95rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); min-height: 4rem; margin-top: .6rem; }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.badge { font-family: var(--sans); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 99px; background: var(--line); color: var(--ink); margin-left: .4rem; }
.badge--pending { background: #f1d9a9; }
.badge--approved { background: #d6dfbf; }
.badge--rejected { background: #ecc9c0; }

@media (max-width: 560px) {
  body { font-size: 1.02rem; }
  main { padding-top: 2.5rem; }
  .nav ul { gap: 0 1.25rem; }
  .nav a { font-size: .7rem; letter-spacing: .14em; }
  .gallery { grid-template-columns: 1fr 1fr; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
