/* ============================================
   REVOXE STUDIO
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0e0e11;
  --bg-raised: #161619;
  --bg-card: #1a1a1f;
  --border: #2a2a30;
  --border-light: #3a3a42;
  --text: #ededf0;
  --text-2: #9898a8;
  --text-3: #5c5c6e;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --radius: 0px;
  --radius-sm: 0px;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* Light theme */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-raised: #f5f5f7;
  --bg-card: #f0f0f3;
  --border: #e0e0e6;
  --border-light: #d0d0d8;
  --text: #111118;
  --text-2: #555566;
  --text-3: #888898;
  --accent: #4f46e5;
  --accent-hover: #6366f1;
}

[data-theme="light"] ::selection { background: rgba(79,70,229,0.2); color: #111; }

[data-theme="light"] .header.scrolled {
  background: rgba(255,255,255,0.85);
}


[data-theme="light"] .btn {
  background: var(--text);
  color: var(--bg);
}

[data-theme="light"] .mockup-phone__img {
  background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(99,102,241,0.05));
}


[data-theme="light"] .marquee__track span img.icon-invert {
  filter: none;
}

/* Theme toggle */
/* WhatsApp button */
.whatsapp-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  cursor: pointer; border: none;
  background: none;
  transition: opacity 0.2s;
}

.theme-toggle:hover { opacity: 0.7; }

.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke-width: 1.5; }

