/* ============================================================
   Eco Casa Vermelha do Sul — Ubatuba
   Design system: areia (sand), verde-mata (forest), terracota
   (a nod to the "red beach" that names the place)
   ============================================================ */

:root {
  --areia: #f6f1e7;
  --areia-2: #ede4d3;
  --branco: #fdfbf7;
  --verde: #1d3a2e;
  --verde-2: #2d5745;
  --verde-claro: #6f8f7f;
  --terracota: #c05b3d;
  --terracota-escuro: #a44a30;
  --ink: #22302b;
  --ink-suave: #55645d;
  --sombra: 0 10px 30px rgba(29, 58, 46, .12);
  --raio: 14px;
  --max: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--branco);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--verde);
}

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

a { color: var(--terracota); text-decoration: none; }
a:hover { color: var(--terracota-escuro); }

/* ---------- Language toggle ---------- */
body.lang-pt .en { display: none !important; }
body.lang-en .pt { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  transition: box-shadow .35s ease;
}
/* blur/background live on a pseudo-element: backdrop-filter on the header
   itself would turn it into the containing block of the fixed mobile nav */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(253, 251, 247, .94);
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s ease;
}
.site-header.scrolled::before { opacity: 1; }
.site-header.scrolled { box-shadow: 0 2px 18px rgba(29, 58, 46, .10); }
.brand {
  font-family: "Fraunces", serif; font-weight: 700;
  font-size: 1.12rem; letter-spacing: .02em;
  color: #fff; transition: color .35s ease;
  display: flex; align-items: baseline; gap: 8px;
}
.brand small {
  font-family: "Inter", sans-serif; font-weight: 500;
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  opacity: .85;
}
.site-header.scrolled .brand,
.site-header.solid .brand { color: var(--verde); }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  color: #fff; font-size: .9rem; font-weight: 500; letter-spacing: .03em;
  transition: color .35s ease, opacity .2s;
}
.main-nav a:hover { opacity: .75; }
.site-header.scrolled .main-nav a,
.site-header.solid .main-nav a { color: var(--verde); }
.main-nav a.active { border-bottom: 2px solid var(--terracota); padding-bottom: 3px; }

.nav-lock {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--terracota); color: #fff !important;
  padding: 8px 16px; border-radius: 999px; font-size: .84rem;
}
.nav-lock:hover { background: var(--terracota-escuro); opacity: 1 !important; }

.lang-toggle {
  cursor: pointer; border: 1.5px solid currentColor; background: transparent;
  color: #fff; border-radius: 999px; padding: 5px 12px;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  transition: color .35s ease;
}
.site-header.scrolled .lang-toggle,
.site-header.solid .lang-toggle { color: var(--verde); }

/* Mobile nav */
.nav-burger { display: none; background: none; border: 0; cursor: pointer; }
.nav-burger span {
  display: block; width: 24px; height: 2.5px; margin: 5px 0;
  background: #fff; border-radius: 2px; transition: background .35s;
}
.site-header.scrolled .nav-burger span,
.site-header.solid .nav-burger span { background: var(--verde); }

