/* ============================================================
   aidesign v10 "Sylva" - the living studio.
   Mossy organic world: MJ hero, Three.js spores, white cards.
   Reduced motion: everything visible and calm, no WebGL.
   ============================================================ */

:root {
  --moss: #3d4a35;
  --moss-deep: #232b1e;
  --sage: #9aab8e;
  --mist: #6b7a63;
  --paper: #f4f6f0;
  --card: #ffffff;
  --ink: #22281f;
  --ink-soft: #55604c;
  --accent: #d3e8b0;
  --font-display: "Quicksand", "Segoe UI", sans-serif;
  --font-body: "Lexend", "Segoe UI", sans-serif;
  --radius: 22px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--moss-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--sage); color: var(--moss-deep); }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--moss); color: #fff; padding: 10px 18px; border-radius: 0 0 12px 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 74px); color: #fff; }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: 20px; }

.container { width: min(1200px, calc(100% - 44px)); margin-inline: auto; }
.section { padding-block: clamp(72px, 9vw, 120px); }

/* ---------- pill nav ---------- */

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(24, 30, 20, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.nav-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.nav-logo svg { width: 22px; height: 22px; }
.nav a.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 15px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav a.nav-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav .nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--moss-deep);
  background: var(--paper);
  padding: 10px 18px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}
.nav .nav-cta:hover { background: var(--accent); }
.nav .lang-flag { display: block; line-height: 0; padding: 6px; border-radius: 999px; }
.nav .lang-flag svg { width: 24px; height: 16px; border-radius: 3px; }
.nav .lang-flag:hover { background: rgba(255, 255, 255, 0.12); }
.nav-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  padding: 0;
}
.nav-burger span {
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.nav.open .nav-burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-burger span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero: the living world ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--moss-deep);
}
.hero-bg, .hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-bg { object-fit: cover; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-video.on { opacity: 1; }
.hero-canvas { pointer-events: none; }
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(20, 26, 15, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float:hover { transform: scale(1.06); box-shadow: 0 14px 32px rgba(20, 26, 15, 0.42); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.form-note a { color: var(--accent, #d3e8b0); }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 28% 42%, rgba(20, 26, 15, 0.55), transparent 65%),
    linear-gradient(180deg, rgba(20, 26, 15, 0.35), rgba(20, 26, 15, 0.15) 45%, rgba(26, 33, 21, 0.85));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 44px));
  margin-inline: auto;
  padding-top: 90px;
}
.hero-kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}
.hero-sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(15px, 1.5vw, 18px);
  max-width: 46ch;
  margin: 22px 0 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.pill.solid { background: var(--paper); color: var(--moss-deep); }
.pill.solid:hover { background: var(--accent); }
.pill.glass {
  color: #fff;
  background: rgba(24, 30, 20, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.pill.glass:hover { background: rgba(24, 30, 20, 0.75); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 44px; }
.chip { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.85); font-size: 13px; }
.chip i {
  width: 26px; height: 26px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-style: normal;
  font-size: 12px;
}
.chip b { font-weight: 400; color: #fff; }

.hero-cards {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 4vw, 56px);
  bottom: clamp(90px, 16vh, 170px);
  display: grid;
  gap: 16px;
  justify-items: end;
}
.h-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  width: 240px;
  box-shadow: 0 24px 60px rgba(10, 14, 6, 0.45);
}
.h-card img { border-radius: 14px; aspect-ratio: 16/10; object-fit: cover; object-position: top; }
.h-card .h-tag { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 10px 4px 2px; }
.h-card b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 4px 4px; }
.h-card:nth-child(2) { margin-right: 34px; }

/* ---------- light sections ---------- */

.world { background: var(--paper); position: relative; z-index: 3; }
/* only the first light section curves out of the dark hero; flat seams
   between light sections, so no dark corner slivers show through */
#trabalho, #work { border-radius: 34px 34px 0 0; }
.sec-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head p { color: var(--ink-soft); margin-top: 12px; }

/* work cards */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.w-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 14px 20px;
  box-shadow: 0 14px 40px rgba(34, 40, 31, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.w-card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(34, 40, 31, 0.16); }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.q-card {
  margin: 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 28px 22px;
  box-shadow: 0 14px 40px rgba(34, 40, 31, 0.1);
}
.q-card blockquote { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--ink); }
.q-card figcaption {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--mist);
}
@media (max-width: 720px) { .quote-grid { grid-template-columns: 1fr; } }
.w-card img { border-radius: 14px; aspect-ratio: 16/10; object-fit: cover; object-position: top; }
.w-media { position: relative; display: block; }
.w-media img { display: block; width: 100%; }
.w-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 1s ease;
}
.w-media video.on { opacity: 1; }
.w-card .w-tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); margin: 14px 6px 4px; }
.w-card h3 { margin: 0 6px 6px; }
.w-card p { color: var(--ink-soft); font-size: 14px; margin: 0 6px 14px; flex: 1; }
.w-card .w-link {
  margin: 0 6px;
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--moss);
  border-bottom: 1.5px solid var(--sage);
  padding-bottom: 2px;
}
.w-card .w-link:hover { color: var(--moss-deep); border-color: var(--moss); }