.theme-toggle .icon-sun { stroke: #ededf0; }
.theme-toggle .icon-moon { stroke: #d0d0d8; fill: #111118; display: none; }

[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; border: none; outline: none; background: none; }
::selection { background: rgba(99,102,241,0.3); color: #fff; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, .header, .footer, .theme-toggle { position: relative; z-index: 1; }

/* ============================================
   NAV
   ============================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 0;
  transition: all 0.3s var(--ease);
}

.header.scrolled {
  background: rgba(14,14,17,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav { display: flex; align-items: center; justify-content: space-between; position: relative; padding-right: 2.5rem; }

.logo {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; cursor: pointer; z-index: 101;
  order: 2;
}

.theme-toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 101; }

.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 20px; height: 1.5px;
  background: var(--text);
  transition: all 0.3s var(--ease);
}
.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }
.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.active .hamburger::after { top: 0; transform: rotate(-45deg); }

.nav-menu {
  position: fixed; top: 0; right: -100%; width: 100%; height: 100dvh;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2rem;
  transition: right 0.4s var(--ease); z-index: 100;
}
.nav-menu.active { right: 0; }

.nav-link {
  font-family: var(--font); font-size: 1.1rem; font-weight: 500;
  color: var(--text-2); transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.nav-link--cta {
  color: #fff !important;
  background: var(--accent);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-link--cta:hover { background: var(--accent-hover) !important; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn--full { width: 100%; justify-content: center; }

.link-arrow {
  font-family: var(--font); font-weight: 500; font-size: 0.9rem;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 0.35rem;
  transition: color 0.2s;
}
.link-arrow:hover { color: var(--text); }
.link-arrow span { font-size: 1.1rem; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100dvh;
  display: flex; align-items: center;
  padding: 8rem 0 4rem;
}

.hero__wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__title {
  font-family: var(--font);
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.hero__desc {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 440px;
}

.hero__ctas { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; flex-wrap: wrap; }

/* Mockup — browser */
.hero__visual { position: relative; }

.mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mockup__bar {
  display: flex; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.mockup__bar span {
  width: 10px; height: 10px;
  background: var(--border-light);
}

.mockup__body { padding: 20px; }

.mockup__line {
  background: var(--border);
}

.mockup__line--title { height: 14px; width: 55%; margin-bottom: 10px; }
.mockup__line--sub { height: 10px; width: 75%; margin-bottom: 20px; opacity: 0.5; }
.mockup__line--btn { height: 32px; width: 30%; margin-top: 16px; background: var(--accent); border-radius: var(--radius-sm); }

.mockup__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mockup__card {
  aspect-ratio: 1;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Mockup — phone */
.mockup-phone {
  position: absolute;
  bottom: -20px; right: -15px;
  width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.mockup-phone__notch {
  width: 50%; height: 6px; margin: 8px auto 0;
  background: var(--border);
}

.mockup-phone__body { padding: 14px 12px; }

.mockup-phone__body .mockup__line { margin-bottom: 8px; }

.mockup-phone__img {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  overflow: hidden;
  background: var(--bg-raised);
  transition: background 0.3s ease;
}

.marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}

.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  white-space: nowrap;
}

.marquee__track span img {
  display: block;
  flex-shrink: 0;
}

.marquee__track span img.icon-invert {
  filter: invert(1);
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: clamp(5rem, 12vw, 8rem) 0; }

.section--dark { background: var(--bg-raised); transition: background 0.3s ease; }

.section-intro { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

.section-title {
  font-family: var(--font);
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 0.75rem;
  max-width: 480px;
}

/* ============================================
   BENTO GRID — Services
   ============================================ */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.bento__item {
  padding: 2rem 1.75rem;
  background: var(--bg);
  position: relative;
  transition: background 0.3s ease;
}

.bento__item:hover { background: var(--bg-raised); }

.bento__label {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.75rem;
}

.bento__item h3 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.bento__item p {
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ============================================
   PROJETS / PORTFOLIO
   ============================================ */
.projets__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.projet-card {
  padding: 1.75rem;
  background: var(--bg-raised);
  transition: background 0.3s ease;
}

.projet-card:hover { background: var(--bg-card); }

.projet-card__tag {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.projet-card h3 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.projet-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.projet-card__stack {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.projets__cta {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.projets__cta p {
  font-size: 0.95rem;
  color: var(--text-2);
}

/* ============================================
   NUMBERS
   ============================================ */
.numbers {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}

.numbers__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}

.numbers__item strong {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.numbers__item span {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.numbers__item p {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================
   STUDIO
   ============================================ */
.studio__wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.studio__content p {
  font-size: 1rem;
  line-height: 1.75;
  margin-top: 1rem;
}

.studio__method h3 {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.method { counter-reset: step; }

.method__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.method__step strong {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.method__step span {
  font-size: 0.9rem;
  color: var(--text-2);
  grid-column: 1 / -1;
  margin-top: 0.35rem;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__item {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.3s ease;
}

.faq__item:last-child { border-bottom: none; }

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.faq__question::-webkit-details-marker { display: none; }

.faq__question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-3);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq__item[open] .faq__question::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq__question:hover { background: var(--bg-raised); }

.faq__answer {
  padding: 0 1.5rem 1.25rem;
}

.faq__answer p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-2);
}

/* ============================================
   CONTACT
   ============================================ */
.contact__wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact__left p {
  font-size: 1.05rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.contact__info { margin-top: 2rem; }

.contact__row {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.contact__row strong {
  font-family: var(--font);
  font-weight: 600;
  color: var(--text);
  min-width: 70px;
}

.contact__row a { transition: color 0.2s; }
.contact__row a:hover { color: var(--accent); }
.contact__row a, .contact__row span { display: block; line-height: 1.5; }

/* Form */
.form {
  background: transparent;
  border: none;
  padding: 0;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form__field label {
  display: block;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form__field input::placeholder,
.form__field textarea::placeholder { color: var(--text-3); }

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus { border-color: var(--accent); }

.form__field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c5c6e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form__field select option { background: var(--bg-card); }
.form__field textarea { resize: vertical; min-height: 100px; }
.form .btn { margin-top: 0.5rem; }

/* Form alert */
.form__alert {
  display: none;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  border-left: 3px solid;
}

.form__alert--error {
  display: block;
  color: #f87171;
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.06);
}

.form__alert--success {
  display: block;
  color: #34d399;
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.06);
}

/* Form field validation */
.form__field--error input,
.form__field--error select,
.form__field--error textarea {
  border-color: #f87171 !important;
}

.form__field-error {
  font-size: 0.75rem;
  color: #f87171;
  margin-top: 0.3rem;
}

/* Success */
.form-success {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 2.5rem 2rem; gap: 1rem; min-height: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  animation: successFadeIn 0.35s ease both;
}

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

.form-success__icon {
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.form-success__check {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.45s 0.2s ease forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.form-success__title {
  font-family: var(--font);
  font-weight: 700; font-size: 1.1rem;
  color: var(--text);
}

.form-success__text {
  font-size: 0.9rem; max-width: 280px;
  color: var(--text-2); line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  transition: background 0.3s ease;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer__left p {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.5rem;
  max-width: 240px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text); }

.footer__copy {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}

.footer__copy p { font-size: 0.75rem; color: var(--text-3); }

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE — 640px
   ============================================ */
@media (min-width: 640px) {
  .numbers__grid { grid-template-columns: repeat(4, 1fr); }
  .form__row { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   RESPONSIVE — 768px
   ============================================ */
@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .nav-menu {
    position: static; width: auto; height: auto;
    background: none; flex-direction: row; gap: 0.25rem;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover { background: rgba(255,255,255,0.04); }

  .hero__wrap { grid-template-columns: 1fr 1fr; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__item--wide { grid-column: 1 / -1; }

  .projets__grid { grid-template-columns: repeat(2, 1fr); }
  .studio__wrap { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .contact__wrap { grid-template-columns: 1fr 1.2fr; gap: 4rem; }
}

/* ============================================
   RESPONSIVE — 1024px
   ============================================ */
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento__item--wide { grid-column: span 2; }
  .bento__item--full { grid-column: 1 / -1; }
  .mockup-phone { width: 160px; right: -25px; bottom: -30px; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
