/* /servicos — loaded after landing.css and only uses its tokens. */

.top-nav a.is-on { color: var(--phosphor); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.chip.is-on { border-color: var(--phosphor); color: var(--phosphor); background: color-mix(in srgb, var(--phosphor) 10%, transparent); }

/* --- hero: the home screen --- */
.svc-home { transform: perspective(1800px) rotateY(-4deg); transform-origin: left center; }
.home-screen { padding: 1.4rem; display: grid; gap: 1.2rem; }
.home-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.home-clock { font-size: 2.6rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.home-date { font-size: 0.78rem; margin-top: 0.35rem; }
.home-say {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--phosphor) 50%, var(--border));
  background: color-mix(in srgb, var(--phosphor) 8%, var(--card));
  font-size: 0.78rem;
  font-family: var(--font-read);
}
.home-say .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--phosphor); animation: svc-pulse 1.6s ease-in-out infinite; }
.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.home-app {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  padding: 0.85rem 0.75rem;
  min-height: 6.2rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.home-app:hover { border-color: var(--phosphor); transform: translateY(-2px); text-decoration: none; }
.home-app img, .home-app .glyph { width: 1.75rem; height: 1.75rem; margin-bottom: 0.35rem; }
.home-app .glyph { display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--phosphor); }
.home-app .glyph.rec { color: #ff5a4f; font-size: 1rem; animation: svc-blink 1.4s steps(2, start) infinite; }
.home-app b { font-size: 0.82rem; }
.home-app span { font-size: 0.68rem; color: var(--muted); }

/* --- services grid --- */
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.2s ease;
}
.svc:hover { border-color: color-mix(in srgb, var(--phosphor) 55%, var(--border)); transform: translateY(-3px); }
.svc-copy { padding: 1.4rem 1.4rem 1.2rem; }
.svc-copy p { color: var(--muted); font-family: var(--font-read); font-size: 0.95rem; }
.svc-copy ul { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; font-size: 0.8rem; }
.svc-copy li::before { content: "› "; color: var(--phosphor); }
.svc-screen {
  align-self: end;
  margin: 0 0 0 1.4rem;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
  min-height: 13.5rem;
}
.svc.is-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  grid-template-rows: none;
  align-items: center;
}
.svc.is-wide .svc-copy { padding: 2rem; }
.svc.is-wide .svc-copy h3 { font-size: 1.4rem; }
.svc.is-wide .svc-screen { margin: 1.4rem 0 0; }
.svc.is-small { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.svc-mini { padding: 1.4rem; }

/* home assistant */
.svc-screen > :last-child { padding-right: 1.4rem; }
.ha { padding: 1.1rem; display: grid; gap: 1rem; }
.ha-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ha-temp { display: grid; }
.ha-temp b { font-size: 1.7rem; line-height: 1; }
.ha-temp span { font-size: 0.7rem; margin-top: 0.3rem; }
.ha-scenes { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ha-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.ha-tile {
  display: grid;
  gap: 0.15rem;
  justify-items: start;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}
button.ha-tile { cursor: pointer; }
.ha-tile b { font-size: 0.8rem; }
.ha-tile span:last-child { font-size: 0.66rem; color: var(--muted); }
.ha-tile .bulb { width: 1.3rem; height: 1.3rem; border-radius: 50%; border: 2px solid var(--border); margin-bottom: 0.35rem; transition: all 0.2s ease; }
.ha-tile.is-on { border-color: #f5c542; background: color-mix(in srgb, #f5c542 12%, var(--card)); }
.ha-tile.is-on .bulb { background: #f5c542; border-color: #f5c542; box-shadow: 0 0 14px #f5c542; }
.ha-tile .blind { width: 1.3rem; height: 1.3rem; border: 2px solid var(--muted); margin-bottom: 0.35rem; position: relative; overflow: hidden; }
.ha-tile .blind i { position: absolute; inset: 0 0 auto 0; height: calc(100% - var(--p)); background: repeating-linear-gradient(var(--muted) 0 2px, transparent 2px 4px); }
.ha-tile .clima { font-size: 1.1rem; color: #5ab8ff; height: 1.3rem; margin-bottom: 0.35rem; line-height: 1.3rem; }

/* dashboards */
.dash { padding: 1.1rem; display: grid; gap: 0.9rem; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.kpi { display: grid; padding: 0.55rem 0.6rem; border: 1px solid var(--border); background: var(--card); }
.kpi span { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi b { font-size: 0.95rem; }
.kpi em { font-style: normal; font-size: 0.64rem; color: var(--phosphor); }
.bars { display: flex; align-items: flex-end; gap: 0.3rem; height: 4.2rem; }
.bars i {
  flex: 1;
  height: var(--h);
  background: linear-gradient(to top, var(--phosphor), color-mix(in srgb, var(--phosphor) 35%, transparent));
  transform-origin: bottom;
  animation: svc-bar 3.2s ease-in-out infinite alternate;
}
.bars i:nth-child(2n) { animation-delay: -0.8s; }
.bars i:nth-child(3n) { animation-delay: -1.6s; }
.spark { width: 100%; height: 2.4rem; }
.spark path {
  fill: none;
  stroke: var(--phosphor);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: svc-draw 4s ease-out infinite;
}

/* spotify */
.sp { padding: 1.1rem; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.sp-cover {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1db954, #0b5d8a 55%, #6a1b9a);
  display: flex;
  align-items: flex-end;
  padding: 0.55rem;
  box-shadow: 0 10px 30px var(--shadow);
}
.sp-eq { display: flex; align-items: flex-end; gap: 3px; height: 1.2rem; }
.sp-eq i { width: 4px; height: 100%; background: #fff; transform-origin: bottom; animation: svc-eq 0.9s ease-in-out infinite alternate; }
.sp-eq i:nth-child(2) { animation-delay: -0.3s; }
.sp-eq i:nth-child(3) { animation-delay: -0.6s; }
.sp-eq i:nth-child(4) { animation-delay: -0.15s; }
.sp-meta { display: grid; gap: 0.25rem; }
.sp-meta b { font-size: 0.95rem; }
.sp-meta > span { font-size: 0.7rem; }
.sp-prog { height: 4px; background: var(--border); margin-top: 0.6rem; overflow: hidden; }
.sp-prog i { display: block; height: 100%; width: 46%; background: #1db954; animation: svc-prog 12s linear infinite; }
.sp-time { display: flex; justify-content: space-between; font-size: 0.62rem; }
.sp-ctl { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.3rem; font-size: 0.9rem; }
.sp-ctl .play { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--text); color: var(--void); font-size: 0.7rem; }
.sp-ctl .spk { margin-left: auto; font-size: 0.64rem; color: #1db954; }

/* estúdio */
.st { padding: 1.1rem; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.st-cover {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #c6f54e, #1a3a2a 50%, #0b1a12);
  display: flex;
  align-items: flex-end;
  padding: 0.55rem;
  box-shadow: 0 10px 30px var(--shadow);
}
.st-lyric { margin: 0.45rem 0 0; font-family: var(--font-read); font-size: 0.78rem; color: var(--muted); }
.st .spk { color: var(--phosphor); }

/* nextcloud fotos */
.ph { padding: 1.1rem; display: grid; gap: 0.7rem; }
.ph-bar { display: flex; justify-content: space-between; align-items: center; font-size: 0.68rem; gap: 0.5rem; }
.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 2.6rem; gap: 0.35rem; }
.ph-grid i { display: block; animation: svc-fade 6s ease-in-out infinite; }
.ph-grid .tall { grid-row: span 2; }
.ph-grid .wide { grid-column: span 2; }
.ph-grid .p1 { background: linear-gradient(160deg, #7ec8e3, #f5d7a1); }
.ph-grid .p2 { background: linear-gradient(135deg, #f7a072, #c85a8a); animation-delay: -1s; }
.ph-grid .p3 { background: linear-gradient(135deg, #3d7a5a, #a3d9a5); animation-delay: -2s; }
.ph-grid .p4 { background: linear-gradient(90deg, #0b5d8a, #7ec8e3 60%, #f5d7a1); animation-delay: -3s; }
.ph-grid .p5 { background: linear-gradient(135deg, #e8c07d, #8a5a3d); animation-delay: -4s; }
.ph-grid .p6 { background: linear-gradient(180deg, #f59e6b, #6a3d8a); animation-delay: -5s; }
.ph-grid .p7 { background: linear-gradient(135deg, #c5d2c4, #5a7a6a); animation-delay: -1.5s; }
.ph-grid .p8 { background: linear-gradient(135deg, #ffd166, #ef476f); animation-delay: -2.5s; }
.ph-albums { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.66rem; }

/* plex */
.plex { padding: 1.1rem; display: grid; gap: 0.8rem; background: linear-gradient(180deg, transparent, color-mix(in srgb, #e5a00d 6%, transparent)); }
.plex-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; }
.plex-head .chip { border-color: #e5a00d; color: #e5a00d; }
.plex-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.poster {
  aspect-ratio: 2 / 3;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 0.35rem;
  box-shadow: 0 8px 20px var(--shadow);
  transition: transform 0.2s ease;
}
.svc:hover .poster:nth-child(1) { transform: translateY(-4px); }
.poster span { font-size: 0.58rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.5); padding: 0.1rem 0.3rem; }
.poster.q1 { background: linear-gradient(170deg, #1a2a6c, #b21f1f 70%, #fdbb2d); }
.poster.q2 { background: linear-gradient(170deg, #0f2027, #2c5364); }
.poster.q3 { background: linear-gradient(170deg, #42275a, #734b6d); }
.poster.q4 { background: linear-gradient(170deg, #134e5e, #71b280); }
.plex-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, 0.5); }
.plex-prog i { display: block; height: 100%; width: var(--p); background: #e5a00d; }

/* câmaras */
.cam-grid { padding: 0.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.svc.is-wide .cam-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 1.1rem; padding-bottom: 1.1rem; }
.svc.is-wide .cam { aspect-ratio: 4 / 5; }
.cam {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: #111;
  color: #fff;
  font-size: 0.6rem;
}
.cam::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
}
.cam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent 0 2px, rgba(255, 255, 255, 0.04) 2px 3px);
  animation: svc-scan 8s linear infinite;
}
.cam.c1::before { background: radial-gradient(ellipse at 30% 70%, #4a5a4a, #1a221a 70%); }
.cam.c2::before { background: linear-gradient(180deg, #2a3a4a 0 45%, #2f4a2f 45%); }
.cam.c3::before { background: linear-gradient(135deg, #3a3a3a, #1a1a1a); }
.cam.c4::before { background: radial-gradient(ellipse at 60% 40%, #5a4a3a, #1f1a15 70%); }
.cam span { position: absolute; z-index: 1; font-weight: 700; text-shadow: 0 1px 2px #000; }
.cam .rec { top: 0.35rem; left: 0.4rem; color: #ff5a4f; animation: svc-blink 1.4s steps(2, start) infinite; }
.cam .cam-n { bottom: 0.35rem; left: 0.4rem; }
.cam .cam-t { top: 0.35rem; right: 0.4rem; font-variant-numeric: tabular-nums; }

/* nas + passwords */
.disk { display: grid; gap: 0.4rem; width: 13rem; font-size: 0.75rem; }
.disk-bar { height: 0.55rem; background: var(--border); }
.disk-bar i { display: block; height: 100%; width: var(--p); background: var(--phosphor); }
.disk .muted { font-size: 0.66rem; }
.vault { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem; border: 1px solid var(--border); background: var(--card); font-size: 0.78rem; }
.vault div { display: grid; }
.vault .muted { font-size: 0.66rem; }
.vault-lock { width: 2.2rem; height: 2.2rem; }

/* --- agent asks --- */
.asks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ask { display: grid; gap: 0.7rem; align-content: start; }
.ask p { margin: 0; font-family: var(--font-read); font-size: 0.92rem; line-height: 1.5; }
.ask-q {
  justify-self: end;
  max-width: 90%;
  padding: 0.7rem 0.9rem;
  background: var(--phosphor);
  color: var(--on-phosphor);
  font-weight: 500;
}
.ask-a {
  max-width: 95%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--muted);
}
.ask-a .tag {
  display: inline-block;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
}

.svc-hosts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svc-final .hero-cta { margin-top: 1.6rem; }

/* --- motion --- */
@keyframes svc-pulse { 50% { transform: scale(1.5); opacity: 0.5; } }
@keyframes svc-blink { to { visibility: hidden; } }
@keyframes svc-bar { from { transform: scaleY(0.55); } to { transform: scaleY(1); } }
@keyframes svc-draw { 70%, 100% { stroke-dashoffset: 0; } }
@keyframes svc-eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes svc-prog { from { width: 46%; } to { width: 100%; } }
@keyframes svc-fade { 50% { filter: brightness(1.15) saturate(1.1); } }
@keyframes svc-scan { to { background-position: 0 60px; } }

@media (prefers-reduced-motion: reduce) {
  .jq-services *, .jq-services *::before, .jq-services *::after { animation: none !important; transition: none !important; }
  .spark path { stroke-dashoffset: 0; }
}

/* --- responsive --- */
@media (max-width: 1000px) {
  .svc-home { transform: none; }
  .asks { grid-template-columns: 1fr; }
  .ask { max-width: 36rem; }
}
@media (max-width: 720px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-grid, .svc-hosts { grid-template-columns: 1fr; }
  .svc.is-wide, .svc.is-small { grid-template-columns: 1fr; }
  .svc.is-wide .svc-copy { padding: 1.4rem 1.4rem 0; }
  .svc.is-wide .svc-screen { margin: 1.2rem 0 0 1.4rem; }
  .svc-mini { padding: 0 1.4rem 1.4rem; }
  .ha-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc.is-wide .cam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc.is-wide .cam { aspect-ratio: 16 / 10; }
  .sp, .st { grid-template-columns: 5.5rem minmax(0, 1fr); }
}

/* The house fits the first screen. */
@media (min-width: 1001px) {
  .jq-services .svc-hero {
    box-sizing: border-box;
    height: calc(100dvh - 3.7rem);
    min-height: 0;
    max-height: calc(100dvh - 3.7rem);
    padding: 0.55rem 0 0.45rem;
    gap: 1.25rem;
    align-items: center;
    overflow: hidden;
  }
  .jq-services .svc-hero h1 { font-size: clamp(1.85rem, 2.6vw, 2.55rem); }
  .jq-services .svc-hero .lede { margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.45; }
  .jq-services .svc-hero .hero-cta { margin-top: 0.8rem; }
  .jq-services .svc-hero .hero-facts { margin-top: 0.7rem; padding-top: 0.6rem; gap: 0.22rem; }
  .jq-services .home-screen { padding: 0.7rem 0.85rem; gap: 0.5rem; }
  .jq-services .home-clock { font-size: 1.65rem; }
  .jq-services .home-app { min-height: 0; padding: 0.42rem 0.5rem; gap: 0.04rem; }
  .jq-services .home-app img,
  .jq-services .home-app .glyph { width: 1.3rem; height: 1.3rem; margin-bottom: 0.08rem; }
}
@media (max-width: 1000px) {
  .jq-services .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .jq-services .home-app { min-height: 0; padding: 0.4rem 0.35rem; }
  .jq-services .svc-hero { padding-top: 1.1rem; padding-bottom: 1.1rem; }
  .jq-services .home-app b { font-size: 0.68rem; }
  .jq-services .home-app span { font-size: 0.58rem; }
}
