/* ============================================================
   CRAB 77 FEST · estilo luxury
   Paleta: negro cálido · marfil · bronce dorado · naranja marca
   ============================================================ */

:root {
  --bg:        #0c0a08;
  --bg-2:      #110e0a;
  --bg-3:      #17130d;
  --line:      rgba(201,168,106,.18);
  --ivory:     #f4efe4;
  --muted:     #9a8d79;
  --bronze:    #c9a86a;
  --bronze-2:  #e3c98c;
  --orange:    #f0792b;
  --orange-2:  #ff9248;

  --serif:   'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:    'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Archivo Black', var(--sans);

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

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

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* textura de grano */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Logo del cangrejo ---------- */
.mark-shadow { color: var(--orange); transform: translate(-7px, 9px); }
.mark-main   { color: var(--ivory); }

/* ---------- Tipografía base de secciones ---------- */
.section-kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: .72rem;
  color: var(--bronze);
  font-weight: 400;
  margin-bottom: 1.4rem;
  padding-left: .42em;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: .005em;
}
.section-title em { font-style: italic; color: var(--bronze-2); }

.section-lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--muted);
  max-width: 56ch;
  margin-top: 1.4rem;
}
.section-lede strong { color: var(--ivory); font-weight: 400; }

.accent { color: var(--orange); }
.seven  { position: relative; color: var(--orange); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem clamp(1.2rem, 5vw, 3.5rem);
  transition: background .5s var(--ease), padding .5s var(--ease), border-color .5s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(12,10,8,.82);
  backdrop-filter: blur(14px);
  padding-top: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: .7rem; }
.brand__mark { width: 46px; height: auto; }
.brand__text {
  font-family: var(--serif); font-size: 1.35rem; letter-spacing: .04em;
  color: var(--ivory);
}
.brand__text em { font-style: italic; color: var(--bronze); }

.header-right { display: flex; align-items: center; gap: 1.7rem; }

.access-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--muted); border: 1px solid var(--line);
  padding: .55rem 1.1rem; border-radius: 40px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.access-link svg { width: 15px; height: 15px; }
.access-link:hover { color: var(--ivory); border-color: var(--bronze); }

.nav { display: flex; align-items: center; gap: 2.4rem; }
.nav a {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--muted); transition: color .3s; position: relative;
}
.nav a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px;
  background: var(--bronze); transition: width .35s var(--ease);
}
.nav a:not(.nav__cta):hover { color: var(--ivory); }
.nav a:not(.nav__cta):hover::after { width: 100%; }

.nav__cta {
  color: var(--ivory); border: 1px solid var(--bronze);
  padding: .6rem 1.3rem; border-radius: 40px; letter-spacing: .18em;
  transition: background .35s var(--ease), color .35s;
}
.nav__cta:hover { background: var(--bronze); color: var(--bg); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 1.5px; background: var(--ivory); transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.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(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 7rem 1.5rem 5rem; overflow: hidden;
}
.hero__glow {
  position: absolute; top: 38%; left: 50%; width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px; transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(240,121,43,.16), rgba(240,121,43,.04) 40%, transparent 68%);
  filter: blur(10px); pointer-events: none;
}
.hero__watermark {
  position: absolute; bottom: -8%; left: 50%; transform: translateX(-50%);
  width: min(120vw, 1500px); opacity: .03; color: var(--ivory); pointer-events: none;
}

.hero__inner { position: relative; z-index: 2; max-width: 880px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .5em; font-size: .78rem;
  color: var(--bronze); margin-bottom: 2.2rem; padding-left: .5em;
}

.hero__mark { width: clamp(110px, 18vw, 180px); margin: 0 auto 1.8rem; }

