/* ---- Reset & base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #16324f;
  --navy-light: #1f4568;
  --teal: #2f7a78;
  --coral: #e8734a;
  --coral-dark: #cf5c34;
  --cream: #faf6f0;
  --cream-dark: #f1e9db;
  --ink: #23282b;
  --ink-soft: #5a6469;
  --line: #e4dccb;
  --radius: 14px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.2;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
h3 { font-size: 1.15rem; margin-bottom: 6px; color: var(--navy); }

a { color: inherit; }

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 16px;
}

p { margin-bottom: 12px; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo span {
  display: inline-block;
  color: #fff;
  font-style: italic;
  font-weight: 800;
  font-size: 0.62em;
  letter-spacing: -0.01em;
  background: var(--coral);
  padding: 5px 14px;
  border-radius: 999px;
  transform: rotate(-2deg);
  box-shadow: 0 4px 10px rgba(232,115,74,0.35);
}

.header-nav { display: flex; gap: 24px; }
.header-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--coral); }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  background:
    radial-gradient(circle at 85% 15%, rgba(232,115,74,0.12), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(47,122,120,0.10), transparent 50%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  z-index: 0;
  animation: drift 14s ease-in-out infinite;
}
.hero-blob-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(232,115,74,0.5), transparent 70%);
  top: -140px; right: -100px;
}
.hero-blob-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(47,122,120,0.45), transparent 70%);
  bottom: -160px; left: -80px;
  animation-delay: -6s;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -16px) scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text { max-width: 560px; flex: 1 1 420px; }

.hero-art {
  position: relative;
  flex: 0 0 auto;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art-circle {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffffff, var(--cream-dark));
  box-shadow: 0 20px 48px rgba(22,50,79,0.14);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-pani { width: 100%; height: 100%; object-fit: cover; object-position: center 10%; }

.float-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 6px 12px rgba(22,50,79,0.18));
  animation: float 5s ease-in-out infinite;
}
.float-icon-1 { top: 6px; right: 6px; animation-delay: 0s; }
.float-icon-2 { bottom: 40px; left: -10px; animation-delay: -1.6s; }
.float-icon-3 { bottom: -6px; right: 40px; animation-delay: -3.2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-dark);
  background: rgba(232,115,74,0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232,115,74,0.35);
}
.btn-primary:hover { background: var(--coral-dark); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ---- Sections ---- */
.section { padding: 72px 0; position: relative; }
.section-alt { background: var(--cream-dark); }

.proyecto-art {
  position: absolute;
  top: 50%;
  right: 6%;
  transform: translateY(-50%);
  width: 120px;
  opacity: 0.5;
  animation: float 7s ease-in-out infinite;
}

/* ---- Knee prosthesis loop ---- */
.knee-showcase { padding-top: 48px; padding-bottom: 8px; }

.knee-card {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.knee-loop {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #0b0f14;
  box-shadow: 0 20px 44px rgba(22,50,79,0.14);
}

.knee-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation-duration: 13.5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes kneeFrame1 {
  0% { opacity: 1; }
  11.11% { opacity: 1; }
  12.71% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame2 {
  0% { opacity: 0; }
  9.51% { opacity: 0; }
  11.11% { opacity: 1; }
  22.22% { opacity: 1; }
  23.82% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame3 {
  0% { opacity: 0; }
  20.62% { opacity: 0; }
  22.22% { opacity: 1; }
  33.33% { opacity: 1; }
  34.93% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame4 {
  0% { opacity: 0; }
  31.73% { opacity: 0; }
  33.33% { opacity: 1; }
  44.44% { opacity: 1; }
  46.04% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame5 {
  0% { opacity: 0; }
  42.84% { opacity: 0; }
  44.44% { opacity: 1; }
  55.56% { opacity: 1; }
  57.16% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame6 {
  0% { opacity: 0; }
  53.96% { opacity: 0; }
  55.56% { opacity: 1; }
  66.67% { opacity: 1; }
  68.27% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame7 {
  0% { opacity: 0; }
  65.07% { opacity: 0; }
  66.67% { opacity: 1; }
  77.78% { opacity: 1; }
  79.38% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame8 {
  0% { opacity: 0; }
  76.18% { opacity: 0; }
  77.78% { opacity: 1; }
  88.89% { opacity: 1; }
  90.49% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes kneeFrame9 {
  0% { opacity: 0; }
  87.29% { opacity: 0; }
  88.89% { opacity: 1; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .knee-frame { animation: none; opacity: 0; }
  .knee-frame:first-child { opacity: 1; }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---- Cast grid ---- */
#personajes { position: relative; overflow: hidden; }

.cast-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 8% 20%, rgba(22,50,79,0.06), transparent 40%),
    radial-gradient(circle at 92% 75%, rgba(232,115,74,0.08), transparent 40%);
}

.cast-group-title {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  margin-bottom: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coral-dark);
}
.cast-grid ~ .cast-group-title { margin-top: 48px; }

.cast-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.cast-card {
  flex: 1 1 140px;
  max-width: 176px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(22,50,79,0.10);
}

.avatar {
  width: 100%;
  max-width: 148px;
  height: 203px;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-dark);
  box-shadow: 0 10px 22px rgba(22,50,79,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar svg, .avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.cast-role {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--coral-dark);
  margin-bottom: 10px;
}

/* ---- Coming soon grid ---- */
.coming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 32px 0 48px;
}

.coming-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.coming-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(22,50,79,0.10);
}

.coming-icon { width: 34px; height: 34px; margin-bottom: 14px; }

.coming-card-book { padding: 0; overflow: hidden; }
.coming-card-book .coming-cover {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: top center;
}
.coming-card-book .coming-tag,
.coming-card-book h3,
.coming-card-book p:not(.coming-tag) { padding-left: 24px; padding-right: 24px; }
.coming-card-book .coming-tag { margin-top: 20px; }
.coming-card-book p:last-child { padding-bottom: 24px; }

.coming-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}

/* ---- Notify form ---- */
.notify-form {
  max-width: 480px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.notify-form label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.notify-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notify-row input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: var(--sans);
}
.notify-row input:focus { outline: 2px solid var(--teal); border-color: transparent; }

.notify-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ---- Author ---- */
.author-inner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.author-avatar {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(22,50,79,0.12);
}
.author-avatar svg, .author-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 10%;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer .logo { color: #fff; }
.site-footer .logo span { color: var(--coral); }
.site-footer p:not(.logo) { color: rgba(255,255,255,0.6); font-size: 0.85rem; margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .header-nav { display: none; }
  .proyecto-art { display: none; }
}

@media (max-width: 820px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
}

@media (max-width: 640px) {
  .author-inner { flex-direction: column; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
  .hero-art { width: 220px; height: 220px; }
  .hero-art-circle { width: 190px; height: 190px; }
  .float-icon { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob, .float-icon, .proyecto-art { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
