/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ── Design tokens ─────────────────────────────────────── */
:root {
  /* Brand palette — extracted from the dicas logo */
  --cream:        #FDFAF0;
  --cream-mid:    #FBF6E3;
  --surface:      #FFFFFF;

  --yellow:       #FFCC00;
  --yellow-2:     #F5AA00;
  --yellow-3:     #E89600;
  --yellow-glow:  rgba(255, 204, 0, 0.30);
  --yellow-soft:  rgba(255, 204, 0, 0.12);

  --blue:         #5A5AE6;
  --blue-2:       #3D3DB8;
  --blue-glow:    rgba(90, 90, 230, 0.20);
  --blue-soft:    rgba(90, 90, 230, 0.10);

  --pink:         #FF6BB5;
  --pink-2:       #E84D9D;
  --pink-glow:    rgba(255, 107, 181, 0.22);
  --pink-soft:    rgba(255, 107, 181, 0.10);

  --ink:          #1C1850;
  --ink-2:        #3E3B72;
  --muted:        #7B78A8;
  --border:       rgba(90, 90, 230, 0.12);

  --shadow-xs:    0 1px 4px rgba(28, 24, 80, 0.07);
  --shadow-sm:    0 3px 12px rgba(28, 24, 80, 0.09);
  --shadow-md:    0 8px 30px rgba(28, 24, 80, 0.12);
  --shadow-lg:    0 20px 60px rgba(28, 24, 80, 0.16);
  --shadow-xl:    0 32px 80px rgba(28, 24, 80, 0.20);

  --r-xs:   8px;
  --r-sm:   14px;
  --r:      20px;
  --r-lg:   28px;
  --r-xl:   40px;
  --r-full: 9999px;

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-brand:   'Oleo Script Swash Caps', cursive;
  --font-body:    'Inter', system-ui, sans-serif;

  --max-w:  1160px;
  --gutter: clamp(16px, 5vw, 48px);
}

/* ── Base ──────────────────────────────────────────────── */
html {
  font-family: var(--font-body);
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Animated background ───────────────────────────────── */
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: blobDrift ease-in-out infinite alternate;
}

.blob-y {
  width: 700px; height: 700px;
  background: var(--yellow-glow);
  top: -200px; left: 50%;
  transform: translateX(-50%);
  animation-duration: 24s;
}

.blob-b {
  width: 450px; height: 450px;
  background: var(--blue-glow);
  bottom: 100px; right: -120px;
  animation-duration: 19s;
  animation-delay: -10s;
}

.blob-p {
  width: 350px; height: 350px;
  background: var(--pink-glow);
  top: 50%; left: -100px;
  animation-duration: 16s;
  animation-delay: -5s;
}

@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 25px) scale(1.12); }
}

/* Sparkle dots */
.sparkle-field {
  position: absolute;
  inset: 0;
}

.sparkle-field span {
  position: absolute;
  border-radius: 50%;
  background: var(--yellow);
  animation: sparklePop ease-in-out infinite;
}

.sparkle-field span:nth-child(1)  { width:6px;height:6px;  top:12%;  left:8%;   animation-duration:4.2s; animation-delay:0s;    opacity:.25; }
.sparkle-field span:nth-child(2)  { width:4px;height:4px;  top:25%;  left:88%;  animation-duration:5.1s; animation-delay:-.8s;  opacity:.20; }
.sparkle-field span:nth-child(3)  { width:8px;height:8px;  top:65%;  left:15%;  animation-duration:6.0s; animation-delay:-1.5s; opacity:.15; }
.sparkle-field span:nth-child(4)  { width:5px;height:5px;  top:78%;  left:75%;  animation-duration:4.7s; animation-delay:-2.3s; opacity:.22; }
.sparkle-field span:nth-child(5)  { width:6px;height:6px;  top:40%;  left:92%;  animation-duration:5.5s; animation-delay:-3.1s; opacity:.18; background: var(--pink); }
.sparkle-field span:nth-child(6)  { width:4px;height:4px;  top:90%;  left:40%;  animation-duration:3.8s; animation-delay:-.5s;  opacity:.20; background: var(--blue); }
.sparkle-field span:nth-child(7)  { width:7px;height:7px;  top:20%;  left:55%;  animation-duration:5.8s; animation-delay:-4.0s; opacity:.14; }
.sparkle-field span:nth-child(8)  { width:5px;height:5px;  top:55%;  left:48%;  animation-duration:4.4s; animation-delay:-1.2s; opacity:.18; background: var(--pink); }
.sparkle-field span:nth-child(9)  { width:6px;height:6px;  top:8%;   left:72%;  animation-duration:6.2s; animation-delay:-2.7s; opacity:.22; }
.sparkle-field span:nth-child(10) { width:4px;height:4px;  top:82%;  left:25%;  animation-duration:4.9s; animation-delay:-3.5s; opacity:.16; background: var(--blue); }
.sparkle-field span:nth-child(11) { width:8px;height:8px;  top:48%;  left:3%;   animation-duration:5.3s; animation-delay:-.9s;  opacity:.12; }
.sparkle-field span:nth-child(12) { width:5px;height:5px;  top:32%;  left:32%;  animation-duration:4.1s; animation-delay:-1.8s; opacity:.20; background: var(--pink); }

