/* Obsidian Edge Studio — estilos de marca.
   Firma visual: obsidiana con filo de luz orquídea; dorado como acento escaso. */

:root {
  --obsidian: #08060b;
  --surface: #141019;
  --raised: #1b1522;
  --line: #2a2235;
  --violet: #7c3aed;
  --violet-soft: #a855f7;
  --orchid: #e48cfc;
  --gold: #d4af37;
  --ink: #fafaf9;
  --mute: #a8a0b3;
  --edge: linear-gradient(115deg, #9244b0 0%, #e48cfc 45%, #f6d9ff 52%, #e48cfc 60%, #7c3aed 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { background: var(--obsidian); }
body { overflow-x: hidden; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 8px; background: var(--violet); color: var(--ink);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

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

/* ── Fondo ── */
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(124, 58, 237, 0.20), transparent 60%),
    radial-gradient(45rem 35rem at -10% 40%, rgba(107, 33, 168, 0.14), transparent 60%),
    radial-gradient(30rem 20rem at 50% 110%, rgba(212, 175, 55, 0.05), transparent 70%),
    var(--obsidian);
}

/* ── Tipografía de marca ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mute);
}
.eyebrow::before {
  content: ""; width: 1.75rem; height: 1px; background: var(--edge);
}

.section-title {
  font-family: "Bodoni Moda", ui-serif, Georgia, serif;
  font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 0.98; letter-spacing: -0.02em; font-weight: 400;
}

.edge-text {
  font-style: italic;
  background: var(--edge); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: edge-sweep 9s var(--ease) infinite;
  padding-right: 0.08em; /* evita que la itálica se corte */
}
@keyframes edge-sweep {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.gold-rule { display: block; width: 3.5rem; height: 2px; background: var(--gold); border-radius: 2px; }

.hairline { height: 1px; background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent); }

/* ── Header ── */
.site-header { transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(8, 6, 11, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: rgba(42, 34, 53, 0.7);
}
.nav-link { display: inline-block; white-space: nowrap; padding: 0.5rem 0.85rem; border-radius: 10px; transition: color 0.2s, background-color 0.2s; }
.nav-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }

.menu-btn { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-link { display: block; padding: 0.85rem 0.25rem; font-size: 1.15rem; border-bottom: 1px solid var(--line); }

/* ── Botones ── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 46px; padding: 0 1.3rem; border-radius: 10px;
  font-size: 0.92rem; font-weight: 500; transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.25s, border-color 0.25s;
}
.btn-primary {
  background: var(--violet); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(228, 140, 252, 0.35) inset, 0 10px 30px -10px rgba(124, 58, 237, 0.7);
}
.btn-primary:hover { transform: translateY(-1px); background: #8b4bf0; box-shadow: 0 0 0 1px rgba(228, 140, 252, 0.6) inset, 0 14px 36px -10px rgba(124, 58, 237, 0.9); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(228, 140, 252, 0.5); background: rgba(124, 58, 237, 0.08); }

/* ── Hero ── */
.hero-mark { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-ring {
  position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(124, 58, 237, 0.35), rgba(8, 6, 11, 0) 65%);
}
.hero-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1px;
  background: conic-gradient(from 0deg, transparent 0 70%, #e48cfc 82%, #f6d9ff 85%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 14s linear infinite;
}
.hero-logo {
  position: relative; width: 92%; height: auto;
  filter: drop-shadow(0 30px 60px rgba(124, 58, 237, 0.45));
  animation: float 8s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.strip-link { display: inline-flex; align-items: center; gap: 0.6rem; transition: color 0.2s; }
.strip-link:hover { color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mute); }
.dot-produccion { background: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, 0.6); }
.dot-desarrollo { background: var(--orchid); }
.dot-proximamente { background: var(--gold); }

/* ── Secciones ── */
.section { padding-top: clamp(5rem, 11vw, 9rem); scroll-margin-top: 4rem; }

.principle { border-top: 1px solid var(--line); padding-top: 1rem; }
.principle dt { color: var(--ink); font-weight: 500; font-size: 1rem; }
.principle dd { margin-top: 0.35rem; font-size: 0.92rem; line-height: 1.5; }

/* Servicios */
.service {
  position: relative; display: flex; flex-direction: column; gap: 0.75rem;
  padding: 2rem 1.75rem; background: var(--obsidian);
  transition: background-color 0.35s;
}
.service:hover { background: var(--surface); }
@media (min-width: 640px) { .service { min-height: 17rem; } }
.service-num { font-family: "Geist Mono", monospace; font-size: 0.72rem; color: var(--mute); letter-spacing: 0.15em; }
.service-icon {
  width: 30px; height: 30px; margin-top: auto; margin-bottom: 0.5rem;
  fill: none; stroke: var(--orchid); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}
