/* ==========================================================================
   TrasLúdica — Design system
   Apple-inspired: clear, minimal, generous whitespace.
   Brand accents (from logo): cyan, green, orange, pink, violet, yellow.
   ========================================================================== */

:root {
  /* Neutrals */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --hairline: rgba(0, 0, 0, 0.08);

  /* Brand accents (bright — for dots, avatars, decorative marks) */
  --cyan: #35b6e0;
  --green: #2fa45c;
  --orange: #f0941f;
  --pink: #ef7fa6;
  --violet: #a97fc4;
  --yellow: #f2bc1b;

  /* Brand accents, text-safe (WCAG AA >= 4.5:1 on white/#f5f5f7) */
  --cyan-text: #0a7396;
  --green-text: #1e7a43;
  --orange-text: #9d5807;
  --pink-text: #b0275a;
  --violet-text: #6f4497;
  --yellow-text: #8a6a03;
  --link: #086ca4;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Rhythm */
  --radius: 22px;
  --radius-photo: 28px;
  --section-y: clamp(4.5rem, 10vw, 8rem);
  --container: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

/* Accessibility ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Layout ------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.container-narrow {
  max-width: 780px;
}

.section {
  padding-block: var(--section-y);
}

.section-alt {
  background: var(--bg-alt);
}

/* Typography ---------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  letter-spacing: -0.03em;
}

.title-lg {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

.title {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}

.title-sm {
  font-size: 1.1875rem;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 450;
  text-wrap: pretty;
}

.muted {
  color: var(--ink-2);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.eyebrow.cyan { color: var(--cyan-text); }
.eyebrow.green { color: var(--green-text); }
.eyebrow.orange { color: var(--orange-text); }
.eyebrow.pink { color: var(--pink-text); }
.eyebrow.violet { color: var(--violet-text); }
.eyebrow.yellow { color: var(--yellow-text); }

/* Multicolor accent — one word per hero, echoing the logo */
/* Deeper stops than the raw brand palette so large text stays >= 3:1 (AA large) */
.gradient-text {
  background: linear-gradient(
    92deg,
    #189ad1 0%,
    #2a9d54 35%,
    #e07b00 70%,
    #e0447c 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head p {
  margin-top: 1rem;
}

.center {
  text-align: center;
}

.center.section-head {
  margin-inline: auto;
}

/* Buttons -------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-3);
}

.btn-ghost:hover {
  opacity: 1;
  border-color: var(--ink);
}

.link-arrow {
  font-weight: 600;
  white-space: nowrap;
}

.link-arrow::after {
  content: " →";
}

/* Header / Nav ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--hairline);
}

.site-header .container {
  max-width: 1280px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-right: auto;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-brand img {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--ink-2);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--ink);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
}

.nav-cta:hover {
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 120;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hero ---------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(4rem, 9vw, 7.5rem) 0;
  text-align: center;
}

.hero .lead {
  max-width: 640px;
  margin: 1.5rem auto 0;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

.hero-media {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

/* Full-bleed media band: the sharp image keeps its natural aspect, centered;
   the sides are "filled" with a blurred, scaled copy of the same image so it
   spans the full viewport width without deforming. */
.bleed {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.bleed-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(56px) saturate(1.15) brightness(1.04);
  transform: scale(1.2);
}

.bleed-main {
  position: relative;
  display: block;
  margin-inline: auto;
  width: auto;
  max-width: 100%;
  max-height: min(76vh, 660px);
  border-radius: var(--radius-photo);
}

/* Page hero (internal pages) */
.page-hero {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
}

.page-hero .lead {
  max-width: 680px;
  margin: 1.25rem auto 0;
}

/* Grids & cards -------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}

.section-alt .card {
  background: var(--bg);
}

.section:not(.section-alt) .card {
  background: var(--bg-alt);
}

.card .title-sm {
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.card ul {
  margin-top: 0.75rem;
}

/* Accent dot — small colored marker on cards */
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-bottom: 1.1rem;
}

.dot.cyan { background: var(--cyan); }
.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.pink { background: var(--pink); }
.dot.violet { background: var(--violet); }
.dot.yellow { background: var(--yellow); }

/* Check list ------------------------------------------------------------------------ */
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.65rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--green)
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" d="M3.5 8.5l3 3 6-7"/></svg>')
    center/62% no-repeat;
}

/* Numbered steps ----------------------------------------------------------------------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, 1fr);
}

.step {
  counter-increment: step;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.step:nth-child(1)::before { background: var(--cyan); }
.step:nth-child(2)::before { background: var(--green); }
.step:nth-child(3)::before { background: var(--orange); }
.step:nth-child(4)::before { background: var(--pink); }

.step p {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* Feature rows (media + text, alternating) ------------------------------------------------ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.feature + .feature {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.feature:nth-child(even) > .feature-media {
  order: 2;
}

.feature-media img {
  border-radius: var(--radius-photo);
}

.feature h2,
.feature h3 {
  margin-bottom: 1rem;
}

.feature p + p {
  margin-top: 0.9rem;
}

.feature .check-list {
  margin-top: 1.25rem;
}

/* Quote ------------------------------------------------------------------------------------ */
.quote {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
}

.quote .gradient-text {
  display: inline;
}

/* Team ---------------------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}

.team-card .role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* Contact form ----------------------------------------------------------------------------------- */
.form {
  display: grid;
  gap: 1.1rem;
  max-width: 560px;
  margin-inline: auto;
}

.form label {
  font-size: 0.875rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}

.form input,
.form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--link);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--ink-2);
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 3rem 2rem;
}

/* CTA band ------------------------------------------------------------------------------------------ */
.cta-band {
  text-align: center;
  padding-block: var(--section-y);
}

.cta-band .btn {
  margin-top: 2rem;
}

/* Footer --------------------------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  padding-block: 3rem 2rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
}

.footer-brand img {
  width: 26px;
  height: 26px;
}

.footer-links {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  gap: 0.55rem 3rem;
}

.footer-links a {
  color: var(--ink-2);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-legal {
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  color: var(--ink-2);
}

/* Reveal animations ------------------------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive --------------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .grid-4,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1120px) {
  /* Dropdown panel below the sticky header. Note: the header's backdrop-filter
     makes it the containing block for fixed descendants, so the panel is
     anchored absolutely to the header instead of the viewport. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 60px);
    flex-direction: column;
    justify-content: center;
    gap: 1.9rem;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 110;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .steps,
  .team-grid,
  .feature {
    grid-template-columns: 1fr;
  }

  .feature:nth-child(even) > .feature-media {
    order: 0;
  }

  .footer-links {
    grid-auto-flow: row;
    grid-template-rows: none;
  }
}