@keyframes sparklePop {
  0%, 100% { transform: scale(1);    opacity: inherit; }
  50%       { transform: scale(1.8); opacity: 0; }
}

/* ── Top bar ───────────────────────────────────────────── */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  background: transparent;
}

.topbar-brand img {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(255, 204, 0, 0.35));
}

.topbar-meuweb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-2);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}

.tw-label { font-weight: 400; opacity: 0.65; }
.tw-brand { font-weight: 700; color: var(--blue); }

.topbar-meuweb:hover {
  border-color: var(--blue);
  box-shadow: 0 3px 14px var(--blue-glow);
  transform: translateY(-1px);
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 64px var(--gutter) 88px;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: center;
}

/* Logo visual */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-ring {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-glow {
  position: absolute;
  inset: -32px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--yellow-glow) 0%, rgba(255, 204, 0, 0.06) 55%, transparent 70%);
  animation: ringPulse 3.5s ease-in-out infinite alternate;
}

@keyframes ringPulse {
  from { transform: scale(0.92); opacity: 0.75; }
  to   { transform: scale(1.08); opacity: 1; }
}

/* Rotating light rays */
.ring-rays {
  position: absolute;
  inset: 0;
  animation: raysRotate 20s linear infinite;
}

.ring-rays span {
  position: absolute;
  top: 50%; left: 50%;
  width: 3px;
  border-radius: var(--r-full);
  background: linear-gradient(to top, var(--yellow), transparent);
  transform-origin: top center;
  opacity: 0.35;
}

.ring-rays span:nth-child(1) { height: 60px; transform: translateX(-50%) rotate(0deg)   translateY(-200px); }
.ring-rays span:nth-child(2) { height: 45px; transform: translateX(-50%) rotate(45deg)  translateY(-185px); }
.ring-rays span:nth-child(3) { height: 60px; transform: translateX(-50%) rotate(90deg)  translateY(-200px); }
.ring-rays span:nth-child(4) { height: 45px; transform: translateX(-50%) rotate(135deg) translateY(-185px); }
.ring-rays span:nth-child(5) { height: 60px; transform: translateX(-50%) rotate(180deg) translateY(-200px); }
.ring-rays span:nth-child(6) { height: 45px; transform: translateX(-50%) rotate(225deg) translateY(-185px); }
.ring-rays span:nth-child(7) { height: 60px; transform: translateX(-50%) rotate(270deg) translateY(-200px); }
.ring-rays span:nth-child(8) { height: 45px; transform: translateX(-50%) rotate(315deg) translateY(-185px); }

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

.hero-logo {
  width: 300px;
  height: 300px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  animation: logoFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 18px 44px rgba(255, 204, 0, 0.45))
          drop-shadow(0 4px 12px rgba(90, 90, 230, 0.20));
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px)   rotate(-1.5deg); }
  33%       { transform: translateY(-10px) rotate(0.5deg); }
  66%       { transform: translateY(-6px)  rotate(-0.5deg); }
}

/* Copy */
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.eyebrow-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow-glow);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
}

.hero-em {
  display: block;
  font-family: var(--font-brand);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  color: var(--blue);
  font-style: normal;
  line-height: 1.3;
}

.hero-sub {
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 440px;
}

/* ── Search ────────────────────────────────────────────── */
.search-form { width: 100%; max-width: 520px; }

.search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px 8px 6px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .25s;
}

.search-shell:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow-soft), var(--shadow-md);
}

.search-icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--muted); }
.search-icon svg { width: 100%; height: 100%; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: 500 1rem var(--font-body);
  color: var(--ink);
  caret-color: var(--yellow-2);
  min-width: 0;
}

.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { display: none; appearance: none; }

.search-clear {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  color: var(--muted);
  transition: background .15s, color .15s;
}

.search-clear svg { width: 16px; height: 16px; }
.search-clear:hover { background: rgba(28,24,80,.07); color: var(--ink); }

/* ── Content wrapper ───────────────────────────────────── */
.content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) 100px;
}

