/* ============================================================
   Recife Data Saturday — Design Tokens
   Palette: "blueprint & sunset" — a data-pipeline blueprint base
   (cool navy/blue-grey) with a Pernambuco sunset accent (orange)
   and a Recife coastal teal for secondary emphasis.
   ============================================================ */

:root {
  /* Light theme */
  --bg: #EDF0F6;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #E3E7F0;
  --text: #050810;
  --text-muted: #383F55;
  --border: #D6DBE7;
  --accent: #FF5A2E;
  --accent-strong: #E6470E;
  --accent-soft: rgba(255, 90, 46, 0.12);
  --teal: #00A79A;
  --teal-soft: rgba(0, 167, 154, 0.12);
  --violet: #6C5CE0;
  --shadow: 0 12px 32px -16px rgba(16, 24, 43, 0.18);
  --grid-line: rgba(16, 24, 43, 0.06);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0A0E17;
  --bg-alt: #0D1220;
  --surface: #121828;
  --surface-2: #182036;
  --text: #EDEFF6;
  --text-muted: #8A93AB;
  --border: #232B40;
  --accent: #FF7A45;
  --accent-strong: #FF5A2E;
  --accent-soft: rgba(255, 122, 69, 0.16);
  --teal: #2DD4C6;
  --teal-soft: rgba(45, 212, 198, 0.14);
  --violet: #8B7CF6;
  --shadow: 0 20px 48px -20px rgba(0, 0, 0, 0.55);
  --grid-line: rgba(237, 239, 246, 0.06);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.35s ease, color 0.35s ease;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--text);
}

p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand img { height: 34px; width: auto; display: block; }

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-strong) !important; }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-left: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 96px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  max-width: 16ch;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Signature element: pipeline/lineage line through edition numbers */
.lineage {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 4px 0 28px;
  margin-bottom: 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.lineage::-webkit-scrollbar { display: none; }

.lineage-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  position: relative;
  flex-shrink: 0;
}

.lineage-node .node-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  z-index: 2;
  transition: all 0.25s ease;
}

.lineage-node.is-active .node-dot,
.lineage-node.is-next .node-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.12);
}
.lineage-node.is-next .node-dot {
  background: transparent;
  border: 2px dashed var(--accent);
  color: var(--accent);
}

.lineage-node .node-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 8px;
  white-space: nowrap;
}

.lineage-line {
  height: 2px;
  flex: 1;
  min-width: 24px;
  background: var(--border);
  margin-bottom: 24px;
  position: relative;
  top: -20px;
}
.lineage-line.is-past { background: var(--accent); }

/* ---------------- Sections generic ---------------- */
section { padding: 88px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: none; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
  display: block;
}

.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0; }
.section-head p { max-width: 52ch; margin: 8px 0 0; }

/* ---------------- Sobre ---------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.about-logo { height: 64px; width: auto; margin-bottom: 24px; }

.about-copy p { font-size: 1.05rem; }
.about-copy a { color: var(--teal); text-decoration: none; font-weight: 600; }
.about-copy a:hover { text-decoration: underline; }

.pillars {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.pillars li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.98rem;
}
.pillars li .bullet {
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-card-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.stat-num small { display: block; font-family: var(--font-body); font-size: 0.72rem; font-weight: 500; color: var(--text-muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-divider { grid-column: 1 / -1; height: 1px; background: var(--border); margin: 4px 0; }

/* ---------------- Edições ---------------- */
.edition-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.edition-tab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.edition-tab:hover { border-color: var(--accent); color: var(--text); }
.edition-tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
[data-theme="dark"] .edition-tab.active { background: var(--accent); border-color: var(--accent); color: #0A0E17; }

.edition-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.edition-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.edition-title-block h3 { font-size: 1.8rem; margin-bottom: 6px; }
.edition-meta { color: var(--text-muted); font-size: 0.92rem; display: flex; gap: 6px; flex-wrap: wrap; }
.edition-meta a { color: var(--teal); text-decoration: none; }
.edition-meta a:hover { text-decoration: underline; }

.edition-stats { display: flex; gap: 28px; }
.edition-stats .mini-stat { text-align: right; }
.edition-stats .mini-stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text);
}
.edition-stats .mini-stat span { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.edition-stats .mini-stat.highlight b { color: var(--accent); }

.edition-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}

.speaker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.speaker-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-2);
}
.speaker-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
  object-fit: cover;
}
img.speaker-avatar { background: var(--surface-2); }
.speaker-info a { font-weight: 600; text-decoration: none; color: var(--text); }
.speaker-info a:hover { color: var(--accent); }
.speaker-info .tema { font-size: 0.88rem; color: var(--text-muted); margin-top: 2px; }

.side-block h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
}
.chip:hover { background: var(--teal); color: #fff; }
.chip.muted { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }

/* ---------------- Fotos dentro do card de edição ---------------- */
.edition-photos-block {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.edition-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.edition-photos figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background: var(--surface-2);
}
.edition-photos img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.edition-photos figure:hover img { transform: scale(1.08); }

/* ---------------- Organizadores / Palestrantes ---------------- */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.person-card--founder {
  padding: 32px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
}
.person-card--founder .person-avatar {
  width: 60px; height: 60px;
  font-size: 1.1rem;
  border-radius: 16px;
}
.person-card--founder h4 { font-size: 1.25rem; }

.apoio-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.person-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.person-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 16px;
  object-fit: cover;
}
img.person-avatar { background: var(--surface-2); }
.person-card h4 { font-size: 1.05rem; margin-bottom: 2px; }
.person-role { font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; font-weight: 600; }
.person-card p { font-size: 0.88rem; margin-bottom: 14px; }
.person-links { display: flex; gap: 10px; }
.person-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 8px;
}
.person-links a:hover { color: var(--accent); border-color: var(--accent); }

.speaker-editions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.speaker-editions span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 3px 7px;
  border-radius: 6px;
}

/* ---------------- Fotos ---------------- */
.gallery-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gallery-grid figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-grid figure:hover figcaption { opacity: 1; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(6, 9, 16, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }
.lightbox-close {
  position: absolute; top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ---------------- Inscrição ---------------- */
.signup-card {
  background: linear-gradient(135deg, var(--text) 0%, #1a2033 100%);
  color: #fff;
  border-radius: 24px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .signup-card { background: linear-gradient(135deg, #121828 0%, #1c2440 100%); }
.signup-card::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.25;
  top: -160px; right: -120px;
  border-radius: 50%;
}
.signup-card h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.signup-card p { color: rgba(255,255,255,0.7); font-size: 1.02rem; }
.signup-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 90, 46, 0.16);
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.signup-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  z-index: 1;
}
.signup-panel dl { margin: 0 0 24px; }
.signup-panel dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); margin-bottom: 4px;}
.signup-panel dd { margin: 0 0 16px; font-family: var(--font-mono); color: #fff; }

/* ---------------- Footer ---------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.82rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .about-grid, .edition-body, .signup-card { grid-template-columns: 1fr; }
  .edition-stats { width: 100%; justify-content: space-between; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    gap: 4px;
  }
  section { padding: 56px 0; }
  .edition-card { padding: 24px; }
  .signup-card { padding: 32px; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