.hero__title { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.hero__crab {
  font-family: var(--display);
  font-size: clamp(3.4rem, 13vw, 9rem);
  letter-spacing: .02em; line-height: .9; color: var(--ivory);
}
.hero__crab .seven::after {
  content: ''; position: absolute; left: -8%; top: 46%; width: 116%; height: .1em;
  background: var(--orange); transform: rotate(-18deg); border-radius: 2px;
}
.hero__fest {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(2rem, 7vw, 4.4rem); color: var(--bronze-2);
  margin-top: -.15em; letter-spacing: .02em;
}

.hero__rule {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  color: var(--bronze); margin: 1.8rem 0 1.3rem;
}
.hero__rule span { display: block; width: clamp(40px, 12vw, 110px); height: 1px; background: linear-gradient(90deg, transparent, var(--bronze)); }
.hero__rule span:last-child { background: linear-gradient(90deg, var(--bronze), transparent); }

.hero__meta {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: .12em; text-transform: uppercase; color: var(--ivory);
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
}
.hero__meta .dot { color: var(--orange); }

.hero__lede {
  color: var(--muted); max-width: 50ch; margin: 1.8rem auto 2.6rem;
  font-size: 1.06rem;
}

.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .35em; color: var(--muted);
}
.scroll-cue__line { width: 1px; height: 46px; background: linear-gradient(var(--bronze), transparent); position: relative; overflow: hidden; }
.scroll-cue__line::after { content: ''; position: absolute; top: -50%; left: 0; width: 1px; height: 50%; background: var(--orange); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { top: -50%; } 60%,100% { top: 100%; } }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: .8rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: .22em;
  padding: 1.05rem 2.2rem; border-radius: 40px; cursor: pointer;
  border: 1px solid transparent; transition: all .4s var(--ease); position: relative; overflow: hidden;
  background: transparent; appearance: none; -webkit-appearance: none; color: var(--ivory);
}
.btn--primary { background: var(--orange); color: #1a0f06; border-color: var(--orange); }
.btn--primary:hover { background: var(--orange-2); border-color: var(--orange-2); transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(240,121,43,.6); }
.btn--ghost { color: var(--ivory); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--bronze); color: var(--bronze-2); transform: translateY(-2px); }
.btn--block { width: 100%; margin-top: 1rem; }

/* ============================================================
   CUENTA ATRÁS
   ============================================================ */
.countdown {
  text-align: center; padding: clamp(4rem, 9vw, 7rem) 1.5rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.countdown .section-kicker { padding-left: 0; }
.countdown__grid { display: flex; justify-content: center; gap: clamp(1.4rem, 6vw, 4.5rem); flex-wrap: wrap; margin-top: 1rem; }
.cd { display: flex; flex-direction: column; align-items: center; gap: .5rem; min-width: 70px; }
.cd__num {
  font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 300;
  line-height: 1; color: var(--ivory); font-variant-numeric: tabular-nums;
}
.cd__lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .3em; color: var(--bronze); }

/* ============================================================
   LAYOUT DE SECCIONES
   ============================================================ */
.about, .details, .program, .rsvp {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.3rem, 5vw, 2rem);
}

/* El evento */
.about__intro { max-width: 760px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: clamp(3rem, 6vw, 5rem); }
.feature {
  border: 1px solid var(--line); border-radius: 4px; padding: 2.4rem 2rem;
  background: linear-gradient(180deg, rgba(201,168,106,.04), transparent);
  transition: transform .5s var(--ease), border-color .5s, background .5s;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(201,168,106,.4); background: linear-gradient(180deg, rgba(201,168,106,.08), transparent); }
.feature__no { font-family: var(--serif); font-size: 1rem; color: var(--orange); letter-spacing: .1em; }
.feature h3 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; margin: 1rem 0 .7rem; }
.feature p { color: var(--muted); font-size: .98rem; }

/* Detalles */
.details { text-align: center; }
.details .section-kicker { padding-left: 0; }
.details__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(3rem, 6vw, 4.5rem); background: var(--line); border: 1px solid var(--line); }
.detail { background: var(--bg); padding: 3rem 1.6rem; display: flex; flex-direction: column; align-items: center; gap: .35rem; transition: background .5s; }
.detail:hover { background: var(--bg-2); }
.detail__icon { width: 46px; height: 46px; color: var(--bronze); margin-bottom: 1rem; }
.detail__icon svg { width: 100%; height: 100%; }
.detail h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .28em; color: var(--bronze); font-weight: 400; }
.detail p { font-family: var(--serif); font-size: 1.5rem; color: var(--ivory); line-height: 1.2; }
.detail__sub { font-size: .85rem; color: var(--muted); }

/* Programa / timeline */
.program { text-align: center; }
.program .section-kicker { padding-left: 0; }
.timeline { list-style: none; max-width: 680px; margin: clamp(3rem,6vw,4.5rem) auto 0; text-align: left; }
.timeline li {
  display: grid; grid-template-columns: 110px 1fr; gap: 1.5rem; align-items: start;
  padding: 1.8rem 0; border-top: 1px solid var(--line); position: relative;
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline__time { font-family: var(--serif); font-size: 1.7rem; color: var(--orange); line-height: 1; padding-top: .1rem; }
.timeline__body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin-bottom: .25rem; }
.timeline__body p { color: var(--muted); font-size: .96rem; }

/* ============================================================
   RSVP
   ============================================================ */
.rsvp {
  position: relative; max-width: 760px;
}
.rsvp__head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.rsvp__head .section-kicker { padding-left: 0; }
.rsvp__head .section-lede { margin-left: auto; margin-right: auto; }

