/* =========================================================
   Acervo Visual — Ideen Design
   Inter everywhere · Dark/light via [data-theme]
   Auto-tema: sistema do navegador + horário do dia
   ========================================================= */

/* ---- Tokens ---- */
:root {
  /* Paleta base */
  --bg:            #FFFFFF;
  --bg-surface:    #F5F4F1;
  --bg-surface-2:  #EDEAE4;
  --text:          #0D0D0D;
  --text-muted:    #7A7673;
  --border:        rgba(13, 13, 13, 0.1);
  --border-strong: #0D0D0D;
  --footer-bg:     #0D0D0D;
  --footer-text:   #DAD7E2;

  /* Marca */
  --cyan:     #00F1FF;
  --primary:  #1450EF;

  /* Categorias */
  --delivered:   #22c55e;
  --in-progress: #1450EF;
  --prototype:   #f59e0b;
  --legacy:      #888480;

  /* Tipografia */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --gutter:      clamp(20px, 4vw, 56px);
  --section-gap: clamp(72px, 10vw, 120px);
  --header-h:    64px;

  /* Bordas — tudo reto */
  --radius-sm:   0px;
  --radius-md:   0px;
  --radius-pill: 0px;
}

[data-theme="dark"] {
  --bg:            #1B1A1F;
  --bg-surface:    #252329;
  --bg-surface-2:  #2E2C33;
  --text:          #DAD7E2;
  --text-muted:    #868299;
  --border:        rgba(218, 215, 226, 0.1);
  --border-strong: rgba(218, 215, 226, 0.6);
  --footer-bg:     #111014;
  --footer-text:   #DAD7E2;
  --primary:       #4D7AFF;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: light dark; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s, color 0.25s;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input  { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: var(--radius-sm); }
::selection { background: var(--primary); color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s, border-color 0.25s;
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.brand { display: flex; align-items: center; }
.brand img { height: 26px; width: auto; }
.logo-for-dark  { display: none; }
[data-theme="dark"] .logo-for-light { display: none; }
[data-theme="dark"] .logo-for-dark  { display: block; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.icon-sun  { display: block; }
.icon-moon { display: none;  }
[data-theme="dark"] .icon-sun  { display: none;  }
[data-theme="dark"] .icon-moon { display: block; }

/* =========================================================
   HERO — plataforma
   ========================================================= */
.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter) 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--border-strong);
}

.hero-title {
  font-size: clamp(48px, 6.5vw, 96px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--text);
  white-space: nowrap;
}
.hero-title span {
  font-weight: 300;
  color: var(--text-muted);
}

.hero-quote {
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 300;
  line-height: 1.45;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: -0.01em;
  border: none;
  padding: 0;
  text-wrap: pretty;
  align-self: end;
}

/* Ticker */
.hero-ticker-wrap {
  overflow: hidden;
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.hero-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerScroll 32s linear infinite;
  will-change: transform;
}
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-right: 28px;
  flex-shrink: 0;
}
.ticker-sep {
  flex-shrink: 0;
  margin-right: 28px;
  display: flex;
  align-items: center;
  opacity: 0.35;
}
.ticker-sep img { width: 14px; height: auto; }

@media (max-width: 720px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-title { font-size: clamp(48px, 12vw, 72px); }
}

/* =========================================================
   MAIN
   ========================================================= */
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================================================
   SECTION
   ========================================================= */
.section {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
  border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }

.section-header { margin-bottom: 40px; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-head-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
}
.section-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text);
}
.section-title-light {
  font-weight: 300;
  color: var(--text-muted);
}
.section-count {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-bottom: 6px;
}

/* =========================================================
   TOOLBAR
   ========================================================= */
.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-btn {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color .18s, border-color .18s, background .18s;
  white-space: nowrap;
}
.filter-btn:hover { color: var(--text); }
.filter-btn[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-surface);
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
  max-width: 100%;
}
.search svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 34px;
  font-size: 13px;
  color: var(--text);
  transition: border-color .18s, background .18s;
}
.search input::placeholder { color: var(--text-muted); }
.search input:focus { outline: none; border-color: var(--border-strong); background: var(--bg); }

@media (max-width: 720px) {
  .toolbar { grid-template-columns: 1fr; }
  .filters { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .search { width: 100%; }
}

/* =========================================================
   FEATURED CARDS
   ========================================================= */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr; }
}

