:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: rgba(16, 16, 18, 0.86);
  --surface-strong: #151515;
  --text: #ffffff;
  --muted: #b8b8b8;
  --line: rgba(255, 255, 255, 0.14);
  --brand: #ffd21f;
  --brand-strong: #ffbf00;
  --accent: #ffffff;
  --ink: #ffffff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  --page-gradient-a: rgba(255, 210, 31, 0.13);
  --page-gradient-b: rgba(255, 255, 255, 0.07);
  --page-bg-mid: #0b0b0d;
  --page-bg-end: #050505;
  --radius: 24px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3df;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text: #111111;
  --muted: #5f5a4d;
  --line: rgba(17, 17, 17, 0.12);
  --brand: #ffd21f;
  --brand-strong: #ffbf00;
  --accent: #ffffff;
  --ink: #111111;
  --shadow: 0 24px 70px rgba(122, 91, 0, 0.14);
  --page-gradient-a: rgba(255, 210, 31, 0.3);
  --page-gradient-b: rgba(255, 255, 255, 0.7);
  --page-bg-mid: #fff8db;
  --page-bg-end: #f5f0df;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050505;
  --surface: rgba(16, 16, 18, 0.86);
  --surface-strong: #151515;
  --text: #ffffff;
  --muted: #b8b8b8;
  --line: rgba(255, 255, 255, 0.14);
  --brand: #ffd21f;
  --brand-strong: #ffbf00;
  --accent: #ffffff;
  --ink: #ffffff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  --page-gradient-a: rgba(255, 210, 31, 0.13);
  --page-gradient-b: rgba(255, 255, 255, 0.07);
  --page-bg-mid: #0b0b0d;
  --page-bg-end: #050505;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 9% 10%, var(--page-gradient-a), transparent 26rem),
    radial-gradient(circle at 88% 14%, var(--page-gradient-b), transparent 24rem),
    linear-gradient(145deg, var(--bg), var(--page-bg-mid) 64%, var(--page-bg-end));
}

.motion-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.motion-bg span {
  position: absolute;
  bottom: -90px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand), transparent 14%);
  box-shadow: 0 0 24px color-mix(in srgb, var(--brand), transparent 26%);
  opacity: 0.52;
  animation: bubbleUp 12s linear infinite;
}

.motion-bg span:nth-child(1) {
  left: 8%;
  animation-duration: 13s;
}

.motion-bg span:nth-child(2) {
  left: 19%;
  width: 4px;
  height: 4px;
  animation-delay: -7s;
  animation-duration: 10s;
}

.motion-bg span:nth-child(3) {
  left: 31%;
  animation-delay: -3s;
  animation-duration: 16s;
}

.motion-bg span:nth-child(4) {
  left: 48%;
  width: 11px;
  height: 11px;
  animation-delay: -11s;
  animation-duration: 18s;
}

.motion-bg span:nth-child(5) {
  left: 63%;
  width: 5px;
  height: 5px;
  animation-delay: -2s;
}

.motion-bg span:nth-child(6) {
  left: 76%;
  animation-delay: -8s;
  animation-duration: 14s;
}

.motion-bg span:nth-child(7) {
  left: 87%;
  width: 12px;
  height: 12px;
  animation-delay: -5s;
  animation-duration: 20s;
}

.motion-bg span:nth-child(8) {
  left: 94%;
  width: 4px;
  height: 4px;
  animation-delay: -13s;
  animation-duration: 11s;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
}

.site-header,
.site-footer,
.hero-panel,
.status-view,
.link-card,
.category-group {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 999px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  overflow: hidden;
}

.brand-mark::before {
  grid-area: 1 / 1;
}

.brand-mark img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong), transparent 10%);
  cursor: pointer;
}

.theme-icon {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  transition: opacity 180ms ease, transform 180ms ease;
}

.theme-icon-light {
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(255, 210, 31, 0.16);
}

.theme-icon-dark {
  opacity: 0;
  background: #cbd5e1;
  clip-path: circle(58% at 68% 42%);
}

[data-theme="dark"] .theme-icon-light {
  opacity: 0;
  transform: rotate(40deg) scale(0.7);
}

[data-theme="dark"] .theme-icon-dark {
  opacity: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: 0;
  padding: clamp(20px, 4vw, 38px) 0 14px;
  align-items: start;
}

.hero > * {
  min-width: 0;
}

.hero-copy {
  position: relative;
  min-width: 0;
  max-width: 860px;
  padding-top: 4px;
}

.hero-copy::before {
  content: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 16px;
  font-size: clamp(2.35rem, 5.4vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.title-first,
.title-separator,
.title-rest {
  display: inline;
}

.hero-description {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.7vw, 1.15rem);
  line-height: 1.55;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  padding: 16px;
  border-radius: 8px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 210, 31, 0.14), transparent 42%, rgba(255, 255, 255, 0.07));
  pointer-events: none;
}

.search-box,
.quick-categories {
  position: relative;
  z-index: 1;
}

.search-box label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 800;
}

.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong), transparent 4%);
}

.search-control span {
  width: 18px;
  height: 18px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  box-shadow: 10px 10px 0 -7px var(--brand);
  transform: rotate(-18deg);
}

