/* Kaimar · piel base. Noche de mar (tinta), hueso (washi) y yuzu.
   Los widgets leen las variables de :root y las piezas .btn, .chip, .add, .stepper, .eyebrow, .display, .toast. */
:root {
  --ink: #0b1a2a;
  --ink-2: #11253a;
  --ink-3: #1a334d;
  --paper: #f2ede4;
  --paper-2: #e6dfd2;
  --yuzu: #e4ec55;
  --yuzu-2: #eef37f;
  --prawn: #e5533a;
  --orange: var(--yuzu);      /* acento de los widgets */
  --orange-2: var(--yuzu-2);
  --tomato: var(--prawn);
  --on-accent: #0b1a2a;
  --logo-cut: var(--ink);
  --line-dark: rgba(242, 237, 228, 0.12);
  --line-light: rgba(11, 26, 42, 0.14);
  --muted-dark: rgba(242, 237, 228, 0.64);
  --muted-light: rgba(11, 26, 42, 0.62);
  --radius: 22px;
  --radius-sm: 14px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
main { overflow-x: clip; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 17px; line-height: 1.5; overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.is-locked { overflow: hidden; }
/* grano de papel sobre todo, muy sutil */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--yuzu); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yuzu); outline-offset: 3px; }

/* ---------- piezas que usan los widgets ---------- */
.eyebrow { margin: 0 0 14px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--yuzu); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.display { margin: 0; font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 85; font-size: clamp(40px, 6.4vw, 92px); line-height: .95; letter-spacing: -.035em; }
.display em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--yuzu); }

.btn {
  --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 22px;
  border-radius: 999px; border: 0; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .4s var(--ease), background .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn--big { --h: 58px; padding: 0 30px; font-size: 16px; }
.btn--small { --h: 42px; padding: 0 16px; font-size: 14px; }
.btn--orange { background: var(--yuzu); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(228, 236, 85, .55); }
.btn--orange:hover { background: var(--yuzu-2); }
.btn--ghost { background: rgba(242, 237, 228, .1); color: var(--paper); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(242, 237, 228, .22); }
.btn--ghost:hover { background: rgba(242, 237, 228, .18); }
.btn--line { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip { flex: none; height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line-light); background: transparent; font-weight: 600; font-size: 14px; }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.add { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--yuzu); color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); transition: transform .3s var(--ease); }
.add:hover { transform: scale(1.08) rotate(90deg); }
.add svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.stepper { display: inline-flex; align-items: center; height: 40px; border-radius: 999px; background: var(--yuzu); color: var(--ink); overflow: hidden; }
.stepper button { width: 36px; height: 40px; background: none; border: 0; font-size: 18px; font-weight: 600; color: inherit; }
.stepper span { min-width: 18px; text-align: center; font-weight: 700; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--paper); color: var(--ink); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: opacity .3s, transform .4s var(--ease); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.fly-dot { position: fixed; width: 18px; height: 18px; border-radius: 50%; background: var(--yuzu); z-index: 130; pointer-events: none; box-shadow: 0 0 20px var(--yuzu); }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 110; animation: loader-safety 1s var(--ease) 3.5s forwards; background: var(--ink); display: grid; place-items: center; transition: clip-path 1.1s var(--ease); clip-path: inset(0 0 0 0); }
.loader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader__mark { width: 74px; height: 74px; color: var(--yuzu); animation: rise 1.4s var(--ease) both; }
@keyframes loader-safety { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes rise { from { transform: translateY(30px) scale(.7); opacity: 0; } }

/* ---------- barra de arriba ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px var(--gutter); transition: background .4s, padding .4s var(--ease), box-shadow .4s; /* el transform lo anima GSAP */
}
.nav.is-solid { background: rgba(11, 26, 42, .78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); padding-top: 10px; padding-bottom: 10px; box-shadow: 0 1px 0 var(--line-dark); }
/* la marca: una sola definición (sol con olas + "kaimar" con "mar" en yuzu), sólo cambia el tamaño */
.lockup { --lockup-size: 30px; display: inline-flex; align-items: center; gap: .28em; font-size: var(--lockup-size); text-decoration: none; color: var(--paper); line-height: 1; }
.lockup__mark { width: 1.05em; height: 1.05em; flex: none; color: var(--yuzu); --logo-cut: var(--ink); }
a.lockup .lockup__mark { transition: transform .8s var(--ease); }
/* la palabra "kaimar": letra por letra, cada una con su sombra (en em, escala con el tamaño)
   para que se separe de la siguiente donde se enciman. Misma pieza en portada, arriba y pie. */
.wordmark { display: inline-flex; font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 75; letter-spacing: -.05em; line-height: .85; color: var(--paper); white-space: nowrap; }
.wordmark b { display: inline-block; font-weight: inherit; text-shadow: 0 .015em .075em rgba(8, 21, 35, .5), 0 .005em .015em rgba(8, 21, 35, .45); }
.wordmark--duo .wordmark__mar { color: var(--yuzu); }
a.lockup:hover .lockup__mark { transform: rotate(-20deg); }
.nav__links { display: flex; gap: 6px; }
.nav__links a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: background .3s; }
.nav__links a:hover { background: rgba(242, 237, 228, .1); }
.nav__actions { display: flex; gap: 8px; align-items: center; }
.nav__me {
  height: 42px; border-radius: 999px; border: 1px solid rgba(242, 237, 228, .3); background: rgba(242, 237, 228, .06);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav__me { width: 42px; }
.nav__me.is-in { background: var(--yuzu); color: var(--ink); border-color: var(--yuzu); }
.nav__me svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.nav__count { background: var(--ink); color: var(--yuzu); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
@media (max-width: 920px) { .nav__links { display: none; } }
@media (max-width: 520px) {
  .nav__logo { --lockup-size: 26px; }
  .nav__order span { display: none; }
  .nav__order { padding: 0 14px; }
}
