/* =============================================================
   1. Tokens
   ============================================================= */
@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x     { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --mesh-y     { syntax: "<percentage>"; inherits: false; initial-value: 50%; }

:root {
  --bg:        #12100d;
  --bg-2:      #191510;
  --bg-3:      #221c15;
  --cream:     #f3ecdd;
  --cream-2:   #ddd0b8;
  --cream-3:   #8c8170;
  --accent:    #b08d57;
  --accent-2:  #8a6a3d;
  --line:      rgba(243,236,221,.12);
  --line-strong: rgba(243,236,221,.22);

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:  "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--cream-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); font-weight: 500; color: var(--cream); }
em { font-style: italic; color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  border-radius: 8px; font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px)  { .container { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }

.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.kicker::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

.section { position: relative; padding-block: clamp(4rem, 9vw, 8rem); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-top: .9rem; }

.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95rem 1.8rem;
  font-family: var(--sans); font-size: .92rem; font-weight: 600;
  letter-spacing: .01em;
  border-radius: 999px;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s, color .3s;
}
.btn-primary {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 4px 14px rgba(176,141,87,.18);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(176,141,87,.28), 0 8px 18px rgba(0,0,0,.3);
}
.btn-ghost {
  border: 1px solid var(--line-strong); color: var(--cream);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

/* =============================================================
   4. Reveal / reduced-motion baseline
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-mesh, .cta-mesh { animation: none; }
  .particles { display: none; }
}

/* =============================================================
   5. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease-out), clip-path 1s var(--ease-out);
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-mark {
  font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 6vw, 3.4rem);
  color: var(--cream); letter-spacing: .02em;
}
.splash-line {
  display: block; width: 64px; height: 1px; background: var(--accent);
  margin: 1rem auto 0; transform-origin: left;
  animation: splashLine 1.6s var(--ease-soft) infinite;
}
@keyframes splashLine { 0%,100% { transform: scaleX(.4); } 50% { transform: scaleX(1); } }

/* =============================================================
   6. Cursor
   ============================================================= */
.cursor {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  display: none; mix-blend-mode: difference; opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; will-change: transform; }
.cursor-dot { width: 5px; height: 5px; margin: -2.5px; background: var(--cream); border-radius: 50%; }
.cursor-ring {
  width: 30px; height: 30px; margin: -15px; border: 1px solid var(--cream); border-radius: 50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out);
}
.cursor.is-interactive .cursor-ring { width: 46px; height: 46px; margin: -23px; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* =============================================================
   7. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  padding-block: 1.4rem;
  transition: background-color .4s var(--ease-out), padding .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s;
}
.nav.is-scrolled {
  background: rgba(18,16,13,.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
  padding-block: .9rem;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-logo { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--cream); }
.nav-links { display: none; align-items: center; gap: 2.2rem; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link { position: relative; font-size: .88rem; letter-spacing: .02em; color: var(--cream-2); padding: .25rem 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
@media (min-width: 960px) { .nav-cta { display: inline-flex; padding: .7rem 1.4rem; font-size: .82rem; } }

.nav-burger {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: 50%;
}
@media (min-width: 960px) { .nav-burger { display: none; } }
.nav-burger span { position: relative; width: 16px; height: 1px; background: var(--cream); }
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: var(--cream);
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg); color: var(--cream);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile-links { display: flex; flex-direction: column; gap: 1.6rem; text-align: center; }
.nav-mobile-links a { font-family: var(--serif); font-style: italic; font-size: 2.1rem; }
.nav-mobile-close { position: absolute; top: 1.6rem; right: 1.6rem; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; }

/* =============================================================
   8. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
  padding-block: 7rem 4.5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(18,16,13,.96) 6%, rgba(18,16,13,.55) 45%, rgba(18,16,13,.35) 100%),
    linear-gradient(100deg, rgba(18,16,13,.9) 0%, rgba(18,16,13,.35) 46%, rgba(18,16,13,.15) 70%);
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(50% 45% at var(--mesh-x) var(--mesh-y), rgba(176,141,87,.32), transparent 65%),
    conic-gradient(from var(--mesh-angle), rgba(176,141,87,.16), rgba(139,129,112,.06), rgba(176,141,87,.16));
  filter: blur(55px) saturate(120%);
  opacity: .8;
  mix-blend-mode: screen;
  animation: meshShift 26s linear infinite;
  will-change: auto;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 18%; --mesh-y: 30%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 55%; --mesh-y: 65%; }
  100% { --mesh-angle: 360deg; --mesh-x: 18%; --mesh-y: 30%; }
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .15; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
.hero-content { position: relative; max-width: 700px; }
.hero-title {
  font-size: clamp(2.6rem, 6.6vw, 5.2rem);
  font-style: italic;
  margin-top: 1rem;
  max-width: 14ch;
}
.hero-sub {
  margin-top: 1.4rem; max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--cream-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.hero-meridian {
  position: absolute; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; color: var(--cream-3);
  padding-top: 2.5rem;
}
.hero-meridian::before {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}

/* =============================================================
   9. About / historia
   ============================================================= */
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) {
  .about-grid { grid-template-columns: .8fr 1fr; gap: 5rem; align-items: start; }
  .about-figure { position: sticky; top: 7rem; }
}
.about-figure {
  border-radius: 4px; overflow: hidden; aspect-ratio: 5/6;
  position: relative; isolation: isolate;
}
.about-figure img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.28) saturate(1.05) contrast(1.02); }
.about-figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(18,16,13,.65) 100%);
}
.about-text p { font-size: 1.05rem; max-width: 56ch; margin-bottom: 1.4rem; }
.about-text p:first-of-type { font-size: 1.2rem; color: var(--cream); }