/* services */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 14px 40px rgba(34, 40, 31, 0.08);
}
.svc i {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #e8efdd;
  color: var(--moss);
  font-style: normal;
  margin-bottom: 18px;
}
.svc i svg { width: 24px; height: 24px; }
.svc h3 { margin-bottom: 8px; }
.svc p { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 12px; }
.svc ul { list-style: none; }
.svc li { font-size: 13.5px; color: var(--ink); padding: 4px 0 4px 22px; position: relative; }
.svc li::before { content: "✳"; position: absolute; left: 0; color: var(--sage); font-size: 12px; }

/* about */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(34, 40, 31, 0.18); }
.about-photo img { aspect-ratio: 1; object-fit: cover; }
.about-copy p { color: var(--ink-soft); margin-bottom: 14px; max-width: 60ch; }
.about-copy p:first-of-type { color: var(--ink); }
.about-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; list-style: none; }
.about-facts li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12.5px;
  background: #e8efdd;
  color: var(--moss);
  border-radius: 999px;
  padding: 8px 16px;
}

/* faq */
.faq-wrap { max-width: 780px; }
.faq-item { background: var(--card); border-radius: 18px; margin-bottom: 12px; box-shadow: 0 10px 30px rgba(34, 40, 31, 0.07); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--sage); font-size: 22px; font-weight: 500; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--ink-soft); font-size: 14.5px; padding: 0 22px 20px; max-width: 62ch; }

/* waitlist */
.wait { background: var(--moss-deep); border-radius: 34px 34px 0 0; position: relative; overflow: hidden; }
.wait-bg { position: absolute; inset: 0; object-fit: cover; opacity: 0.35; }
.wait-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35, 43, 30, 0.9), rgba(35, 43, 30, 0.65)); }
.wait .container { position: relative; z-index: 2; }
.wait-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.wait h2, .wait .sec-head p { color: #fff; }
.wait .sec-head p { color: rgba(255, 255, 255, 0.8); }
.wait-points { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
.wait-points li { color: rgba(255, 255, 255, 0.88); font-size: 15px; padding-left: 26px; position: relative; }
.wait-points li::before { content: "✳"; position: absolute; left: 0; color: var(--accent); }

.wl-form { background: var(--card); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); display: grid; gap: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.wl-form[hidden] { display: none; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #dde4d3;
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(154, 171, 142, 0.25); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wl-form .pill { justify-content: center; }
.form-note { font-size: 12px; color: var(--ink-soft); text-align: center; }
.form-msg { font-size: 13.5px; font-weight: 400; color: #a03b2e; text-align: center; }
.form-msg[hidden] { display: none; }
.wl-success { background: var(--card); border-radius: var(--radius); padding: clamp(30px, 4vw, 44px); text-align: center; }
.wl-success[hidden] { display: none; }
.wl-success h3 { margin-bottom: 8px; }
.wl-success p { color: var(--ink-soft); }

/* footer */
.footer { background: var(--moss-deep); color: rgba(255, 255, 255, 0.6); padding: 34px 0 44px; font-size: 13px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; }
.footer b { color: #fff; font-family: var(--font-display); font-weight: 600; }
.footer span:first-of-type { margin-right: auto; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
  .reveal.in { opacity: 1; transform: none; }

  .hero-inner > * { animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-inner > *:nth-child(2) { animation-delay: 0.12s; }
  .hero-inner > *:nth-child(3) { animation-delay: 0.24s; }
  .hero-inner > *:nth-child(4) { animation-delay: 0.36s; }
  .hero-inner > *:nth-child(5) { animation-delay: 0.48s; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }

  .h-card { animation: bob 8s ease-in-out infinite; }
  .h-card:nth-child(2) { animation-delay: 1.6s; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .work-grid, .svc-grid { grid-template-columns: 1fr 1fr; }
  .hero-cards { display: none; }
  .wait-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { top: 10px; width: max-content; max-width: calc(100% - 20px); flex-wrap: wrap; }
  .nav a.nav-link { display: none; }
  .nav .nav-cta { padding: 9px 14px; font-size: 12.5px; white-space: nowrap; }
  .nav-burger { display: flex; }
  .nav.open { width: calc(100% - 20px); border-radius: 24px; padding-bottom: 12px; }
  .nav.open a.nav-link {
    display: block;
    order: 10;
    width: 100%;
    text-align: center;
    font-size: 15px;
    padding: 12px;
    border-radius: 14px;
  }
  .nav.open a.nav-link:nth-of-type(1) { margin-top: 8px; }
  .work-grid, .svc-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 300px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-chips { gap: 12px; }
}
