/* Logo palette: green #68A850 & blue #00A8C8 (main) · gold #F0B828 (highlights).
   Warm cream & terracotta are complementary supporting shades. Red reserved for future use. */
:root {
  --cyan: #00A8C8;
  --cyan-dark: #078BA5;
  --cyan-deep: #065E70;
  --teal-dark: #083B44;          /* deepest blue — dark surfaces */
  --green: #68A850;
  --green-dark: #2F5B24;         /* ~8:1 on cream — reads bold even in thin fallback fonts */
  --cream-deep: #DBE9C9;         /* section-alt bg — clearly green (was #F0F6E9, too faint) */
  --gold: #F0B828;               /* highlights only */
  --gold-soft: #FBE9B8;
  /* supporting (complementary) */
  --cream: #F5F8F0;              /* page bg — pale green-white */
  --ink: #24322A;
  --ink-soft: #4E5A50;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(8, 59, 68, 0.12);
  /* System fonts only — works everywhere, including iOS Lockdown Mode
     (which blocks all web fonts). Georgia bold for display, OS sans for body. */
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

:root { color-scheme: light; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream); /* page bg */
  line-height: 1.65;
  font-size: 1.05rem;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; color: var(--ink); }

h1 em { color: var(--gold); }
/* Script-flavored accents echo the logo lettering */
#visita h2 em, #familia h2 em { color: var(--green-dark); }
#facebook h2 em { color: var(--gold); }

a { color: var(--cyan-dark); }
a:hover { color: var(--cyan-deep); }

.container { width: min(1000px, 92%); margin-inline: auto; }

/* English lines: quieter than the Spanish (smaller, italic) but NOT lighter —
   small + italic + light compounds into low contrast on mobile. */
.en {
  display: inline-block;
  font-size: 0.95em;
  color: var(--ink-soft);
  font-style: italic;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--teal-dark); color: #fff; padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream);            /* opaque baseline — Lockdown Mode strips backdrop-filter */
  border-bottom: 1px solid var(--cream-deep);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(245, 248, 240, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.nav-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--teal-dark); min-width: 0; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--cream-deep);
  box-shadow: 0 2px 8px rgba(8,59,68,.18);
}
.brand-text { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.05; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan-deep); }