.rsvp__form {
  display: flex; flex-direction: column; gap: 1.6rem;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(1.8rem, 5vw, 3.2rem);
}
.field { display: flex; flex-direction: column; gap: .55rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }

.field label, .field__label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .22em; color: var(--bronze);
}
.field .opt { color: var(--muted); letter-spacing: .1em; text-transform: none; font-size: .78rem; }

.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; font-weight: 300; color: var(--ivory);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: .7rem .2rem; transition: border-color .35s, background .35s; border-radius: 0;
}
.field textarea { border: 1px solid var(--line); border-radius: 4px; padding: .8rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6c6253; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange);
}
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23c9a86a' stroke-width='1.6'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .2rem center; padding-right: 1.5rem;
}
.field select option { background: var(--bg-2); color: var(--ivory); }

.field input.invalid, .field select.invalid { border-color: #d9534f; }
.field__error { font-size: .78rem; color: #e08a87; min-height: 0; letter-spacing: .02em; text-transform: none; }

/* choice (radios) */
.choice { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .2rem; }
.choice__opt { position: relative; cursor: pointer; flex: 1; min-width: 160px; }
.choice__opt input { position: absolute; opacity: 0; }
.choice__opt span {
  display: block; text-align: center; padding: .9rem 1rem; border: 1px solid var(--line);
  border-radius: 40px; font-size: .92rem; color: var(--muted); transition: all .3s var(--ease);
  text-transform: none; letter-spacing: .02em;
}
.choice__opt:hover span { border-color: var(--bronze); color: var(--ivory); }
.choice__opt input:checked + span { border-color: var(--orange); background: rgba(240,121,43,.1); color: var(--ivory); }
.choice__opt input:focus-visible + span { outline: 2px solid var(--bronze); outline-offset: 2px; }

[data-only-if-yes] { transition: opacity .4s, max-height .5s; }
[data-only-if-yes].hide { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.rsvp__note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: -.4rem; }
.form-status { text-align: center; font-size: .9rem; color: #e08a87; letter-spacing: .01em; }

/* éxito */
.rsvp__success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; padding: 2rem 0; }
.success__mark { width: 130px; margin: 0 auto; animation: pop .6s var(--ease); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  text-align: center; padding: clamp(4rem, 8vw, 6rem) 1.5rem 3rem;
  border-top: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
}
.footer__mark { width: 90px; margin-bottom: .6rem; }
.footer__brand { font-family: var(--display); font-size: 1.5rem; letter-spacing: .08em; }
.footer__tag { text-transform: uppercase; letter-spacing: .3em; font-size: .72rem; color: var(--bronze); }
.footer__mail { color: var(--ivory); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .3s, color .3s; margin-top: .6rem; }
.footer__mail:hover { color: var(--orange); border-color: var(--orange); }
.footer__legal { font-size: .76rem; color: var(--muted); margin-top: 1.5rem; }

/* ============================================================
   REVEAL (animaciones de entrada)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.features .feature:nth-child(2) { transition-delay: .1s; }
.features .feature:nth-child(3) { transition-delay: .2s; }
.timeline li.in { transition-delay: .05s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .details__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; justify-content: center; gap: 2rem;
    background: rgba(12,10,8,.97); backdrop-filter: blur(16px);
    transform: translateX(100%); transition: transform .5s var(--ease);
    border-left: 1px solid var(--line);
  }
  .nav.open { transform: none; }
  .nav a { font-size: 1rem; }
  .nav-toggle { display: flex; z-index: 110; }

  /* boton Acceder: solo icono en movil */
  .header-right { gap: .9rem; }
  .access-link span { display: none; }
  .access-link { padding: .55rem; }

  /* hero: alinea arriba para no recortar el logo en pantallas bajas */
  .hero { min-height: 100svh; justify-content: flex-start; padding: 6.5rem 1.4rem 3.5rem; }
  .hero__mark { width: 92px; margin-bottom: 1.2rem; }
  .eyebrow { margin-bottom: 1.3rem; }
  .hero__lede { margin: 1.4rem auto 2rem; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .scroll-cue { display: none; }

  /* cuenta atrás en 2x2 */
  .countdown__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem 1rem; max-width: 320px; margin-inline: auto; }
  .cd { min-width: 0; }

  .field-row { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 70px 1fr; gap: 1rem; }
  .timeline__time { font-size: 1.4rem; }
}

@media (max-width: 460px) {
  .details__grid { grid-template-columns: 1fr; }
  .hero__meta { font-size: 1rem; gap: .6rem; }
}
