/* ===== LA CASA PEQUEÑA — SHARED STYLES ===== */

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

:root {
  --bg:        #F5F3EE;
  --text:      #2B2B2B;
  --sand:      #C8BFAF;
  --ocean:     #2F4A4F;
  --muted:     #7A7570;
  --border:    #DDD9D3;
  --bg-alt:    #EFEDE7;
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container { max-width: 760px; margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

section { padding: 5.5rem 0; }
section + section { border-top: 1px solid var(--border); }

/* ── Fade in ── */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.75s ease, transform 0.75s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--text); }
h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1.1; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; letter-spacing: -.01em; margin-bottom: 1.75rem; }
h3 { font-size: 1.2rem; margin-bottom: .5rem; }
p  { color: var(--muted); margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

.label {
  display: block;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.25rem;
}

.serif-body {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 2;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  border-radius: 3rem;
  padding: .85rem 2rem;
  font-family: var(--sans);
  font-weight: 400;
  transition: background .22s, color .22s, transform .15s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--ocean); color: var(--bg); border: 1px solid var(--ocean); }
.btn-primary:hover { background: transparent; color: var(--ocean); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--sand); color: var(--text); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(245, 243, 238, .93);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
nav.scrolled { border-color: var(--border); }

.nav-brand { font-family: var(--serif); font-size: 1rem; color: var(--text); text-decoration: none; }

.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a {
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-apply {
  font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ocean); text-decoration: none;
  border: 1px solid var(--ocean); padding: .42rem 1.05rem; border-radius: 2rem;
  transition: background .2s, color .2s;
}
.nav-apply:hover { background: var(--ocean); color: var(--bg); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .25rem; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px 0; transition: all .3s; }

/* ── Page header (inner pages) ── */
.page-header {
  padding: 9rem 0 4rem;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { margin-bottom: 1rem; }
.page-header h1 em { font-style: italic; color: var(--ocean); }
.page-header .sub {
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; color: var(--muted); line-height: 1.9; max-width: 500px;
}

/* ── Ruled list ── */
.ruled-list { list-style: none; border-top: 1px solid var(--border); }
.ruled-list li {
  padding: .9rem 0; border-bottom: 1px solid var(--border);
  font-size: .95rem; color: var(--muted);
  display: flex; align-items: baseline; gap: 1rem;
}
.ruled-list li::before { content: '—'; color: var(--sand); flex-shrink: 0; }

/* ── Dot list ── */
.dot-list { list-style: none; border-top: 1px solid var(--border); }
.dot-list li {
  padding: .85rem 0; border-bottom: 1px solid var(--border);
  font-size: .95rem; color: var(--muted);
  display: flex; align-items: center; gap: 1rem;
}
.dot-list li::before {
  content: ''; display: block; width: 4px; height: 4px;
  border-radius: 50%; background: var(--sand); flex-shrink: 0;
}

/* ── Footer ── */
footer { padding: 3.5rem 0; border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem;
}
.footer-brand { font-family: var(--serif); font-size: 1rem; color: var(--muted); }
.footer-tag { font-size: .78rem; color: var(--sand); letter-spacing: .05em; margin-top: .15rem; }
.footer-links { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Photo placeholder ── */
.photo-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #EAE7E1, #DDD9D3);
  gap: .75rem;
}
.photo-placeholder svg { opacity: .3; }
.photo-placeholder span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .6; }

/* ── Photo item ── */
.photo-item { position: relative; overflow: hidden; background: var(--border); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.photo-item:hover img { transform: scale(1.02); }
.photo-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(to top, rgba(43,43,43,.55), transparent);
  color: rgba(245,243,238,.9); font-family: var(--serif); font-style: italic;
  font-size: .88rem; line-height: 1.5;
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.photo-item:hover .photo-caption { opacity: 1; transform: none; }

.ratio-cinema  { aspect-ratio: 21/9; }
.ratio-wide    { aspect-ratio: 16/9; }
.ratio-square  { aspect-ratio: 1/1; }
.ratio-tall    { aspect-ratio: 3/4; }
.ratio-portrait{ aspect-ratio: 2/3; }

/* ── Lightbox ── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(20,18,16,.95); align-items: center; justify-content: center; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lightbox-img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox-caption { font-family: var(--serif); font-style: italic; font-size: .9rem; color: rgba(245,243,238,.5); text-align: center; }
.lightbox-close, .lightbox-nav {
  position: fixed; background: none; border: 1px solid rgba(245,243,238,.2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(245,243,238,.6); transition: border-color .2s, color .2s;
}
.lightbox-close { top: 1.5rem; right: 1.5rem; width: 42px; height: 42px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.lightbox-nav.prev { left: 1.5rem; }
.lightbox-nav.next { right: 1.5rem; }
.lightbox-close:hover, .lightbox-nav:hover { border-color: rgba(245,243,238,.5); color: rgba(245,243,238,.9); }

/* ── Form ── */
.form-section { margin-bottom: 3rem; }
.form-section-heading {
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--sand); margin-bottom: 2rem; padding-bottom: .7rem; border-bottom: 1px solid var(--border);
}
.form-group { margin-bottom: 1.75rem; }
label { display: block; font-size: .82rem; letter-spacing: .03em; color: var(--text); margin-bottom: .55rem; }
label .opt { color: var(--sand); margin-left: .35rem; }
label .req { color: var(--ocean); margin-left: .15rem; }

input[type="text"], input[type="email"], input[type="url"],
input[type="number"], textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: .5rem; padding: .82rem 1rem;
  font-family: var(--sans); font-size: .95rem; font-weight: 300; color: var(--text);
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(47,74,79,.07);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.7; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.radio-group, .yes-no-group { display: flex; gap: 1.5rem; margin-top: .25rem; flex-wrap: wrap; }
.radio-opt, .yes-no-opt { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .9rem; color: var(--muted); }
.radio-opt input, .yes-no-opt input { width: 1rem; height: 1rem; accent-color: var(--ocean); }

.checkbox-item { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1.1rem; }
.checkbox-item input { width: 1rem; height: 1rem; margin-top: .25rem; accent-color: var(--ocean); flex-shrink: 0; }
.checkbox-item span { font-size: .9rem; color: var(--muted); line-height: 1.6; }

.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem; margin-top: .25rem; }
.check-opt { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check-opt input { width: 1rem; height: 1rem; accent-color: var(--ocean); }

.contribution-note {
  background: rgba(47,74,79,.05); border-left: 2px solid var(--ocean);
  padding: 1.1rem 1.4rem; border-radius: 0 .5rem .5rem 0; margin-bottom: 1.75rem;
}
.contribution-note p { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--ocean); margin: 0; }

.form-success { display: none; text-align: center; padding: 4rem 2rem; }
.form-success.show { display: block; }
.success-mark {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ocean);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem;
}
.form-success h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 1rem; }
.form-success p { font-family: var(--serif); font-style: italic; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .nav-links { display: none; flex-direction: column; position: fixed; inset: 0; background: var(--bg); padding: 5rem 2rem 2rem; z-index: 99; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 1.2rem 0; font-size: .9rem; }
  .nav-apply { display: none; }
  .nav-toggle { display: block; z-index: 101; }
  .form-row, .checkbox-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
