/* corapi — archivo / registro. Sin look SaaS genérico. */
:root {
  --ink: #141414;
  --paper: #e7e5df;
  --paper-2: #ddd9d0;
  --mute: #5c5a54;
  --rule: #141414;
  --stamp: #b42318;
  --ok: #1f6b4a;
  --font-display: "Syne", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Ruido de papel sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— Hero: una sola composición ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  color: #f4f2ec;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: hero-drift 18s ease-in-out infinite alternate;
  filter: grayscale(0.35) contrast(1.05) brightness(0.72);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.25) 42%, rgba(10, 10, 10, 0.72) 100%);
}

.hero__top,
.hero__body {
  position: relative;
  z-index: 1;
  padding-inline: var(--pad);
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.25rem;
  max-width: var(--max);
  margin-inline: auto;
  width: 100%;
}

.hero__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.hero__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(2rem, 8vh, 4.5rem);
  max-width: var(--max);
  margin-inline: auto;
  width: 100%;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 14vw, 8.5rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  opacity: 0;
  transform: translateY(0.6rem);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 0 0.85rem;
  opacity: 0;
  transform: translateY(0.5rem);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 34ch;
  color: rgba(244, 242, 236, 0.82);
  font-size: 1.02rem;
  opacity: 0;
  transform: translateY(0.4rem);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  align-items: baseline;
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

.cta {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border: 1px solid #f4f2ec;
  background: #f4f2ec;
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cta:hover {
  background: transparent;
  color: #f4f2ec;
  border-color: #f4f2ec;
}

.cta--ghost {
  background: transparent;
  color: #f4f2ec;
  border-color: rgba(244, 242, 236, 0.55);
  font-weight: 600;
  font-size: 0.92rem;
}

.cta--ghost:hover {
  background: rgba(244, 242, 236, 0.12);
  border-color: #f4f2ec;
}

/* ——— Secciones ——— */
.section {
  padding: clamp(3.5rem, 10vh, 6rem) var(--pad);
  max-width: var(--max);
  margin-inline: auto;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 1rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  max-width: 22ch;
}

.section__text {
  margin: 0 0 1.75rem;
  color: var(--mute);
  max-width: 42ch;
}

.rule {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0;
  opacity: 0.18;
}

/* Curl — sin cards */
.sample.codeblock {
  font-size: clamp(0.72rem, 1.8vw, 0.86rem);
}

.sample pre {
  font-size: inherit;
  line-height: 1.55;
}

.sample span {
  color: #9ad0b8;
}

/* Pricing: filas, no cards */
.plans {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.plans th,
.plans td {
  text-align: left;
  padding: 0.95rem 0.5rem 0.95rem 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.15);
  vertical-align: top;
}

.plans th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}

.plans td:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  width: 16%;
}

.plans td:nth-child(2),
.plans td:nth-child(3) {
  white-space: nowrap;
}

.plans .price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.plans .note {
  color: var(--mute);
  font-size: 0.92rem;
}

.plans-contact {
  margin: 1.25rem 0 0;
  color: var(--mute);
  font-size: 0.95rem;
  max-width: 36rem;
}

.plans-contact a {
  color: var(--ink);
  text-underline-offset: 0.15em;
}

.plans-contact a:hover {
  color: var(--stamp);
}

/* Docs page */
.docs-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--pad);
  padding-block: 2.5rem 4rem;
}

.docs-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(20, 20, 20, 0.18);
}

.docs-nav a {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
}

.docs-nav span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.docs-wrap h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.docs-wrap h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 2.25rem 0 0.65rem;
  letter-spacing: -0.02em;
}

.docs-wrap p,
.docs-wrap li {
  color: var(--mute);
}

.docs-wrap code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
}

.docs-wrap pre,
.codeblock pre {
  background: transparent;
  color: #e8e6df;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
}

.codeblock {
  position: relative;
  background: var(--ink);
  color: #e8e6df;
  padding: 1rem 1.1rem;
  margin: 0.85rem 0 1.1rem;
}

.codeblock pre {
  margin: 0;
  padding-right: 2.25rem;
  overflow-x: auto;
}

.codeblock__copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(232, 230, 223, 0.18);
  border-radius: 0.35rem;
  background: rgba(20, 20, 20, 0.55);
  color: #b8b5ad;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.codeblock__copy:hover {
  color: #f4f2ec;
  border-color: rgba(232, 230, 223, 0.45);
  background: rgba(40, 40, 40, 0.85);
}

.codeblock__copy svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
}

.codeblock__copy .icon-check {
  display: none;
}

.codeblock__copy.is-copied {
  color: #9ad0b8;
  border-color: rgba(154, 208, 184, 0.45);
}

.codeblock__copy.is-copied .icon-copy {
  display: none;
}

.codeblock__copy.is-copied .icon-check {
  display: block;
}

/* Signup embebido en home */
.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 800px) {
  .signup-grid {
    grid-template-columns: 1fr;
  }
}

.signup-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.4rem;
}

.signup-form input {
  width: 100%;
  padding: 0.75rem 0;
  margin-bottom: 1.15rem;
  border: 0;
  border-bottom: 1px solid rgba(20, 20, 20, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}

.signup-form input:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.signup-form input::placeholder {
  color: #9a978f;
}

.signup-form button[type="submit"] {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #f4f2ec;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.signup-form button[type="submit"]:hover {
  background: transparent;
  color: var(--ink);
}

.signup-form button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.signup-meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--mute);
}

.signup-err {
  margin-top: 0.85rem;
  color: var(--stamp);
  font-size: 0.92rem;
}

.signup-ok h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ok);
  margin: 0 0 0.65rem;
}

.signup-key {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
  background: var(--ink);
  color: #e8e6df;
  padding: 1rem 1.1rem;
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.footer {
  padding: 2rem var(--pad) 2.5rem;
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid rgba(20, 20, 20, 0.15);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.footer a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  border-bottom-color: currentColor;
  color: var(--ink);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-1.2%, 0.6%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img,
  .brand,
  .headline,
  .lede,
  .cta-row {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .hero__meta {
    display: none;
  }

  .plans td:first-child {
    width: 30%;
  }
}
