/* Dr. David Arce · Chulucanas -- one-page site. Colors from Chulucanas: terracotta clay,
   black smoked ceramics, mango and lemon; the medical section in clinical teal. */
:root {
  --clay: #b4532a;
  --clay-dark: #8a3b1b;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --cream: #fbf5ec;
  --sand: #f3e7d6;
  --mango: #f59e0b;
  --lemon: #65a30d;
  --med: #0e7490;
  --med-dark: #155e75;
  --med-soft: #ecfeff;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(28, 25, 23, .10);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.65; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s, box-shadow .25s; }
.site-header.is-solid { background: rgba(251, 245, 236, .96); box-shadow: 0 2px 16px rgba(0,0,0,.08); backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.site-header.is-solid .brand { color: var(--ink); }
.brand-logo { width: 64px; height: 64px; border-radius: 50%; background: #fff; object-fit: contain; padding: 3px; box-shadow: 0 2px 12px rgba(0,0,0,.22); }
.brand-footer .brand-logo { width: 56px; height: 56px; }
/* The full logo, big, on the hero (desktop) */
.hero-logo { position: absolute; right: max(16px, calc((100% - 1160px) / 2)); top: 50%; transform: translateY(-40%); width: min(360px, 30vw); background: rgba(255,255,255,.96); border-radius: 28px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.hero-logo img { width: 100%; }
.h2-sub { display: block; font-family: var(--sans); font-size: .42em; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--med); margin-top: 6px; }
.med-logo { width: min(380px, 90%); margin: 0 0 18px; mix-blend-mode: multiply; }
.brand-text { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1; }
.brand-text small { display: block; font-family: var(--sans); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .8; margin-top: 3px; }
.menu { display: flex; gap: 26px; align-items: center; }
.menu a { text-decoration: none; color: var(--white); font-weight: 500; font-size: 15px; }
.site-header.is-solid .menu a { color: var(--ink); }
.menu a:hover { color: var(--mango); }
.menu .menu-cta { background: var(--clay); color: #fff !important; padding: 8px 16px; border-radius: 999px; }
.menu .menu-cta:hover { background: var(--clay-dark); }
.menu-toggle { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; padding: 9px; }
.menu-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: .2s; }
.site-header.is-solid .menu-toggle span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; color: var(--white); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('../img/letras.jpg') center 60% / cover no-repeat; transform: scale(1.04); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(28,25,23,.86) 0%, rgba(28,25,23,.55) 55%, rgba(180,83,42,.35) 100%); }
.hero-content { position: relative; padding: 120px 0 90px; }
.hero h1 { font-family: var(--serif); font-size: clamp(56px, 11vw, 132px); line-height: .95; margin: 8px 0 18px; letter-spacing: -.01em; }
.hero-sub { font-size: clamp(18px, 2.2vw, 23px); max-width: 620px; margin: 0 0 30px; color: #f5ede2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-scroll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: #fff; text-decoration: none; font-size: 26px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 13px; font-weight: 600; color: var(--mango); margin: 0; }
.eyebrow-dark { color: var(--clay); }
.eyebrow-med { color: var(--med); }
.eyebrow-gold { color: var(--mango); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 15px; transition: transform .15s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--clay); color: #fff; }
.btn-primary:hover { background: var(--clay-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-med { background: var(--med); color: #fff; }
.btn-med:hover { background: var(--med-dark); }
.btn-wa { background: #25d366; color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-cream { background: var(--cream); }
.section-med { background: linear-gradient(180deg, var(--med-soft), #fff); }
.section-dark { background: var(--ink); color: #f5ede2; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section h2 { font-family: var(--serif); font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 8px 0 14px; }
.lead { font-size: 19px; color: var(--ink-soft); margin: 0; }
.section-dark .lead { color: #d6cfc4; }
.subhead { font-family: var(--serif); font-size: 30px; margin: 64px 0 20px; }
.source { font-size: 13px; color: #78716c; margin-top: 28px; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 64px; }
.fact { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--clay); }
.fact:nth-child(2) { border-top-color: var(--mango); }
.fact:nth-child(3) { border-top-color: var(--lemon); }
.fact:nth-child(4) { border-top-color: var(--ink); }
.fact-num { display: block; font-family: var(--serif); font-size: clamp(21px, 5.6vw, 28px); font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.fact-label { font-size: 14px; color: var(--ink-soft); }

/* Feature (image + text) */
.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.feature-media img { border-radius: 22px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.feature-text h3 { font-family: var(--serif); font-size: 32px; margin: 0 0 12px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--clay); box-shadow: inset 0 0 0 4px var(--sand); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.gallery figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 10px 14px; font-size: 14px; color: var(--ink-soft); }

/* Cards */
.cards { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h4 { font-family: var(--serif); font-size: 22px; margin: 6px 0 8px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.card-tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--clay); }
.card-med { border-left: 4px solid var(--med); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.note { background: var(--sand); border-radius: var(--radius); padding: 24px; }
.note h4 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; }
.note p { margin: 0; }

/* Medical */
.med-intro { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.doctor { margin: 0; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.doctor img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.doctor figcaption { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.doctor strong { font-family: var(--serif); font-size: 22px; }
.med-text h3 { font-family: var(--serif); font-size: 30px; margin: 0 0 10px; color: var(--med-dark); }
.med-text > p { margin: 0 0 12px; }
.med-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Placeholders the client must fill in */
.todo, .todo-block { color: #b45309; background: #fef3c7; border-radius: 6px; padding: 0 6px; font-size: .92em; font-weight: 500; }
.todo-block { display: block; padding: 10px 14px; margin: 0; }

/* Publicaciones */
.books { margin: -8px 0 32px; }
.books-title { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: var(--mango); font-weight: 600; }
.books-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.book { position: relative; padding: 18px 18px 18px 26px; border-radius: 10px; background: linear-gradient(135deg, #3f2a1e, #241a14); border: 1px solid #5a4030; box-shadow: inset 6px 0 0 var(--clay); }
.book-year { display: block; font-size: 12px; color: #d6cfc4; letter-spacing: .1em; }
.book-name { display: block; font-family: var(--serif); font-size: 21px; color: #fff; line-height: 1.25; margin-top: 2px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { background: transparent; color: #f5ede2; border: 1px solid #57534e; padding: 8px 18px; border-radius: 999px; font: 600 14px var(--sans); cursor: pointer; }
.chip.is-active, .chip:hover { background: var(--mango); border-color: var(--mango); color: var(--ink); }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.post { background: #292524; border: 1px solid #3f3a36; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.post:hover { transform: translateY(-3px); border-color: var(--mango); }
.post[hidden] { display: none; }
.post-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #3f3a36; }
.post-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #a8a29e; flex-wrap: wrap; }
.post-source { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.post-source.web { background: var(--mango); color: var(--ink); }
.post-source.facebook { background: #1877f2; color: #fff; }
.post h3 { font-family: var(--serif); font-size: 21px; margin: 0; color: #fff; line-height: 1.25; }
.post-author { font-size: 14px; color: var(--mango); font-weight: 600; }
.post p { margin: 0; font-size: 15px; color: #d6cfc4; }
.post-origin { font-size: 13px !important; color: #a8a29e !important; word-break: break-all; }
.post-origin a { color: #fcd34d; }
.post-link { margin-top: auto; padding-top: 8px; color: var(--mango); font-weight: 600; text-decoration: none; font-size: 15px; }
.post-link:hover { text-decoration: underline; }
.post-fb iframe { width: 100%; border: 0; background: #fff; min-height: 480px; }
.post-fb iframe.post-video { min-height: 0; aspect-ratio: 16 / 9; height: auto; background: #000; }
.posts-empty { color: #a8a29e; }
.posts-more { margin-top: 32px; text-align: center; }
.btn-fb { background: #1877f2; color: #fff; }
.btn-fb:hover { background: #0f5fd0; }
.footer-fb { color: var(--mango); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid #e7dccb; }
.contact-list span { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: #78716c; }
.map iframe { width: 100%; height: 360px; border: 0; border-radius: 22px; box-shadow: var(--shadow); }

/* Footer */
.site-footer { background: var(--ink); color: #d6cfc4; padding: 40px 0; font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.brand-footer { color: #fff; margin-bottom: 8px; }
.credits summary { cursor: pointer; color: var(--mango); }
.credits ul { padding-left: 18px; margin: 8px 0 0; max-width: 560px; }

.wa-float { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 60; }
.wa-float svg { width: 30px; height: 30px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } .hero-scroll { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-logo { display: none; }
  .feature, .med-intro, .contact, .split { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .med-intro .doctor { max-width: 360px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .menu-toggle { display: block; }
  .header-row { height: 70px; }
  .brand-logo { width: 52px; height: 52px; }
  .brand-text { font-size: 19px; }
  html { scroll-padding-top: 74px; }
  .menu { position: fixed; inset: 70px 0 auto 0; background: var(--cream); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; box-shadow: 0 10px 20px rgba(0,0,0,.12); transform: translateY(-120%); transition: transform .25s; }
  .menu:not(.is-open) { visibility: hidden; }
  .menu.is-open { transform: none; }
  .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .menu a { color: var(--ink) !important; padding: 14px 4px; border-bottom: 1px solid #eadfcf; }
  .menu .menu-cta { text-align: center; margin-top: 10px; border: 0; }
  .gallery, .cards-2 { grid-template-columns: 1fr; }
  .gallery img { aspect-ratio: 4 / 3; }
}
