/* Vaneelee landing.
 *
 * Values marked "measured" were read from the live reference with
 * getComputedStyle; see docs/reference-map.md. Everything else is this site's
 * own decision. The split matters: a measured value should not be "improved"
 * without re-measuring, and an own decision needs no reference to change. */

/* Bodoni Moda, 96pt optical size, weight 700. Deliberately NOT the reference's
   Anton: Vane asked that the lettering not be identical to the page she sent.
   The display cut is the point -- its thick/thin contrast is what reads as
   fashion rather than poster, and it is the one face here that answers her
   photograph instead of shouting over it. Self-hosted: no request leaves this
   domain, which is also what the privacy page promises. */
@font-face {
  font-family: "Bodoni Moda";
  src: url("/assets/fonts/bodoni-moda-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page-bg: #0a0a0a; /* measured */
  --ink: #111827; /* measured — also the button fill */
  --ink-contrast: #ffffff; /* measured */
  --card-bg: #ffffff;

  /* #6b7280 on white is 4.83:1 — above the 4.5:1 floor, which the 11px footer
     needs. Do not lighten it without re-checking. */
  --muted: #6b7280;
  /* The same role on the dark page: #6b7280 there measures 4.1:1 and fails.
     A muted token is relative to its surface, not a single global grey. */
  --muted-on-dark: #9ca3af;
  --hairline: #e5e7eb;
  --tint: #f9fafb;

  --accent: #2563eb; /* own: verified badge, focus ring, selection */
  --ok-bg: #dcfce7;
  --ok-ink: #166534;
  --ok-dot: #22c55e;

  --cover-height: 380px; /* measured */
  --radius-card: 16px;
  --radius-button: 12px; /* measured */
  --card-width: 420px;

  /* Georgia is the fallback, not the platform sans: a serif swapping to a
     sans-serif reflows and changes character; swapping to another serif does
     neither. */
  --font-display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; /* measured */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  padding: 24px 16px;
  /* Keeps the card off the notch and the home indicator on iOS. */
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  /* Not `min-height: 100%`: that resolves against html's auto height, leaves the
     grid with no height to distribute, and the card ends up top-aligned.
     dvh also tracks the mobile browser's collapsing address bar. */
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Browser surfaces -----------------------------------------------------
   The parts nobody draws still ship with the page. Left alone they carry the
   browser's defaults, which belong to no design system. */

::selection {
  background: var(--accent);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--page-bg);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--page-bg);
  border-radius: 999px;
  background: #3f3f46;
}

::-webkit-scrollbar-thumb:hover {
  background: #52525b;
}

html {
  scrollbar-color: #3f3f46 var(--page-bg);
  scrollbar-width: thin;
}

a {
  -webkit-tap-highlight-color: rgb(37 99 235 / 18%);
}

/* One visible focus treatment for every interactive element, rather than
   relying on each one's own default. */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Backdrop -------------------------------------------------------------
   The same cover image, scaled and blurred, standing in for a background.
   Reusing it costs no extra request. */

.backdrop {
  position: fixed;
  inset: -10%; /* overscan, so the blur has no soft edge at the viewport border */
  z-index: -1;
  background: url("/assets/cover.webp") center / cover no-repeat;
  filter: blur(40px) saturate(1.1) brightness(0.72);
  transform: scale(1.1);
}

/* --- Card ----------------------------------------------------------------- */

.card {
  width: 100%;
  max-width: var(--card-width);
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--card-bg);
  /* Two layers: a tight contact shadow that seats the card on the backdrop,
     and a wide one that gives it height above it. */
  box-shadow:
    0 2px 6px rgb(0 0 0 / 30%),
    0 28px 64px rgb(0 0 0 / 45%);
}

.cover {
  display: block;
  width: 100%;
  /* Measured: the reference fixes the height rather than using a ratio. That is
     what keeps the whole card on one screen at every phone width -- a ratio
     would make the card grow with the viewport and push the CTAs below the
     fold. The source image stays 3:4; this crops it. */
  height: var(--cover-height);
  object-fit: cover;
  /* Measured: biased upward so the crop keeps the face, not the midpoint. */
  object-position: 50% 20%;
  background: #1a1a1a; /* visible for the moment before the image decodes */
}

.body {
  padding: 20px 20px 24px;
  text-align: center;
}

