:root {
  --ink: #15110c;
  --ink-soft: #241d15;
  --paper: #f4efe2;
  --paper-line: #e3dcc9;
  --paper-margin: #d6785f;
  --orange: #ff5a1f;
  --orange-deep: #c93a00;
  --graphite: #a89f8d;
  --graphite-dim: #6f6656;
  --blue-ink: #2c4a9e;
  --radius: 18px;
  --max-w: 920px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(255, 90, 31, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(44, 74, 158, 0.10), transparent 60%),
    var(--ink);
  color: var(--paper);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 56px) 0;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo .mark {
  background: var(--orange);
  color: var(--ink);
  padding: 3px 10px 5px;
  border-radius: 6px;
  font-size: 1.15rem;
  line-height: 1;
  transform: rotate(-2deg);
  box-shadow: 0 3px 0 var(--orange-deep);
}

.logo .place {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--graphite);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}

.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.55);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(255, 90, 31, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0);
  }
}

/* Main */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(16px, 5vw, 56px) 40px;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  background:
    repeating-linear-gradient(var(--paper),
      var(--paper) 37px,
      var(--paper-line) 38px);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 52px clamp(24px, 6vw, 72px) 44px 72px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(255, 255, 255, 0.4) inset;
  overflow: hidden;
}

.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 46px;
  width: 2px;
  background: var(--paper-margin);
  opacity: 0.55;
}

/* Layout: texto + mascota */
.sheet-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.sheet-text {
  flex: 1 1 420px;
  min-width: 0;
}

.sheet-mascot {
  flex: 0 0 auto;
  align-self: flex-end;
}

.sheet-mascot img {
  display: block;
  width: clamp(140px, 22vw, 240px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.28));
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-deep);
  font-weight: 500;
  margin: 0 0 18px;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 8px;
  max-width: 14ch;
}

.underline-wrap {
  position: relative;
  width: min(420px, 90%);
  height: 26px;
  margin-bottom: 22px;
}

.underline-wrap svg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}

.ink-stroke {
  fill: none;
  stroke: var(--orange);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 1.4s 0.5s cubic-bezier(.65, 0, .35, 1) forwards;
}

.pen {
  transform-origin: 6px 6px;
  animation: writeMove 1.4s 0.5s cubic-bezier(.65, 0, .35, 1) forwards,
    float 3.4s 2.1s ease-in-out infinite;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes writeMove {
  0% {
    transform: translate(0px, 0px) rotate(-38deg);
  }

  100% {
    transform: translate(380px, -2px) rotate(-38deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translate(380px, -2px) rotate(-38deg);
  }

  50% {
    transform: translate(380px, -8px) rotate(-32deg);
  }
}

p.lead {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.notify {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.notify span.label {
  font-size: 0.78rem;
  color: var(--graphite-dim);
}

.notify a.contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  transition: transform 0.18s ease, background 0.18s ease;
}

.notify a.contact:hover {
  background: var(--orange-deep);
  transform: translateY(-2px);
}

.notify a.contact:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.notify a.contact svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.ink-blot {
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  bottom: -40px;
  background: radial-gradient(circle at 40% 40%, var(--blue-ink), transparent 70%);
  opacity: 0.10;
  border-radius: 50%;
  pointer-events: none;
}

/* Footer */
footer {
  padding: 18px clamp(20px, 5vw, 56px) 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--graphite-dim);
  letter-spacing: 0.02em;
}

footer .socials {
  display: flex;
  gap: 14px;
}

footer .socials a {
  display: flex;
  color: var(--graphite);
  opacity: 0.8;
  transition: opacity 0.18s ease, color 0.18s ease;
}

footer .socials a:hover {
  opacity: 1;
  color: var(--orange);
}

footer .socials svg {
  width: 16px;
  height: 16px;
}

/* Rastro de tinta del cursor */
.ink-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-ink);
  pointer-events: none;
  z-index: 999;
  animation: dotFade 0.9s ease-out forwards;
}

@keyframes dotFade {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

@media (max-width: 640px) {
  .sheet {
    padding: 40px 22px 34px 46px;
  }

  .sheet::before {
    left: 26px;
  }

  h1 {
    max-width: 100%;
  }

  .underline-wrap {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
  }

  .sheet-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .sheet-mascot {
    order: -1;
    align-self: center;
  }

  .sheet-mascot img {
    width: clamp(120px, 40vw, 180px);
  }

  @keyframes writeMove {
    0% {
      transform: translate(0px, 0px) rotate(-38deg);
    }

    100% {
      transform: translate(220px, -2px) rotate(-38deg);
    }
  }

  @keyframes float {

    0%,
    100% {
      transform: translate(220px, -2px) rotate(-38deg);
    }

    50% {
      transform: translate(220px, -8px) rotate(-32deg);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .ink-stroke {
    animation: none;
    stroke-dashoffset: 0;
  }

  .pen {
    animation: none;
    transform: translate(380px, -2px) rotate(-38deg);
  }

  .status .dot {
    animation: none;
  }
}