/* =============================================================
   10. Oficio / proceso
   ============================================================= */
.oficio-figure {
  border-radius: 4px; overflow: hidden; aspect-ratio: 16/8; margin-bottom: 3.5rem;
  position: relative;
}
.oficio-figure img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) contrast(1.03); }
.oficio-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(18,16,13,.55), transparent 55%); }
.oficio-caption {
  position: absolute; left: 1.5rem; bottom: 1.2rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; color: var(--cream-2);
}

.pillars { display: grid; gap: 2.4rem; }
@media (min-width: 720px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.pillar-n { font-family: var(--mono); color: var(--accent); font-size: .85rem; letter-spacing: .1em; }
.pillar h3 { font-size: 1.5rem; margin-top: .6rem; font-style: italic; }
.pillar p { margin-top: .7rem; color: var(--cream-3); font-size: .96rem; }
.pillar { border-top: 1px solid var(--line); padding-top: 1.6rem; }

.craft-strip { margin-top: 3.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .craft-strip { grid-template-columns: 1.3fr 1fr; align-items: center; gap: 3rem; } }
.craft-strip img { border-radius: 4px; aspect-ratio: 4/3; object-fit: cover; filter: grayscale(.1); }
.craft-strip-text p { color: var(--cream-3); }
.craft-strip-text .kicker { margin-bottom: .8rem; }

/* =============================================================
   11. Colección
   ============================================================= */
.bento {
  display: grid; gap: 1.1rem; grid-template-columns: 1fr;
  grid-auto-rows: minmax(340px, auto);
}
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(300px, auto); } }
@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 300px;
  }
  .bento .card:nth-child(1) { grid-column: span 5; grid-row: span 2; }
  .bento .card:nth-child(2) { grid-column: span 4; grid-row: span 1; }
  .bento .card:nth-child(3) { grid-column: span 3; grid-row: span 1; }
  .bento .card:nth-child(4) { grid-column: span 4; grid-row: span 1; }
  .bento .card:nth-child(5) { grid-column: span 3; grid-row: span 1; }
}