.nav-menu { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.nav-menu a {
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1rem;
  padding: .3rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--green-dark); border-color: var(--gold); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: .5rem;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 6rem 0 7.5rem;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(0, 168, 200, 0.75), transparent 60%),
    radial-gradient(700px 600px at -10% 110%, rgba(104, 168, 80, 0.5), transparent 55%),
    linear-gradient(135deg, var(--teal-dark), var(--cyan-dark) 55%, var(--cyan));
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: radial-gradient(#fff 1.1px, transparent 1.1px);
  background-size: 26px 26px;
}
.hero-inner { position: relative; text-align: center; }
.hero-logo {
  width: clamp(150px, 24vw, 190px); height: auto; border-radius: 50%;
  margin: 0 auto 1.6rem;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.hero-eyebrow {
  font-family: var(--font-display);
  margin: 0 0 1rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-size: 1rem; color: #DCE3D3;
}
.hero h1 { font-size: clamp(2.5rem, 6.5vw, 4.2rem); margin: 0 0 .2rem; color: #fff; }
.hero h1 em { color: var(--gold); }
.hero-sub-en { font-size: clamp(1.3rem, 3vw, 1.9rem); font-family: var(--font-display); font-style: italic; color: #F5F8F0; margin: 0 0 1.4rem; }
.hero-sub { max-width: 38rem; margin: 0 auto 2rem; font-size: 1.1rem; color: #FFFFFF; }
.hero-sub .en { color: #F0F6F8; }   /* near-white — holds contrast across whole gradient */
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; }
.hero-wave svg { display: block; width: 100%; height: 70px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--teal-dark); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.btn-primary:hover { background: var(--gold-soft); color: var(--teal-dark); }
.section .btn-primary { background: var(--gold); color: var(--teal-dark); }
.section .btn-primary:hover { background: var(--gold-soft); color: var(--teal-dark); }
.btn-small { margin-top: .8rem; padding: .55rem 1.1rem; font-size: .9rem; background: var(--cyan-dark); color: #fff; }
.btn-small:hover { background: var(--cyan-deep); color: #fff; }
.btn-fb { background: #1877F2; color: #fff; }
.btn-fb:hover { background: #1264d1; color: #fff; }
.btn-fb svg { width: 19px; height: 19px; color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--cream-deep); }
.section-eyebrow {
  margin: 0 0 .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-size: 1rem; color: var(--green-dark);
}
.section h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 1.4rem; }

/* Service times */
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 3rem; }
.time {
  background: #fff; border-radius: var(--radius); padding: 1.5rem 1.2rem;
  box-shadow: var(--shadow); border-top: 4px solid var(--gold);
  display: flex; flex-direction: column; align-items: flex-start; gap: .3rem;
}
.time svg { width: 28px; height: 28px; color: var(--cyan-dark); }
.time:nth-child(2) svg { color: var(--green-dark); }
.time strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--teal-dark); }
.time span { color: var(--ink); line-height: 1.4; }
.time a { font-weight: 700; }

/* Visit grid */
.visit-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.2rem; align-items: stretch; }
.info-block { display: flex; gap: 1rem; align-items: flex-start; }
.info-icon { width: 30px; height: 30px; color: var(--green-dark); flex-shrink: 0; margin-top: .15rem; }
.info-block h3 { margin: 0 0 .3rem; font-size: 1.25rem; }
.info-block h3 .en { font-size: .9em; }
.info-block address { margin: 0; font-style: normal; color: var(--ink-soft); font-size: 1.05rem; }
.info-block address strong { color: var(--ink); }
.visit-map { min-height: 320px; }
.visit-map iframe {
  width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Family section */
.family-lead { font-size: 1.2rem; max-width: 42rem; }
.family-lead p { margin: 0 0 .4rem; }
.family-story { max-width: 42rem; color: var(--ink-soft); }
.family-verse {
  max-width: 42rem; margin-top: 2rem; padding: 1.3rem 1.5rem;
  background: #fff; border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow);
  font-style: italic;
}

/* Facebook section */
.fb-inner { max-width: 780px; margin-inline: auto; }
.fb-card {
  position: relative;
  background: var(--teal-dark); color: #EBEFF0;   /* solid — was rgba(255,255,255,.92) */
  border-radius: var(--radius); padding: 2.4rem 2.2rem 3.4rem;
  box-shadow: var(--shadow); display: flex; gap: 1.4rem; align-items: flex-start;
}
.fb-icon { width: 52px; height: 52px; color: var(--gold); flex-shrink: 0; }
.fb-card h2 { color: #fff; margin: 0 0 .8rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.fb-card p { margin: 0 0 1.4rem; }
.fb-card .en { color: #D8E6E9; }
.fb-live {
  position: absolute; bottom: 1rem; right: 1.2rem;
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--gold-soft);
}
/* Amber only in NEXT state; pulsing red in LIVE state */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.fb-live.is-live .live-dot { background: var(--gold); animation: pulse 1.6s infinite; }
.fb-live.is-live #fbLiveLabel { color: #fff; font-weight: 700; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 184, 40, .6); }
  70% { box-shadow: 0 0 0 9px rgba(240, 184, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 184, 40, 0); }
}

/* Footer */
.site-footer {
  background: var(--teal-dark); color: #DAE2E3;   /* solid — was rgba(255,255,255,.85) */
  padding: 3rem 0 2.2rem; text-align: center;
  border-top: 1px solid #1D4E57;
}
.section + .site-footer { border-top: none; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #fff; margin: 0; }
.footer-brand small { color: var(--gold); font-size: .65em; }
.footer-tag { font-weight: 700; letter-spacing: .06em; margin: .5rem 0 1rem; color: var(--gold-soft); }
.footer-meta { margin: 0 0 1.2rem; font-size: .95rem; }
.footer-copy { margin: 0; font-size: .85rem; color: #9CB1B4; }   /* solid — was rgba(255,255,255,.6) */

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .fb-live.is-live .live-dot { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .visit-grid { grid-template-columns: 1fr; }
  .times { grid-template-columns: 1fr 1fr; }
}

/* Collapse the nav early — bilingual labels wrap badly long before 620px */
@media (max-width: 920px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--cream-deep);
    padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease;
    box-shadow: var(--shadow);
  }
  .nav-menu.open { max-height: 260px; }
  .nav-menu li { border-top: 1px solid var(--cream-deep); }
  .nav-menu a {
    display: block; padding: 1rem 4%;
    color: var(--ink); font-weight: 700; font-size: 1.1rem;
    border-bottom: none; border-left: 4px solid transparent;
  }
  .nav-menu a.active, .nav-menu a:active {
    color: var(--green-dark);
    border-left-color: var(--gold);
    background: #fff;
  }
}

@media (max-width: 620px) {
  .times { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 6rem; }
  .section { padding: 3.2rem 0; }
  .fb-card { flex-direction: column; padding-bottom: 3.6rem; }
}