.search-control input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 700;
}

.quick-categories {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  gap: 10px;
  margin-top: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-categories::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong), transparent 10%);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.chip:hover,
.chip.is-active {
  color: #111;
  border-color: var(--brand);
  background: var(--brand);
  transform: translateY(-2px);
}

.keyword-loop {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-block: 1px solid var(--line);
  color: var(--muted);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.keyword-loop div {
  display: flex;
  min-width: max-content;
  animation: marquee 24s linear infinite;
}

.keyword-loop span {
  padding: 11px 22px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.status-view {
  display: none;
  margin: 16px 0;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
}

.status-view.is-visible {
  display: grid;
  place-items: center;
  gap: 10px;
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid color-mix(in srgb, var(--brand), transparent 78%);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.status-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  color: #111;
  font-weight: 900;
  background: var(--brand);
}

.primary-action {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #111;
  background: var(--brand-strong);
  font-weight: 900;
  cursor: pointer;
}

.catalog {
  display: none;
  padding: 12px 0 36px;
}

.catalog.is-visible {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  letter-spacing: 0;
}

.section-heading > p {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.link-card {
  position: relative;
  display: grid;
  grid-template-rows: 180px 1fr;
  min-height: 340px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  animation: rise 420ms ease both;
}

.link-card::after {
  content: "VER LINKS";
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  min-height: 28px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  color: #111;
  background: var(--brand);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: none;
}

.link-card.is-expanded {
  grid-column: span 2;
  grid-template-rows: 320px 1fr;
  min-height: 680px;
  border-color: color-mix(in srgb, var(--brand), #fff 14%);
  box-shadow: 0 30px 80px rgba(255, 210, 31, 0.14);
}

.link-card.is-expanded::after {
  content: "FECHAR";
}

.link-card:hover {
  border-color: color-mix(in srgb, var(--brand), #fff 14%);
  box-shadow: 0 30px 80px rgba(255, 210, 31, 0.14);
  transform: translateY(-4px);
}

.link-card.is-featured {
  color: var(--text);
  background: var(--surface);
}

.link-card.is-featured .link-meta,
.link-card.is-featured .link-description {
  color: var(--muted);
}

.link-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
}

.link-media {
  position: relative;
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border-bottom: 4px solid var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand), transparent 76%), transparent),
    color-mix(in srgb, var(--surface-strong), var(--bg) 18%);
}

.link-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.link-card:hover .link-media img {
  transform: scale(1.04);
}

.link-card.is-expanded .link-media {
  min-height: 320px;
}

.link-placeholder {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line);
  color: #111;
  background: var(--brand);
  font-size: 1.8rem;
  font-weight: 900;
}

.link-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.link-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.link-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.link-details {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.link-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.link-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--brand), #fff 14%);
  border-radius: 999px;
  color: #111;
  background: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.link-action:hover,
.link-action:focus-visible {
  background: #fff;
}

.category-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.category-group {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.category-header h3 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.child-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.child-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.child-tab.is-active {
  color: #111;
  border-color: var(--brand);
  background: var(--brand);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
}

.footer-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.developer-credit {
  position: relative;
  display: inline-grid;
  min-width: 164px;
  min-height: 52px;
  place-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  overflow: hidden;
}

.developer-label {
  position: absolute;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.meuweb-logo {
  color: var(--brand);
  font-family: "Oleo Script Swash Caps", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 180ms ease, opacity 180ms ease;
}

.developer-credit:hover .developer-label,
.developer-credit:focus-visible .developer-label {
  opacity: 1;
  transform: translateY(-12px);
}

.developer-credit:hover .meuweb-logo,
.developer-credit:focus-visible .meuweb-logo {
  opacity: 0.42;
  transform: translateY(10px);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

@keyframes bubbleUp {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(36px, -118vh, 0) scale(0.55);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 30px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-card.is-expanded {
    grid-column: 1 / -1;
  }

  .site-footer,
  .section-heading,
  .category-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 10px;
  }

  .site-header {
    top: 8px;
    min-height: 62px;
  }

  .brand-mark,
  .icon-button {
    width: 42px;
    height: 42px;
  }

  .brand small {
    font-size: 0.72rem;
  }

  h1 {
    font-size: clamp(1.95rem, 7.4vw, 2.42rem);
    line-height: 0.98;
  }

  .title-rest {
    display: block;
  }

  .quick-categories {
    flex-wrap: nowrap;
    margin-right: -20px;
    padding-right: 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .quick-categories::-webkit-scrollbar {
    display: none;
  }

  .quick-categories .chip {
    flex: 0 0 auto;
  }

  .hero-copy::before {
    margin-bottom: 22px;
    border-radius: 20px;
  }

  .hero-panel,
  .category-group,
  .site-footer {
    border-radius: 18px;
  }

  .featured-grid,
  .links-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    grid-template-rows: 160px 1fr;
    min-height: 310px;
  }

  .link-card.is-expanded {
    grid-column: 1;
    grid-template-rows: 240px 1fr;
    min-height: 620px;
  }

  .link-card.is-expanded .link-media {
    min-height: 240px;
  }

  .link-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