.card {
  position: relative; border-radius: 6px; overflow: hidden; isolation: isolate;
  background: var(--bg-3);
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), box-shadow .45s var(--ease-soft);
}
.card.has-tilt:hover { transition-duration: .15s; }
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(176,141,87,.28), transparent 62%);
  opacity: 0; transition: opacity .35s; mix-blend-mode: screen;
}
.card:hover::before { opacity: 1; }
.card:hover {
  box-shadow: 0 40px 90px -25px rgba(0,0,0,.55), 0 0 0 1px rgba(176,141,87,.22);
}
.card-img { position: absolute; inset: 0; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-soft), filter .55s; }
.card:hover .card-img img { transform: scale(1.08) translateZ(0); filter: saturate(1.1) brightness(1.03); }
.card-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,9,7,.92) 0%, rgba(10,9,7,.15) 55%, transparent 75%); }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.3rem 1.4rem; transform: translateZ(30px); }
.card-note { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.card-title { font-size: 1.35rem; margin-top: .3rem; font-style: italic; }
.card-desc { font-size: .86rem; color: var(--cream-3); margin-top: .4rem; max-width: 34ch; }

/* =============================================================
   12. Testimonios
   ============================================================= */
.testi-grid { display: grid; gap: 1.6rem; }
@media (min-width: 860px) { .testi-grid { grid-template-columns: repeat(3, 1fr); } }
.testi-card { border: 1px solid var(--line); border-radius: 6px; padding: 2rem 1.8rem; background: var(--bg-2); }
.testi-quote { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--cream); line-height: 1.35; }
.testi-author { margin-top: 1.4rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--cream-3); }
.testi-author::before { content: "— "; }

/* =============================================================
   13. Contacto
   ============================================================= */
.cta-mesh {
  position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 40% at 30% 40%, rgba(176,141,87,.2), transparent 65%);
  filter: blur(60px); animation: meshShift 30s linear infinite reverse;
}
.contact-grid { display: grid; gap: 3rem; position: relative; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: .9fr 1.1fr; gap: 5rem; } }
.contact-info dl { margin-top: 2rem; display: grid; gap: 1.1rem; }
.contact-info dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); }
.contact-info dd { font-size: 1.05rem; color: var(--cream); margin-top: .2rem; }

.field { position: relative; margin-bottom: 1.4rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 1.4rem 1rem .6rem; border: 1px solid var(--line-strong); border-radius: 4px;
  background: var(--bg-2); color: var(--cream); font-family: var(--sans); font-size: 1rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field label {
  position: absolute; left: 1rem; top: 1.1rem; pointer-events: none;
  color: var(--cream-3); transition: all .25s var(--ease-out);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label { top: .45rem; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.field-row { display: grid; gap: 1.4rem; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }

.cta-form { position: relative; transition: opacity .55s var(--ease-out), transform .55s var(--ease-soft); }
.cta-form.is-sent { opacity: 0; transform: translateY(-12px); pointer-events: none; position: absolute; inset: 0; }
.cta-submit { position: relative; width: 100%; justify-content: center; margin-top: .5rem; }
.cta-form-spinner, .cta-form-check { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; }
.cta-form.is-sending .cta-form-label { opacity: 0; }
.cta-form.is-sending .cta-form-spinner { opacity: 1; }
.cta-form-spinner::after {
  content: ""; width: 18px; height: 18px; border: 1.5px solid rgba(18,16,13,.3); border-top-color: var(--bg);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cta-success {
  position: relative; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .8s var(--ease-out) .2s, transform .8s var(--ease-soft) .2s;
  border: 1px solid var(--line); border-radius: 6px; padding: 2.4rem; text-align: center;
}
.cta-success.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cta-success h3 { font-style: italic; font-size: 1.6rem; }
.cta-success p { margin-top: .6rem; color: var(--cream-3); }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { border-top: 1px solid var(--line); padding-block: 3.5rem 2.5rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.5fr 1fr; } }
.footer-logo { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--cream); }
.footer-tag { margin-top: .8rem; color: var(--cream-3); max-width: 32ch; font-size: .92rem; }
.footer-col h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); font-style: normal; margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; font-size: .92rem; color: var(--cream-2); margin-bottom: .6rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .78rem; color: var(--cream-3);
}
.footer-bottom a:hover { color: var(--accent); }

/* =============================================================
   15. Split text
   ============================================================= */
.split-word, .split-char { display: inline-block; }

/* =============================================================
   16. Credits page
   ============================================================= */
.page-credits { padding-top: 8rem; }
.credits-list { list-style: none; margin-top: 2rem; display: grid; gap: 1rem; max-width: 640px; }
.credits-list li { border-bottom: 1px solid var(--line); padding-bottom: 1rem; font-size: .92rem; color: var(--cream-3); }
.credits-list a { color: var(--accent); }
.back-link { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; }
.back-link:hover { color: var(--accent); }