/* ── Category chips ────────────────────────────────────── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  transition: all .2s;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 3px 14px var(--blue-glow);
  transform: translateY(-2px);
}

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 18px var(--blue-glow);
}

/* ── State panels ──────────────────────────────────────── */
.state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 80px var(--gutter);
  text-align: center;
}

.state-panel.hidden { display: none; }

.state-emoji { font-size: 52px; line-height: 1; }

.state-panel h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.state-panel p {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 340px;
  line-height: 1.6;
}

/* Bulb spinner */
.bulb-spin {
  position: relative;
  width: 72px; height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spin-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 204, 0, 0.20);
  border-top-color: var(--yellow);
  animation: spin .75s linear infinite;
}

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

.bulb-emoji { font-size: 28px; line-height: 1; position: relative; z-index: 1; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 30px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--r-full);
  box-shadow: 0 4px 18px var(--yellow-glow);
  transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-primary:hover {
  background: var(--yellow-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--yellow-glow);
}

/* ── Catalog ───────────────────────────────────────────── */
.catalog.hidden { display: none; }

.results-bar {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-bar::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.results-count {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Cards grid ────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px)  { .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 560px)  { .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  animation: cardIn .5s ease both;
  transition: transform .28s ease, box-shadow .28s ease, border-color .2s;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--yellow);
}

/* Card strip accent on hover */
.card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow), var(--pink), var(--blue));
  opacity: 0;
  transition: opacity .25s;
}

.card:hover::before { opacity: 1; }

/* Card media */
.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #FFF9E3, #EEECFF);
  position: relative;
  flex-shrink: 0;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

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

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--yellow-3);
  background: linear-gradient(135deg, #FFFBE8 0%, #EEEAFF 100%);
  letter-spacing: -0.02em;
}

/* Card body */
.card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.card-cat {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.card-about {
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  margin-top: 6px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--yellow-glow);
  transition: background .2s, transform .15s, box-shadow .2s;
}

.card-btn:hover {
  background: var(--yellow-2);
  transform: translateX(3px);
  box-shadow: 0 5px 16px var(--yellow-glow);
}

@media (max-width: 560px) {
  .card-body { padding: 10px 12px 14px; gap: 5px; }
  .card-title { font-size: 0.9rem; }
  .card-about { font-size: 0.75rem; -webkit-line-clamp: 2; }
  .card-btn { padding: 7px 14px; font-size: 0.8125rem; }
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: white;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(255, 204, 0, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
}

.footer-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--yellow);
  line-height: 1.2;
}

.footer-body {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 500px;
  line-height: 1.65;
}

.footer-body strong { color: white; font-weight: 700; }

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  border-radius: var(--r-full);
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  box-shadow: 0 6px 28px rgba(255, 204, 0, 0.40);
  transition: background .2s, transform .18s, box-shadow .2s;
}

.footer-cta-btn:hover {
  background: var(--yellow-2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 204, 0, 0.50);
}

.footer-divider {
  width: 60px;
  height: 2px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.12);
}

.footer-legal {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.38);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.60);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s;
}

.footer-legal a:hover { color: var(--yellow); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }

  .hero-visual { order: -1; }

  .hero-ring { width: 240px; height: 240px; margin: 0 auto; }
  .hero-logo { width: 200px; height: 200px; }

  .ring-rays span:nth-child(1) { transform: translateX(-50%) rotate(0deg)   translateY(-140px); height: 44px; }
  .ring-rays span:nth-child(2) { transform: translateX(-50%) rotate(45deg)  translateY(-130px); height: 34px; }
  .ring-rays span:nth-child(3) { transform: translateX(-50%) rotate(90deg)  translateY(-140px); height: 44px; }
  .ring-rays span:nth-child(4) { transform: translateX(-50%) rotate(135deg) translateY(-130px); height: 34px; }
  .ring-rays span:nth-child(5) { transform: translateX(-50%) rotate(180deg) translateY(-140px); height: 44px; }
  .ring-rays span:nth-child(6) { transform: translateX(-50%) rotate(225deg) translateY(-130px); height: 34px; }
  .ring-rays span:nth-child(7) { transform: translateX(-50%) rotate(270deg) translateY(-140px); height: 44px; }
  .ring-rays span:nth-child(8) { transform: translateX(-50%) rotate(315deg) translateY(-130px); height: 34px; }

  .hero-copy { align-items: center; }
  .hero-sub { max-width: 100%; }
  .search-form { max-width: 100%; }
  .hero { padding: 48px var(--gutter) 64px; }
}

@media (max-width: 480px) {
  .topbar-brand img { height: 36px; }
  .topbar-meuweb { padding: 7px 14px; font-size: 0.8125rem; }
  .hero-ring { width: 180px; height: 180px; }
  .hero-logo { width: 160px; height: 160px; }
}
