/* ==========================================================
   Comedores Oroba — estilos
   ========================================================== */
:root {
  --green: #173B34;
  --green-900: #0F2924;
  --sage: #A5B5A1;
  --sage-100: #E6ECE4;
  --cream: #FAF8F3;
  --gold: #B6925C;
  --gold-600: #9A7845;
  --white: #FFFFFF;
  --ink: #1D2622;
  --muted: #56625D;
  --line: rgba(23, 59, 52, .14);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 50px -24px rgba(15, 41, 36, .35);
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--green); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
p { margin: 0 0 1em; }
strong { font-weight: 600; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(5rem, 10vw, 8.5rem) 0; }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--gold); color: var(--white); padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1.2rem; color: var(--sage); display: inline-flex; align-items: center; gap: .8rem; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow-gold { color: var(--gold-600); }
.eyebrow-sage { color: var(--sage); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--sans); letter-spacing: .02em; text-decoration: none;
  cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: .7rem 1.2rem; font-size: .85rem; }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-600); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-900); }
.btn-outline-light { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; color: var(--white);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease);
}
.site-header.is-scrolled { background: rgba(15, 41, 36, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(182,146,92,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand-emblem { height: 44px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); transition: height .35s var(--ease); }
.brand-word { height: 30px; width: auto; transition: height .35s var(--ease); }
.site-header.is-scrolled .brand-emblem { height: 38px; }
.site-header.is-scrolled .brand-word { height: 26px; }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) { text-decoration: none; font-size: .92rem; font-weight: 500; position: relative; padding: .3rem 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav-emblem { display: none; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: inherit; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Medios / marcadores de foto ---------- */
.media { position: relative; margin: 0; overflow: hidden; background: linear-gradient(135deg, var(--sage-100), #D4DDD1); }
.media::before {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(23,59,52,.55);
  background-image: repeating-linear-gradient(45deg, transparent 0 14px, rgba(23,59,52,.04) 14px 15px);
}
.media img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.media img.is-missing { visibility: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem; color: var(--white);
  background: radial-gradient(120% 90% at 85% 10%, #22504A 0%, var(--green) 45%, var(--green-900) 100%);
  overflow: hidden;
}
.hero-watermark { position: absolute; left: -8vw; bottom: -14vw; width: 52vw; max-width: 760px; opacity: .06; pointer-events: none; filter: blur(.5px); }
.hero-media .hero-logo { position: absolute; inset: 0; margin: auto; width: 72%; height: auto; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); animation: logoIn 1.6s var(--ease) .2s both; }
.hero-media .hero-photo { position: absolute; inset: 0; z-index: 1; }
.hero-media::before { display: none; }
@keyframes logoIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; position: relative; z-index: 1; }
.hero h1 { color: var(--white); max-width: 12ch; }
.hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.8); max-width: 34rem; margin-bottom: 2.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-media { aspect-ratio: 4 / 5; border-radius: 240px 240px var(--radius-lg) var(--radius-lg); box-shadow: 0 40px 80px -30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(182,146,92,.35); background: radial-gradient(90% 70% at 50% 40%, #24504A 0%, #173B34 55%, #10302A 100%); }
.hero-media::before { color: rgba(255,255,255,.5); background-image: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.04) 14px 15px); }

/* ---------- Nosotros ---------- */
.about { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-text { font-size: 1.12rem; color: var(--muted); border-left: 1px solid var(--gold); padding-left: clamp(1.5rem, 3vw, 2.5rem); }
.about-text p:first-child { color: var(--ink); font-size: 1.22rem; }

/* ---------- Servicios ---------- */
.services { background: var(--white); }
.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.service-card { background: var(--cream); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-card:hover .media img { transform: scale(1.04); }
.service-card .media { aspect-ratio: 3 / 2; }
.service-body { padding: clamp(1.6rem, 3vw, 2.4rem); display: flex; flex-direction: column; flex: 1; }
.service-body p { color: var(--muted); }
.service-num { font-family: var(--serif); font-size: 1.1rem; color: var(--gold-600); letter-spacing: .1em; margin-bottom: .6rem; }
.link-arrow { margin-top: auto; padding-top: .6rem; font-weight: 600; font-size: .92rem; color: var(--green); text-decoration: none; display: inline-flex; gap: .5rem; align-items: center; align-self: flex-start; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(5px); }

.service-main { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--green); color: var(--white); }
.service-main .media { aspect-ratio: auto; min-height: 420px; height: 100%; }
.service-main .service-body { justify-content: center; padding: clamp(2rem, 5vw, 4rem); }
.service-main h3 { color: var(--white); font-size: clamp(1.9rem, 3vw, 2.6rem); }
.service-main p { color: rgba(255,255,255,.78); }
.service-main .service-num { color: var(--gold); }
.service-main .link-arrow { color: var(--gold); margin-top: 1rem; }

/* ---------- Soluciones ---------- */
.solutions { background: var(--green); color: rgba(255,255,255,.8); }
.solutions h2 { color: var(--white); }
.solutions-head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); margin-bottom: clamp(3rem, 6vw, 4.5rem); align-items: end; }
.env-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid rgba(165,181,161,.25); }
.env { padding: 2.2rem 1.4rem 1rem; border-right: 1px solid rgba(165,181,161,.25); display: flex; flex-direction: column; gap: 1.3rem; transition: background .4s var(--ease); }
.env:last-child { border-right: 0; }
.env:hover { background: rgba(255,255,255,.04); }
.env svg { width: 44px; height: 44px; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.env span { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; color: var(--white); }

/* ---------- Filosofía ---------- */
.philosophy { position: relative; padding: clamp(5rem, 10vw, 8rem) 0; background: var(--cream); }
.philosophy-media { position: absolute; inset: 0 0 25% 0; }
.philosophy .container { position: relative; display: flex; justify-content: flex-end; padding-top: clamp(10rem, 22vw, 18rem); }
.philosophy-card { background: var(--white); max-width: 36rem; padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.philosophy-card p { color: var(--muted); }
.philosophy-card p:last-child { margin-bottom: 0; }

/* ---------- Contacto ---------- */
.contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-intro p:last-child { color: var(--muted); font-size: 1.1rem; }
.contact-form { background: var(--white); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 3rem); box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem 1.4rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; color: var(--green); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.5 var(--sans); color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23173B34' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: var(--white); box-shadow: 0 0 0 3px rgba(182,146,92,.18); }
.field.has-error input, .field.has-error select { border-color: #A4473B; }
.field-check { flex-direction: row; align-items: flex-start; gap: .7rem; }
.field-check input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--green); flex: none; }
.field-check label { font-weight: 400; color: var(--muted); }
.field-check.has-error label { color: #A4473B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-status { margin: 0; font-size: .92rem; color: var(--muted); flex: 1 1 220px; }
.form-status.is-error { color: #A4473B; }
.form-status.is-ok { color: var(--green); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: radial-gradient(80% 60% at 50% 0%, #173B34 0%, var(--green-900) 70%); color: rgba(255,255,255,.7); padding: 5rem 0 2rem; }
.footer-brand { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 3.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid rgba(182,146,92,.22); }
.footer-logo { width: min(320px, 70vw); height: auto; filter: drop-shadow(0 14px 28px rgba(0,0,0,.35)); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-name { font-size: .8rem; letter-spacing: .18em; color: rgba(255,255,255,.6); margin: 0; }
.footer-tag { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--gold); margin: 1.8rem 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: center; }
.footer-nav a { text-decoration: none; font-size: .92rem; }
.footer-nav a:hover { color: var(--white); }
.footer-bottom { padding-top: 1.6rem; font-size: .82rem; }
.footer-bottom p { margin: 0; }

/* ---------- Página interna (aviso de privacidad) ---------- */
.page-simple { padding: calc(var(--header-h) + 4rem) 0 6rem; min-height: 70vh; }
.page-simple .container { max-width: 760px; }
.page-simple .notice { background: var(--white); border-left: 3px solid var(--gold); padding: 1.5rem 1.8rem; border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); }
.site-header.is-solid { background: var(--green-900); color: var(--white); box-shadow: 0 1px 0 rgba(182,146,92,.25); }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.env-grid .env:nth-child(2) { transition-delay: .08s; }
.env-grid .env:nth-child(3) { transition-delay: .16s; }
.env-grid .env:nth-child(4) { transition-delay: .24s; }
.env-grid .env:nth-child(5) { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .env-grid { grid-template-columns: repeat(3, 1fr); }
  .env:nth-child(3) { border-right: 0; }
  .env:nth-child(n+4) { border-top: 1px solid rgba(165,181,161,.25); }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 1.6rem;
    background: var(--green); color: var(--white); font-size: 1.2rem;
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav a:not(.btn) { font-family: var(--serif); font-size: 1.9rem; }
  .nav-emblem { display: block; width: 92px; height: auto; margin-bottom: 1rem; opacity: .9; }
  .nav.is-open { opacity: 1; visibility: visible; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.menu-open .brand { visibility: hidden; }

  .hero-grid, .about-grid, .solutions-head, .contact-grid, .service-main { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-media { aspect-ratio: 1 / 1; border-radius: 200px 200px var(--radius-lg) var(--radius-lg); max-width: 520px; width: 100%; margin-inline: auto; }
  .hero-watermark { width: 90vw; bottom: -20vw; }
  .services-grid { grid-template-columns: 1fr; }
  .service-main .media { min-height: 260px; aspect-ratio: 3 / 2; }
  .philosophy-media { inset: 0 0 45% 0; }
  .philosophy .container { padding-top: clamp(12rem, 45vw, 18rem); }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 2rem); }
  .env-grid { grid-template-columns: 1fr 1fr; }
  .env, .env:nth-child(3) { border-right: 1px solid rgba(165,181,161,.25); }
  .env:nth-child(2n) { border-right: 0; }
  .env:nth-child(n+3) { border-top: 1px solid rgba(165,181,161,.25); }
  .env:last-child { grid-column: 1 / -1; border-right: 0; }
  .env span { font-size: 1.2rem; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand-emblem { height: 36px; }
  .brand-word { height: 24px; }
  .site-header.is-scrolled .brand-word { height: 22px; }
  .site-header.is-scrolled .brand-emblem { height: 32px; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

/* Filosofía: degradado suave para integrar la foto con el fondo */
.philosophy-media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,41,36,.18) 0%, rgba(15,41,36,0) 30%, rgba(250,248,243,0) 70%, var(--cream) 100%); }
.philosophy-media img { object-position: center 65%; }

/* Dirección */
.contact-address { font-style: normal; display: flex; gap: 1rem; align-items: flex-start; margin-top: 2.2rem; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.6; }
.contact-address svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--gold-600); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-top: .15rem; }
.contact-address strong { display: block; color: var(--green); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .3rem; }
.contact-address .link-arrow { display: flex; width: max-content; margin-top: .7rem; padding-top: 0; }
.footer-address { margin: .35rem 0 0; font-size: .88rem; color: rgba(255,255,255,.6); }
.contact-mail { margin-top: 1.4rem; padding-top: 0; border-top: 0; }
.mail-link { color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.mail-link:hover { color: var(--gold-600); }
.footer-address a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer-address a:hover { color: var(--gold); }
.form-alt { margin: .4rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.form-alt a { color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); white-space: nowrap; }

/* Aviso de privacidad */
.legal-updated { color: var(--muted); font-size: .9rem; margin-top: -.6rem; }
.legal { margin-top: 2.5rem; color: var(--ink); }
.legal h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 2.4rem 0 .8rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: .3rem; }
.legal li::marker { color: var(--gold); }
.legal a { color: var(--green); font-weight: 600; }