.name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-display);
  /* Own, not measured: Bodoni needs more size and more tracking than the
     reference's condensed face to hold the same optical weight, and its thins
     close up without the extra letter-spacing. */
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.06em;
  /* The tracking adds a trailing gap after the last letter; this pulls the
     badge back into optical alignment with it. */
  padding-left: 0.06em;
}

.badge {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok-ink);
  font-size: 13px;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok-dot);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* --- Links ---------------------------------------------------------------- */

.links {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px; /* measured */
  border-radius: var(--radius-button);
  background: var(--ink);
  color: var(--ink-contrast);
  font-size: 14px; /* measured */
  font-weight: 600; /* measured */
  text-decoration: none;
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    background-color 0.18s var(--ease-out);
}

.link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgb(17 24 39 / 24%);
}

.link:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Tertiary action: same shape and rhythm, far less weight, so the two solid
   buttons above keep the eye. */
.link--secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--hairline);
  font-weight: 500;
}

.link--secondary:hover {
  background: var(--tint);
  box-shadow:
    inset 0 0 0 1.5px #d1d5db,
    0 6px 16px rgb(17 24 39 / 10%);
}

.link--secondary:active {
  box-shadow: inset 0 0 0 1.5px var(--hairline);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* --- Socials and footer --------------------------------------------------- */

.socials {
  margin-top: 16px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44px is the touch-target floor; the glyph itself stays 20px. */
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--muted);
  transition:
    color 0.18s var(--ease-out),
    background-color 0.18s var(--ease-out);
}

.social:hover {
  background: var(--tint);
  color: var(--ink);
}

.social svg {
  width: 20px;
  height: 20px;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px; /* measured */
}

.foot a {
  color: inherit;
  text-decoration: none;
  /* The reference's 11px type is kept; only the touch target grows. The
     negative margin cancels the padding so nothing moves visually. */
  padding: 16px 6px;
  margin-block: -16px;
}

.foot a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* --- Entrance -------------------------------------------------------------
   One authored moment, not an effect per element: the card settles, and the
   actions follow it in order. Everything starts visible enough that a failed
   animation can never hide content. */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.card {
  animation: rise 0.55s var(--ease-out) both;
}

.links > *,
.socials,
.foot {
  animation: rise 0.45s var(--ease-out) both;
}

.links > :nth-child(1) {
  animation-delay: 0.16s;
}

.links > :nth-child(2) {
  animation-delay: 0.22s;
}

.links > :nth-child(3) {
  animation-delay: 0.28s;
}

.socials {
  animation-delay: 0.34s;
}

.foot {
  animation-delay: 0.38s;
}

/* --- Prose (privacidad.html) ---------------------------------------------- */

.prose {
  max-width: 68ch;
  margin: 0 auto;
  padding: 48px 20px 64px;
  text-align: left;
}

.prose h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.prose h2 {
  /* More space above a heading than below it: the gap belongs to the section
     it opens. */
  margin: 36px 0 8px;
  font-size: 16px;
  text-wrap: balance;
}

.prose p {
  text-wrap: pretty;
}

.prose a {
  color: #93c5fd;
  text-underline-offset: 3px;
}

.prose .updated {
  margin: 0 0 24px;
  color: var(--muted-on-dark);
  font-size: 13px;
}

.prose .back {
  display: inline-flex;
  align-items: center;
  margin-top: 32px;
  min-height: 44px;
  color: var(--muted-on-dark);
  font-size: 13px;
  text-decoration: none;
}

.prose .back:hover {
  color: #e5e7eb;
}

/* Prose is a page, not the centred card: it overrides the body layout. */
body.page {
  display: block;
  color: #c7cbd4;
  font-size: 15px;
  line-height: 1.65;
}

body.page h1,
body.page h2 {
  color: #e5e7eb;
}

body.page ::selection {
  background: var(--accent);
  color: #ffffff;
}

/* --- Viewport adaptations -------------------------------------------------
   The whole card on one screen is the reference's defining property, and the
   third button costs ~60px. On short viewports the cover gives that back: it is
   the only element that can shrink without losing information, because it is
   already a crop. Keyed on viewport HEIGHT, not width -- height is what runs
   out here. Thresholds chosen from the measured card height (773px at the
   380px cover) plus the 48px of body padding. */

@media (max-height: 820px) {
  :root {
    --cover-height: 280px;
  }
}

@media (max-height: 680px) {
  :root {
    --cover-height: 200px;
  }

  .body {
    padding: 16px 20px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