.service:hover .service-icon { transform: translateY(-3px) rotate(-4deg); }
.service h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.service p { color: var(--mute); font-size: 0.93rem; line-height: 1.55; }
.service::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: var(--edge); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.service:hover::after { transform: scaleX(1); }

/* Filtros */
.filter-chip {
  min-height: 38px; padding: 0 0.95rem; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.82rem; color: var(--mute); transition: all 0.2s;
}
.filter-chip:hover { color: var(--ink); }
.filter-chip[aria-selected="true"] { color: var(--ink); border-color: rgba(228, 140, 252, 0.55); background: rgba(124, 58, 237, 0.14); }

/* Tarjetas de proyecto: vidrio ahumado + filo de luz al pasar el mouse */
.project-card {
  position: relative; border-radius: 20px; padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.05));
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.project-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(124, 58, 237, 0.55); }
.project-card:hover::before { opacity: 1; }
.project-inner {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.75rem; border-radius: 19px;
  background: linear-gradient(170deg, rgba(27, 21, 34, 0.96), rgba(17, 11, 23, 0.96));
}
.is-featured .project-inner {
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(124, 58, 237, 0.18), transparent 60%),
    linear-gradient(170deg, rgba(27, 21, 34, 0.96), rgba(17, 11, 23, 0.96));
}
@media (min-width: 768px) {
  .project-inner { padding: 2.25rem; }
  .is-featured .project-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
  .is-featured .project-body > p { font-size: 1.08rem; }
}
.project-body { display: flex; flex-direction: column; gap: 1.25rem; }
.project-logo {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; padding: 8px;
  border-radius: 14px; background: var(--obsidian); border: 1px solid var(--line); color: var(--orchid); overflow: hidden;
}
.project-points { display: grid; gap: 0.55rem; font-size: 0.92rem; color: var(--ink); }
.project-points li { display: flex; gap: 0.7rem; align-items: baseline; }
.project-points li::before { content: ""; flex: none; width: 10px; height: 1px; background: var(--gold); transform: translateY(-3px); }

.badge {
  flex: none; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.65rem; border-radius: 999px; font-size: 0.7rem; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--line);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { color: #86efac; border-color: rgba(134, 239, 172, 0.25); background: rgba(74, 222, 128, 0.06); }
.badge-dev { color: var(--orchid); border-color: rgba(228, 140, 252, 0.3); background: rgba(228, 140, 252, 0.06); }
.badge-soon { color: var(--gold); border-color: rgba(212, 175, 55, 0.3); background: rgba(212, 175, 55, 0.06); }

.chip { padding: 0.25rem 0.6rem; border-radius: 6px; font-family: "Geist Mono", monospace; font-size: 0.68rem; color: var(--mute); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(42, 34, 53, 0.8); }

.card-link { font-size: 0.9rem; color: var(--mute); transition: color 0.2s; }
.card-link:hover { color: var(--ink); }
.card-link-main { color: var(--orchid); font-weight: 500; }
.card-link-main:hover { color: #f3c4ff; }
.link-disabled { font-size: 0.9rem; color: var(--gold); opacity: 0.85; }

/* En el taller */
.taller {
  margin-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.75rem; border-radius: 20px; border: 1px dashed rgba(228, 140, 252, 0.28);
  background: repeating-linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0 12px, transparent 12px 24px);
}
.taller[hidden] { display: none; }
.taller-icon { width: 22px; height: 22px; fill: none; stroke: var(--orchid); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.taller-name { font-size: 1.15rem; font-weight: 600; letter-spacing: 0.08em; }

/* ── CTA ── */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(50rem 25rem at 0% 100%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(30rem 20rem at 100% 0%, rgba(228, 140, 252, 0.10), transparent 60%),
    var(--surface);
}
.cta::after {
  content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: var(--edge);
}
.contact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 60px; padding: 0 1.25rem; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(8, 6, 11, 0.5);
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s var(--ease);
}
.contact-row:hover { border-color: rgba(228, 140, 252, 0.5); background: rgba(124, 58, 237, 0.1); transform: translateX(3px); }
.contact-row.is-main { border-color: rgba(124, 58, 237, 0.6); background: rgba(124, 58, 237, 0.16); }
.contact-value { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ── Aparición al scroll ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.project-card.reveal.is-visible:hover { transform: translateY(-4px); }

/* Sin JS, todo visible */
.no-js .reveal { opacity: 1; transform: none; }

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