.featured-card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 32px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: background .2s;
  position: relative;
  min-height: 460px;
  text-decoration: none;
}
.featured-card:hover { background: var(--bg-surface); }

.featured-thumb {
  aspect-ratio: 4 / 3;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  background: var(--bg-surface-2);
}
.featured-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.featured-card:hover .featured-thumb img { transform: scale(1.04); }
.featured-thumb .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
  background: linear-gradient(135deg, color-mix(in oklab, var(--ph-color, #1450EF) 30%, var(--bg-surface)) 0%, var(--bg-surface-2) 100%);
}
.featured-thumb .placeholder::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.04) 4px);
  pointer-events: none;
}
.featured-thumb .placeholder span { position: relative; z-index: 1; }

.featured-card .num {
  position: absolute;
  top: 28px; right: 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}
.featured-card .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.featured-card .client {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 12px;
}
.featured-card .desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.team-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
}
.team-tag.alt {
  border-color: var(--cyan);
  color: color-mix(in oklab, var(--cyan) 70%, var(--text));
}

/* Categoria badge */
.cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.cat::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cat-color, var(--text-muted));
  flex-shrink: 0;
}
.cat[data-cat="delivered"]   { --cat-color: var(--delivered);   }
.cat[data-cat="in-progress"] { --cat-color: var(--in-progress); }
.cat[data-cat="prototype"]   { --cat-color: var(--prototype);   }
.cat[data-cat="legacy"]      { --cat-color: var(--legacy);      }

/* =========================================================
   FEED TABLE
   ========================================================= */
.feed-table {
  width: 100%;
  border-collapse: collapse;
}
.feed-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-strong);
}
.feed-table thead th:last-child { text-align: right; }
.feed-table tbody td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.feed-row { transition: background .15s; }
.feed-row:hover { background: var(--bg-surface); cursor: pointer; }

.feed-row td.client-cell {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  width: 22%;
}
.feed-row td.desc-cell {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  width: 36%;
}
.feed-row td.desc-cell .desc-inner {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-row td.tags-cell { width: 20%; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.feed-row td.year-cell {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  width: 8%;
}
.feed-row td.cat-cell { width: 12%; }
.feed-row td.link-cell { text-align: right; width: 4%; }
.ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color .15s, border-color .15s;
}
.feed-row:hover .ext { color: var(--text); border-color: var(--border-strong); }
.feed-row.is-legacy td.client-cell { color: var(--text-muted); }

/* Responsivo: tabela → cards 2 col → 1 col */
@media (max-width: 1024px) {
  .feed-table, .feed-table thead, .feed-table tbody,
  .feed-table tr, .feed-table td, .feed-table th { display: block; width: 100%; }
  .feed-table thead { position: absolute; left: -9999px; }
  .feed-table tbody {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border-strong);
  }
  .feed-row {
    display: grid !important;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    min-height: 200px;
    position: relative;
  }
  .feed-row td { padding: 0; border: none; width: auto !important; }
  .feed-row td.cat-cell    { order: 1; }
  .feed-row td.client-cell { order: 2; font-size: clamp(22px, 4vw, 30px); padding-right: 36px; line-height: 1; }
  .feed-row td.desc-cell   { order: 3; align-self: start; }
  .feed-row td.desc-cell .desc-inner { -webkit-line-clamp: 3; }
  .feed-row td.tags-cell   { order: 4; align-self: end; }
  .feed-row td.year-cell   { order: 5; position: absolute; top: 22px; right: 20px; font-size: 11px; color: var(--text-muted); letter-spacing: 0.1em; }
  .feed-row td.link-cell   { order: 6; position: absolute; bottom: 22px; right: 20px; }
}
@media (max-width: 640px) {
  .feed-table tbody { grid-template-columns: 1fr; }
  .feed-row { border-right: none; }
}

/* Empty + Skeleton */
.empty {
  border: 1px dashed var(--border);
  padding: 64px 24px;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.empty strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.skeleton-row td { height: 56px; padding: 12px 16px; }
.skeleton-bar {
  height: 13px;
  width: 60%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-surface-2) 0%, var(--bg-surface) 50%, var(--bg-surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: var(--section-gap);
  transition: background 0.25s;
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px var(--gutter) 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(218,215,226,0.12);
  gap: 24px;
}
.footer-logo { height: 28px; width: auto; }
.footer-site {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan);
  padding-bottom: 1px;
  transition: opacity .18s;
}
.footer-site:hover { opacity: 0.75; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(218,215,226,0.4);
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
