/* Serendeepity — Tu negocio, tu reflejo */
/* Base reset + design tokens */

:root {
  --ink: #0B0A09;
  --ink-2: #131210;
  --ink-3: #1B1916;
  --bone: #F4F1EA;
  --bone-dim: rgba(244, 241, 234, 0.62);
  --bone-mute: rgba(244, 241, 234, 0.40);
  --bone-faint: rgba(244, 241, 234, 0.16);
  --line: rgba(244, 241, 234, 0.10);
  --line-strong: rgba(244, 241, 234, 0.24);
  --star: #D9B97A;
  --star-soft: rgba(217, 185, 122, 0.18);
  --teal: #5BB8B4;

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Instrument Sans", "Söhne", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "DM Mono", ui-monospace, "SFMono-Regular", monospace;

  --page-pad: clamp(20px, 4vw, 56px);
  --gutter: clamp(16px, 2.2vw, 32px);
  --max: 1440px;

  --grain: 0.55;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle film grain — applied as a fixed overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96  0 0 0 0 0.94  0 0 0 0 0.91  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* Selection */
::selection { background: var(--star); color: var(--ink); }

/* Typography ------------------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-mute);
  font-weight: 400;
}
.eyebrow .num { color: var(--star); }
.eyebrow .dash { display: inline-block; width: 22px; height: 1px; background: var(--bone-faint); vertical-align: middle; margin: 0 10px; transform: translateY(-2px); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--bone);
  text-wrap: balance;
}
.display em, .italic { font-style: italic; color: var(--star); font-weight: 400; }

.body-text {
  font-family: var(--sans);
  color: var(--bone-dim);
  line-height: 1.6;
  text-wrap: pretty;
  font-size: 16px;
}

.lead {
  font-family: var(--sans);
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--bone);
  line-height: 1.5;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.mono-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-mute);
}

/* Layout ---------------------------------------------------------------- */

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
  position: relative;
}

.section {
  position: relative;
  padding-top: clamp(60px, 7vw, 110px);
  padding-bottom: clamp(60px, 7vw, 110px);
}

.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(20px, 4vw, 60px);
  margin-bottom: clamp(48px, 6vw, 88px);
  align-items: start;
}
.section-head .eyebrow { padding-top: 8px; }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--bone);
  text-wrap: balance;
  margin: 0;
}

/* Nav ------------------------------------------------------------------- */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px var(--page-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  transition: backdrop-filter 240ms ease, background 240ms ease;
}
.nav-bar.scrolled {
  pointer-events: auto;
  background: linear-gradient(to bottom, rgba(11,10,9,0.78), rgba(11,10,9,0));
  backdrop-filter: blur(12px);
}
.nav-bar > * { pointer-events: auto; }

.brand {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.36em;
  color: var(--bone);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot { width: 6px; height: 6px; background: var(--star); border-radius: 50%; box-shadow: 0 0 12px var(--star); }

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}
.nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}
.nav-links a:hover { color: var(--bone); }
@media (max-width: 880px) { .nav-links { display: none; } }

/* Hamburger + mobile menu ------------------------------------------------- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  pointer-events: auto;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--bone);
}
.nav-cta { pointer-events: auto; }
@media (max-width: 880px) {
  .nav-hamburger { display: flex; }
  .nav-cta { display: none; }
}

.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11, 10, 9, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nav-mobile-menu {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--ink-2);
  border-left: 1px solid var(--line);
  padding: 80px 32px 48px;
  display: flex;
  flex-direction: column;
}
.nav-mobile-menu > a {
  color: var(--bone);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: color 200ms ease;
}
.nav-mobile-menu > a:hover { color: var(--teal); }
.nav-mobile-menu > .btn { margin-top: 32px; justify-content: center; }
.nav-mobile-close {
  position: absolute;
  top: 22px; right: 22px;
  background: transparent;
  border: none;
  color: var(--bone-mute);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 200ms ease;
}
.nav-mobile-close:hover { color: var(--bone); }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 320ms cubic-bezier(.2,.7,.2,1);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 130%, var(--star-soft), transparent 60%);
  opacity: 0;
  transition: opacity 360ms ease;
}
.btn:hover { border-color: var(--star); color: var(--bone); }
.btn:hover::after { opacity: 1; }
.btn .arrow { display: inline-block; transition: transform 320ms ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--bone);
  color: var(--ink);
  border-color: var(--bone);
}
.btn-primary:hover {
  background: var(--star);
  color: var(--ink);
  border-color: var(--star);
}

/* Star glyph ------------------------------------------------------------ */
.star {
  width: 14px; height: 14px;
  display: inline-block;
  position: relative;
}
.star::before, .star::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.star::before {
  inset: 0 6px;
  background: linear-gradient(to bottom, transparent, currentColor, transparent);
}
.star::after {
  inset: 6px 0;
  background: linear-gradient(to right, transparent, currentColor, transparent);
}

/* Hairline divider with star */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--bone-faint);
}
.divider .line { flex: 1; height: 1px; background: currentColor; }
.divider .star { color: var(--star); }

/* Utility -------------------------------------------------------------- */
.cluster { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stack-12 > * + * { margin-top: 12px; }
.stack-20 > * + * { margin-top: 20px; }
.stack-32 > * + * { margin-top: 32px; }
.stack-48 > * + * { margin-top: 48px; }

.muted { color: var(--bone-dim); }
.faint { color: var(--bone-mute); }
.accent { color: var(--star); }
