/* ========================================
   DYNAMU — Design System
   ======================================== */

:root {
  /* Palette — refined from dynamo icon */
  --bg: #F7F6F2;
  --bg-alt: #EFEDE6;
  --ink: #1C1D20;
  --ink-2: #3A3C42;
  --gray: #8A8D93;
  --gray-soft: #C9CAC8;
  --line: rgba(28, 29, 32, 0.08);
  --line-2: rgba(28, 29, 32, 0.14);

  --mustard: #F2B530;
  --mustard-deep: #D99A14;
  --cyan: #3BB6D9;
  --cyan-deep: #1E8FB0;

  /* Tokens */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  --maxw: 1280px;
  --pad-x: clamp(20px, 4vw, 56px);

  /* Type scale */
  --f-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

::selection {
  background: var(--cyan);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

/* ====== Utility ====== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gray);
  display: inline-block;
}

.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 6.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
}

h2 {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.028em;
}

h3 {
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 500;
}

p { margin: 0; color: var(--ink-2); text-wrap: pretty; }

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 60ch;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), background 180ms, color 180ms, border-color 180ms;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #000; transform: translateY(-1px); }

.btn-mustard {
  background: var(--cyan);
  color: var(--ink);
}
.btn-mustard:hover { background: var(--cyan-deep); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn .arrow {
  display: inline-flex;
  width: 22px; height: 22px;
  align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  transition: transform 220ms;
}
.btn-mustard .arrow, .btn-ghost .arrow { background: rgba(28,29,32,0.08); }
.btn:hover .arrow { transform: translateX(2px); }

/* ====== Header ====== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 18px 0;
  transition: background 280ms, backdrop-filter 280ms, border-color 280ms;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(247, 246, 242, 0.82);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(28,29,32,0.04);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 999px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 180ms, color 180ms;
}
.nav-links a:hover { background: var(--bg); color: var(--ink); }

.nav-cta {
  display: flex; align-items: center; gap: 10px;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--ink);
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 280ms, opacity 280ms;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .nav-burger { display: flex; }
}

/* ── Mobile menu overlay ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 18px var(--pad-x) clamp(32px, 6vh, 56px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-top .logo { color: var(--bg); }
.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bg);
  padding: 4px;
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.mobile-menu-links a {
  font-family: var(--f-display);
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--bg);
  opacity: 0.85;
  transition: opacity 150ms, color 150ms;
  padding: 6px 0;
}
.mobile-menu-links a:hover { opacity: 1; color: var(--cyan); }
.mobile-menu-footer { padding-top: 32px; }
.mobile-menu-footer .btn { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .mobile-menu { transition: none; }
}

/* ====== Hero ====== */
.hero {
  position: relative;
  padding-top: clamp(120px, 14vh, 180px);
  padding-bottom: clamp(60px, 8vh, 120px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 .lite {
  color: var(--gray);
  font-style: italic;
  font-family: "Instrument Serif", "Space Grotesk", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero h1 .mustard-dot {
  display: inline-block;
  width: 0.55em; height: 0.55em;
  border-radius: 999px;
  background: var(--cyan);
  transform: translateY(-0.05em);
  margin-right: 0.05em;
}

.hero-sub {
  margin-top: 28px;
  max-width: 54ch;
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--ink-2);
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-meta {
  margin-top: 56px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-meta .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-meta .stat-num {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hero-meta .stat-num b { color: var(--cyan); font-weight: 500; }
.hero-meta .stat-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.05;
  width: 100%;
  max-width: 560px;
  justify-self: end;
}
@media (max-width: 960px) {
  .hero-visual { justify-self: start; max-width: 460px; margin-top: 20px; }
}

/* ====== Scroll marquee ====== */
.marquee {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 56px;
  animation: scroll-x 38s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.marquee-item {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.marquee-item::after {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--cyan);
  display: inline-block;
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ====== Section ====== */
section { position: relative; }
.section {
  padding: clamp(80px, 12vh, 140px) 0;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 64px;
  align-items: end;
}
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head .lead { margin-top: 4px; }

/* ====== Services / Cards ====== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service-card {
  grid-column: span 2;
  background: var(--bg);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
  transition: background 280ms;
  position: relative;
}
.service-card:hover { background: var(--bg-alt); }
.service-card .num {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gray);
}
.service-card h3 { margin-top: auto; }
.service-card .desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.service-card .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.service-card:hover .icon {
  background: var(--cyan);
  border-color: var(--cyan);
}
.service-card .icon svg { width: 24px; height: 24px; }

/* First card wide */
.service-card.wide { grid-column: span 3; background: var(--ink); color: var(--bg); }
.service-card.wide h3, .service-card.wide .desc { color: var(--bg); }
.service-card.wide .desc { opacity: 0.75; }
.service-card.wide .icon { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); color: var(--cyan); }
.service-card.wide:hover { background: #000; }
.service-card.wide:hover .icon { background: var(--cyan); color: var(--ink); }
.service-card.wide .num { color: var(--cyan); }
.service-card.tall { grid-column: span 3; }

@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card, .service-card.wide, .service-card.tall { grid-column: span 1; }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ====== Process ====== */
.process {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-xl);
  padding: clamp(48px, 6vw, 88px);
  position: relative;
  overflow: hidden;
}
.process h2, .process .eyebrow { color: var(--bg); }
.process .eyebrow { color: var(--cyan); }
.process .eyebrow::before { background: var(--cyan); }
.process .lead { color: rgba(255,255,255,0.7); }

.process-list {
  margin-top: 56px;
  display: grid;
  gap: 0;
}
.process-item {
  display: grid;
  grid-template-columns: 80px 1fr 2fr auto;
  gap: 32px;
  align-items: start;
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  transition: padding 320ms;
}
.process-item:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.process-item:hover { padding-left: 12px; }

.process-item .num {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  padding-top: 8px;
}
.process-item h3 { color: var(--bg); font-size: 28px; }
.process-item .desc { color: rgba(255,255,255,0.65); font-size: 15px; line-height: 1.55; }
.process-item .time {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--gray-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 8px;
}

@media (max-width: 820px) {
  .process-item { grid-template-columns: 60px 1fr; }
  .process-item .desc, .process-item .time { grid-column: 2 / -1; }
}
@media (max-width: 600px) {
  .process { padding-inline: 20px; }
  .process-item { gap: 12px 16px; padding: 20px 0; }
  .process-item h3 { font-size: clamp(20px, 5vw, 26px); }
}

/* ====== Stats band ====== */
.stats-band {
  padding: clamp(60px, 8vh, 100px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}
.stat-cell {
  background: var(--bg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-cell .big {
  font-family: var(--f-display);
  font-size: clamp(48px, 5vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
}
.stat-cell .big em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  color: var(--cyan);
  font-weight: 400;
}
.stat-cell .label {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 22ch;
}
@media (max-width: 820px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ====== Testimonials ====== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border: 1px solid var(--line);
}
.testimonial-card .q {
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.testimonial-card .q::before { content: "\201C"; color: var(--cyan); margin-right: 2px; }
.testimonial-card .q::after { content: "\201D"; color: var(--cyan); }
.testimonial-card .who {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.testimonial-card .avatar {
  width: 42px; height: 42px; border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 14px; font-weight: 600;
}
.testimonial-card .who .name { font-weight: 500; font-size: 15px; }
.testimonial-card .who .role { font-family: var(--f-mono); font-size: 11px; color: var(--gray); letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 920px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ====== About ====== */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about-body p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 20px;
  max-width: 60ch;
}
.about-side {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.about-side .kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--line-2);
  padding-bottom: 14px;
  gap: 20px;
}
.about-side .kv:last-child { border-bottom: 0; padding-bottom: 0; }
.about-side .kv .k {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}
.about-side .kv .v { font-size: 15px; text-align: right; max-width: 60%; }
.about-side .kv .v b { font-weight: 500; }

.about-promises { display: flex; flex-direction: column; gap: 32px; }
.promise-item { display: flex; gap: 20px; align-items: flex-start; }
.promise-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  padding-top: 5px;
  flex-shrink: 0;
  min-width: 20px;
}
.promise-item strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.promise-item p { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin: 0; }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ====== FAQ ====== */
.faq-list {
  border-top: 1px solid var(--line-2);
}
.faq-item {
  border-bottom: 1px solid var(--line-2);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
  font-family: var(--f-display);
  font-size: clamp(18px, 1.5vw, 22px);
  letter-spacing: -0.015em;
  font-weight: 500;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  gap: 30px;
}
.faq-q .plus {
  position: relative;
  width: 22px; height: 22px; flex-shrink: 0;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: "";
  position: absolute;
  background: var(--ink);
  top: 50%; left: 50%;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1);
}
.faq-q .plus::before { width: 14px; height: 1.5px; transform: translate(-50%,-50%); }
.faq-q .plus::after { width: 1.5px; height: 14px; transform: translate(-50%,-50%); }
.faq-item[open] .faq-q .plus::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 360ms cubic-bezier(.2,.8,.2,1);
}
.faq-item[open] .faq-a { max-height: 400px; }
.faq-a-inner {
  padding: 0 0 28px;
  max-width: 72ch;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

/* ====== Contact ====== */
.contact {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-xl);
  padding: clamp(48px, 6vw, 88px);
  position: relative;
  overflow: hidden;
}
.contact h2 { color: var(--bg); }
.contact .lead { color: rgba(255,255,255,0.7); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  position: relative;
  z-index: 2;
}
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .contact { padding-inline: 20px; } }

.contact-form {
  display: grid;
  gap: 18px;
}
.contact-form .field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  padding: 12px 0;
  color: var(--bg);
  font-family: var(--f-body);
  font-size: 16px;
  outline: none;
  transition: border-color 200ms;
  resize: none;
}
.contact-form input::placeholder, .contact-form textarea::placeholder {
  color: rgba(255,255,255,0.35);
}
.contact-form input:focus, .contact-form textarea:focus {
  border-bottom-color: var(--cyan);
}
.contact-form input.invalid { border-bottom-color: #d94f4f; }
.field-error {
  display: block;
  font-size: 12px;
  color: #d94f4f;
  margin-top: 4px;
  min-height: 16px;
}
.contact-form textarea { min-height: 110px; }
.contact-form .actions {
  display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
  flex-wrap: wrap; gap: 14px;
}
.contact-form .agree {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  max-width: 30ch;
}

.contact-side { display: flex; flex-direction: column; gap: 30px; }
.contact-side .block {
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.contact-side .block:first-child { border-top: 0; padding-top: 0; }
.contact-side .k {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.contact-side .v { font-size: 19px; font-family: var(--f-display); letter-spacing: -0.01em; }
.contact-side .v a:hover { color: var(--cyan); }

/* ====== Contact tabs ====== */
.contact-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.ct-tab {
  position: relative;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 18px 24px;
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
  min-width: 160px;
  transition: all 180ms ease;
}
.ct-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-tab .ct-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.5;
  font-weight: 400;
}
.ct-tab:hover { background: rgba(255,255,255,0.08); color: #F7F6F2; }
/* Formulário tab active: outlined cyan */
.ct-tab[data-tab="form"].active {
  background: rgba(59,182,217,0.07);
  color: #F7F6F2;
  border-color: var(--cyan);
}
.ct-tab[data-tab="form"].active .ct-sub { opacity: 0.7; color: var(--cyan); }
/* Dyná tab active: filled cyan */
.ct-tab[data-tab="chat"].active {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
}
.ct-tab[data-tab="chat"].active .ct-sub { opacity: 0.75; }
.ct-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #8FD96A;
  box-shadow: 0 0 0 4px rgba(143,217,106,0.25);
  animation: ct-pulse 1.8s ease-in-out infinite;
}
@keyframes ct-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(143,217,106,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(143,217,106,0.08); }
}

/* hide inactive panel */
.contact-grid[data-active="form"] [data-panel="chat"] { display: none; }
.contact-grid[data-active="chat"] [data-panel="form"] { display: none; }
.contact-grid[data-active="chat"] .contact-side { display: none; }
.contact-grid[data-active="chat"] .dyna-chat { grid-column: 1 / -1; }

/* ====== Dyná chat ====== */
.dyna-chat {
  background: #14151A;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: 620px;
}
.dyna-head {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.dyna-ava { position: relative; flex-shrink: 0; }
.dyna-pulse {
  position: absolute; inset: -4px;
  border-radius: 16px;
  border: 2px solid rgba(59,182,217,0.4);
  animation: dyna-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes dyna-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}
.dyna-name {
  font-family: var(--f-display); font-weight: 600; font-size: 18px;
  color: #F7F6F2; letter-spacing: -0.01em;
}
.dyna-tag {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight: 400;
}
.dyna-status {
  font-family: var(--f-mono); font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
  display: flex; align-items: center; gap: 8px;
}
.dyna-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #8FD96A;
  box-shadow: 0 0 8px #8FD96A;
}

.dyna-log {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.dyna-log::-webkit-scrollbar { width: 6px; }
.dyna-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.msg {
  padding: 12px 16px;
  border-radius: 14px;
  max-width: 86%;
  font-size: 15px;
  line-height: 1.5;
  animation: msg-in 280ms cubic-bezier(.2,.8,.2,1);
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg.bot {
  background: rgba(59,182,217,0.08);
  color: #F7F6F2;
  border: 1px solid rgba(59,182,217,0.18);
  border-top-left-radius: 4px;
  align-self: flex-start;
}
.msg.bot b, .msg.bot strong { color: var(--cyan); font-weight: 600; }
.msg.bot p { margin: 0 0 6px; color: inherit; }
.msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul, .msg.bot ol { margin: 4px 0 6px 16px; color: inherit; }
.msg.bot li { margin-bottom: 2px; }
.msg.user {
  background: var(--cyan);
  color: var(--ink);
  border-top-right-radius: 4px;
  align-self: flex-end;
  font-weight: 500;
}
.msg.suggestions {
  background: transparent; border: 0;
  padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 100%;
}
.sugg {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--f-body); font-size: 13px;
  cursor: pointer;
  transition: all 160ms ease;
}
.sugg:hover {
  background: rgba(59,182,217,0.12);
  border-color: rgba(59,182,217,0.4);
  color: #F7F6F2;
}
.msg.typing {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-flex; gap: 4px; padding: 14px 18px;
  align-self: flex-start;
}
.msg.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  animation: typing 1.4s infinite ease-in-out;
}
.msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.dyna-input {
  display: flex; gap: 10px; align-items: center;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.dyna-input input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #F7F6F2;
  padding: 12px 16px;
  border-radius: 999px;
  font-family: var(--f-body); font-size: 15px;
  outline: none;
  transition: border-color 160ms ease;
}
.dyna-input input:focus {
  border-color: var(--cyan);
  background: rgba(255,255,255,0.08);
}
.dyna-input input::placeholder { color: rgba(255,255,255,0.4); }
.dyna-send {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--ink);
  border: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 160ms ease, background 160ms ease;
}
.dyna-send:hover { background: #F7F6F2; transform: translateX(2px); }
.dyna-foot {
  padding: 10px 18px 14px;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

@media (max-width: 600px) {
  .contact-tabs { gap: 8px; }
  .ct-tab {
    width: 100%;
    padding: 14px 20px;
  }
  .dyna-chat { min-height: 420px; max-height: 520px; }
  .dyna-input input { min-width: 0; }
  .dyna-head { padding: 16px 18px; }
  .dyna-log { padding: 16px; }
}

/* ====== Footer ====== */
.footer {
  padding: 64px 0 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-2);
}
.footer h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 15px; transition: color 180ms; }
.footer ul a:hover { color: var(--ink); }
.footer-tagline { max-width: 36ch; color: var(--ink-2); font-size: 15px; margin-top: 16px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 20px;
  padding-top: 28px; font-family: var(--f-mono); font-size: 12px;
  color: var(--gray); letter-spacing: 0.04em; flex-wrap: wrap;
}

@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ====== Reveal on scroll ====== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 900ms cubic-bezier(.2,.8,.2,1), transform 900ms cubic-bezier(.2,.8,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ====== Tweaks panel ====== */
.tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 16px;
  z-index: 100;
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.18);
  display: none;
  font-family: var(--f-body);
}
.tweaks-panel.on { display: block; }
.tweaks-panel h4 {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gray); font-weight: 500;
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.tweaks-panel .row { margin-bottom: 14px; }
.tweaks-panel .row:last-child { margin-bottom: 0; }
.tweaks-panel label { font-size: 11px; font-family: var(--f-mono); color: var(--gray); text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 6px; }
.tweaks-panel .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks-panel .chip {
  border: 1px solid var(--line-2); background: transparent;
  padding: 6px 10px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-family: var(--f-body); color: var(--ink-2);
}
.tweaks-panel .chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tweaks-panel .swatches { display: flex; gap: 6px; }
.tweaks-panel .sw {
  width: 28px; height: 28px; border-radius: 999px;
  border: 2px solid var(--bg); outline: 1px solid var(--line-2);
  cursor: pointer;
}
.tweaks-panel .sw.active { outline: 2px solid var(--ink); }