@media (max-width: 860px) {
  .nav-burger { display: block; position: relative; z-index: 20; }
  .main-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 100svh;
    z-index: 10; background: var(--verde);
    flex-direction: column; justify-content: center; gap: 34px;
    transform: translateY(-102%); transition: transform .4s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { color: #fff !important; font-size: 1.25rem; }
  .main-nav .lang-toggle { color: #fff !important; font-size: .9rem; }
  .site-header:has(.main-nav.open) .nav-burger span { background: #fff !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  background-size: cover; background-position: center 65%;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,35,28,.30) 0%, rgba(20,35,28,.05) 45%, rgba(20,35,28,.62) 100%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--max); margin: 0 auto; padding: 0 28px 9vh;
  color: #fff;
}
.hero-kicker {
  font-size: .8rem; letter-spacing: .3em; text-transform: uppercase;
  font-weight: 600; margin-bottom: 18px; opacity: .92;
}
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 6vw, 4.4rem);
  max-width: 17ch; margin-bottom: 20px;
}
.hero p { max-width: 54ch; font-size: 1.08rem; opacity: .94; }
.hero-ctas { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 28px; border-radius: 999px;
  font-weight: 600; font-size: .93rem; letter-spacing: .02em;
  transition: transform .15s ease, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracota); color: #fff; box-shadow: 0 6px 18px rgba(192,91,61,.35); }
.btn-primary:hover { background: var(--terracota-escuro); color: #fff; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.8); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-verde { background: var(--verde-2); color: #fff; }
.btn-verde:hover { background: var(--verde); color: #fff; }

.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: #fff; font-size: 1.4rem; opacity: .8;
  animation: floaty 2.2s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* Interior page hero (short) */
.hero-sub { min-height: 52svh; }
.hero-sub h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }

/* ---------- Sections ---------- */
section { padding: 84px 28px; }
.wrap { max-width: var(--max); margin: 0 auto; }
.wrap-narrow { max-width: 820px; margin: 0 auto; }

.kicker {
  color: var(--terracota); font-size: .78rem; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase; margin-bottom: 14px;
}
h2.title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 18px; }
.lead { font-size: 1.12rem; color: var(--ink-suave); max-width: 62ch; }

.section-areia { background: var(--areia); }
.section-verde { background: var(--verde); }
.section-verde .kicker { color: #e9b99a; }
.section-verde h2.title, .section-verde h3 { color: #fff; }
.section-verde p, .section-verde .lead { color: rgba(255,255,255,.85); }

/* ---------- Stats band ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 34px; text-align: center;
}
.stat .num {
  font-family: "Fraunces", serif; font-size: 2.5rem; font-weight: 700;
  color: var(--terracota);
}
.section-verde .stat .num { color: #e9b99a; }
.stat .lbl { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-suave); }
.section-verde .stat .lbl { color: rgba(255,255,255,.75); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 26px; margin-top: 44px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
  background: var(--branco); border-radius: var(--raio); overflow: hidden;
  box-shadow: var(--sombra); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(29,58,46,.18); }
.card img { height: 230px; width: 100%; object-fit: cover; }
.card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.22rem; }
.card-body p { font-size: .95rem; color: var(--ink-suave); flex: 1; }
.card-link { font-weight: 600; font-size: .9rem; }
.card-links { display: flex; gap: 14px; flex-wrap: wrap; }
.card-links a {
  font-size: .82rem; font-weight: 600; padding: 6px 13px;
  border: 1.5px solid var(--areia-2); border-radius: 999px; color: var(--verde-2);
}
.card-links a:hover { border-color: var(--terracota); color: var(--terracota); }
.card-tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--terracota); background: rgba(192,91,61,.1);
  padding: 4px 11px; border-radius: 999px;
}

/* ---------- Split (image + text) ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.split img { border-radius: var(--raio); box-shadow: var(--sombra); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Feature list ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-top: 40px; }
.feature {
  background: var(--branco); border-radius: var(--raio); padding: 26px;
  box-shadow: var(--sombra);
}
.feature .ico { font-size: 1.7rem; margin-bottom: 12px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { font-size: .88rem; color: var(--ink-suave); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 40px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; position: relative; }
.gallery img {
  width: 100%; height: 240px; object-fit: cover;
  transition: transform .35s ease;
}
.gallery a:hover img { transform: scale(1.05); }
.gallery .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px; color: #fff; font-size: .85rem; font-weight: 500;
  background: linear-gradient(transparent, rgba(20,35,28,.75));
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(13, 21, 17, .97); padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; background: none; border: 0; color: #fff;
  font-size: 2.2rem; cursor: pointer; opacity: .8; padding: 10px;
}
.lightbox .lb-close:hover, .lightbox .lb-prev:hover, .lightbox .lb-next:hover { opacity: 1; }
.lb-close { top: 16px; right: 24px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-caption {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .92rem; opacity: .9; text-align: center; max-width: 80vw;
}

/* ---------- Docs / approvals ---------- */
.doc-list { display: grid; gap: 14px; margin-top: 34px; }
.doc {
  display: flex; align-items: center; gap: 16px;
  background: var(--branco); border-radius: 12px; padding: 18px 22px;
  box-shadow: var(--sombra); font-size: .95rem;
}
.doc .ico { font-size: 1.5rem; }
.doc b { color: var(--verde); }
.doc small { color: var(--ink-suave); display: block; }

/* ---------- Map embed ---------- */
.map-embed {
  border: 0; width: 100%; height: 440px; border-radius: var(--raio);
  box-shadow: var(--sombra); margin-top: 40px;
}

/* ---------- Timeline (obra) ---------- */
.timeline { margin-top: 44px; position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2.5px; background: var(--areia-2); border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 46px; }
.tl-item::before {
  content: ""; position: absolute; left: -29px; top: 7px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--terracota); border: 3px solid var(--branco);
  box-shadow: 0 0 0 2px var(--terracota);
}
.tl-item h3 { font-size: 1.25rem; margin-bottom: 4px; }
.tl-item .tl-date {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--terracota); margin-bottom: 10px;
}

/* ---------- Video grid ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 30px; }
.videos video { width: 100%; border-radius: 12px; background: #000; box-shadow: var(--sombra); }

/* ---------- Login ---------- */
.login-page {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(29,58,46,.72), rgba(29,58,46,.72)), var(--login-bg) center/cover;
  padding: 24px;
}
.login-card {
  background: var(--branco); border-radius: 18px; padding: 44px 40px;
  width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  text-align: center;
}
.login-card h1 { font-size: 1.55rem; margin: 14px 0 6px; }
.login-card p { color: var(--ink-suave); font-size: .93rem; margin-bottom: 26px; }
.login-card input[type=password] {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1.5px solid var(--areia-2); font-size: 1rem; margin-bottom: 16px;
  font-family: inherit; background: var(--areia);
}
.login-card input[type=password]:focus { outline: 2px solid var(--terracota); border-color: transparent; }
.login-card .btn { width: 100%; justify-content: center; border: 0; cursor: pointer; font-family: inherit; font-size: 1rem; }
.login-erro {
  background: #fdecea; color: #b3261e; border-radius: 10px;
  padding: 10px 14px; font-size: .88rem; margin-bottom: 16px;
}
.login-volta { margin-top: 22px; font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--verde); color: rgba(255,255,255,.82);
  padding: 60px 28px 34px; font-size: .92rem;
}
.footer-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 44px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 12px; font-size: 1.15rem; }
.site-footer h4 {
  color: #fff; font-size: .8rem; letter-spacing: .2em;
  text-transform: uppercase; margin-bottom: 14px;
}
.site-footer a { color: rgba(255,255,255,.82); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max); margin: 44px auto 0; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: .8rem; color: rgba(255,255,255,.55);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-lg { margin-top: 44px; }
.note {
  background: var(--areia); border-left: 4px solid var(--terracota);
  border-radius: 0 10px 10px 0; padding: 16px 20px; font-size: .92rem;
  color: var(--ink-suave); margin-top: 30px;
}
