/* ==========================================================================
   Respondo — Style
   Plain CSS. No framework. No build step.
   37signals-inspired: bold type, vibrant color, playful non-linear layout.
   Two-column text, zigzag cards, staggered grids, tilted elements.
   ========================================================================== */

/* ---------- Reset & Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-color: #c33;
}

a:hover {
  color: #c33;
}

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

/* ---------- Layout ---------- */

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

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

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  color: #1a1a1a;
}

.nav-logo-img {
  width: 2rem;
  height: 2rem;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #555;
  transition: color 0.15s;
}

.nav-link:hover {
  color: #1a1a1a;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover {
  color: #fff;
}

.btn-primary {
  background: #c33;
  color: #fff;
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(204, 51, 51, 0.25);
}

.btn-primary:hover {
  background: #a22;
  box-shadow: 0 4px 16px rgba(204, 51, 51, 0.35);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-nav {
  background: #c33;
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 50px;
}

.btn-nav:hover {
  background: #a22;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  border-radius: 8px;
}

/* ---------- Sections ---------- */

.section {
  padding: 6rem 0;
}

.section-headline {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.75rem;
  text-align: center;
}

.section-intro {
  margin-bottom: 2.5rem;
  text-align: center;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.section-outro {
  margin-top: 2.5rem;
  text-align: center;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Marker highlight (Basecamp inset box-shadow) */
.highlight-marker {
  box-shadow: inset 0 -0.55em 0 #ffe066;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- Hero ---------- */

.hero {
  padding: 8rem 0 6rem;
  background: #fdf6f0;
  text-align: center;
  position: relative;
}

/* Oversized decorative circle (HEY-style background accent) */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 51, 51, 0.06) 0%, transparent 70%);
  top: -100px;
  right: -200px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 85, 204, 0.05) 0%, transparent 70%);
  bottom: -80px;
  left: -150px;
  pointer-events: none;
}

.hero-headline {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.hero-headline .accent {
  color: #c33;
}

.hero-sub {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* ---------- Problem — Two-column "letter" layout ---------- */

#problem {
  background: #fff;
}

#problem .section-headline {
  text-align: center;
  margin-bottom: 2.5rem;
}

.highlight {
  font-weight: 700;
  font-size: 1.4rem;
  color: #c33;
  display: inline-block;
  padding: 0.1em 0;
}

/* Stacked-paper letter (Basecamp/HEY pattern) */
.letter {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.letter::before,
.letter::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.05),
    0 12px 32px rgba(0, 0, 0, 0.04);
}

.letter::before {
  transform: rotate(-1.5deg) translate(-0.3%, 0.2%);
}

.letter::after {
  transform: rotate(1.2deg) translate(0.2%, 0.5%);
  height: 98%;
}

.letter-body {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 8px;
  padding: 3rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.05),
    0 12px 32px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.letter-body p {
  margin-bottom: 0;
}

/* ---------- Steps — Horizontal staggered on desktop ---------- */

#how {
  background: #f0f4ff;
  position: relative;
}

/* Decorative oversized accent */
#how::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 85, 204, 0.06) 0%, transparent 70%);
  top: -120px;
  left: -200px;
  pointer-events: none;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  padding: 2rem;
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.03);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: #3355cc;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step p {
  color: #444;
}

/* ---------- Services — Offset grid ---------- */

#work {
  background: #fdf6f0;
  position: relative;
}

#work::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 51, 51, 0.05) 0%, transparent 70%);
  bottom: -100px;
  right: -180px;
  pointer-events: none;
}

.services {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.service {
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 100%;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.15s, transform 0.15s;
  position: relative;
}

.service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #c33;
  border-radius: 12px 12px 0 0;
}

.service:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 16px 48px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.service strong {
  font-size: 1.1rem;
}

.service span {
  color: #555;
  font-size: 0.95rem;
}

/* ---------- Differentiators — Zigzag cards ---------- */

#why {
  background: #fff;
}

.differentiators {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.differentiator {
  position: relative;
}

.differentiator-inner {
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.differentiator-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
}

/* Card 1 — blue, offset left, tilt right */
.differentiator:nth-child(1) .differentiator-inner {
  background: #f6f9ff;
  border: 1px solid #e0e8f5;
}

.differentiator:nth-child(1) .differentiator-inner::before {
  background: #3355cc;
}

.differentiator:nth-child(1) .differentiator-title {
  color: #3355cc;
}

/* Card 2 — warm, offset right, tilt left */
.differentiator:nth-child(2) .differentiator-inner {
  background: #fdf6f0;
  border: 1px solid #f0dcc8;
}

.differentiator:nth-child(2) .differentiator-inner::before {
  background: #c33;
}

.differentiator:nth-child(2) .differentiator-title {
  color: #c33;
}

/* Card 3 — purple, offset left, tilt right */
.differentiator:nth-child(3) .differentiator-inner {
  background: #f5f0fa;
  border: 1px solid #e4ddef;
}

.differentiator:nth-child(3) .differentiator-inner::before {
  background: #7744bb;
}

.differentiator:nth-child(3) .differentiator-title {
  color: #7744bb;
}

.differentiator-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.differentiator p {
  color: #444;
}

/* ---------- FAQ — Two-column grid ---------- */

#faq {
  background: #f0f4ff;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e8f5;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 4px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.faq-item:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.06);
}

.faq-question {
  padding: 1.25rem 3rem 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  list-style: none;
  transition: color 0.15s;
}

.faq-question:hover {
  color: #3355cc;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  content: '';
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  top: 1.25rem;
  font-size: 1.25rem;
  font-weight: 400;
  color: #3355cc;
  transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
  content: '\2212';
}

.faq-item[open] .faq-question {
  color: #3355cc;
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: #555;
}

.faq-answer p {
  line-height: 1.7;
}

/* ---------- CTA — Stacked-paper letter ---------- */

.section-cta {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a3a 50%, #1a2a4a 100%);
  color: #fff;
  text-align: center;
  padding: 6rem 0;
}

.cta-letter {
  position: relative;
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 4rem 3rem;
  transform: rotate(-0.5deg);
}

.cta-letter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  transform: rotate(1.5deg) translate(0.3%, 0.5%);
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-letter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  transform: rotate(-1.8deg) translate(-0.2%, 0.3%);
  z-index: -2;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.section-cta .section-headline {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cta-sub {
  font-size: 1.2rem;
  color: #b8b0c8;
  margin-bottom: 2.5rem;
}

.section-cta .btn-primary {
  background: #c33;
  box-shadow: 0 4px 20px rgba(204, 51, 51, 0.4);
}

.section-cta .btn-primary:hover {
  background: #e44;
  box-shadow: 0 6px 28px rgba(204, 51, 51, 0.5);
}

/* ---------- Footer ---------- */

.footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.footer a {
  color: #999;
  text-decoration: none;
}

.footer a:hover {
  color: #c33;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    font-size: 1rem;
  }

  .btn-nav {
    text-align: center;
    padding: 0.75rem 1.25rem;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-headline {
    font-size: 2.4rem;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  .section {
    padding: 4rem 0;
  }

  .section-headline {
    font-size: 2rem;
  }

  .section-cta {
    padding: 4rem 0;
  }

  .section-cta .section-headline {
    font-size: 2.2rem;
  }

  .letter-body {
    padding: 2rem;
  }

  .differentiator-inner {
    padding: 1.75rem;
  }

  .cta-letter {
    padding: 2.5rem 1.5rem;
    transform: none;
  }

  .cta-letter::before,
  .cta-letter::after {
    display: none;
  }

  .nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ---------- Tablet+ (768px) ---------- */

@media (min-width: 768px) {
  .hero-headline {
    font-size: 4.2rem;
  }

  .section-headline {
    font-size: 2.75rem;
  }

  /* Problem: two-column letter */
  .letter-body {
    flex-direction: row;
    gap: 3rem;
  }

  .letter-col {
    flex: 1;
  }

  /* Steps: horizontal row with staggered vertical offset */
  .steps {
    flex-direction: row;
    gap: 1.25rem;
    align-items: flex-start;
  }

  .step {
    flex: 1;
  }

  .step:nth-child(2) {
    margin-top: 3rem;
  }

  .step:nth-child(3) {
    margin-top: 1rem;
  }

  /* Subtle rotation per step */
  .step:nth-child(1) {
    transform: rotate(-0.75deg);
  }

  .step:nth-child(2) {
    transform: rotate(0.5deg);
  }

  .step:nth-child(3) {
    transform: rotate(-0.4deg);
  }

  /* Services: 2-col grid with offset rows */
  .services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.25rem;
    row-gap: 2.5rem;
  }

  .service {
    flex: none;
  }

  /* Stagger even items down */
  .service:nth-child(even) {
    transform: translateY(1.5rem);
  }

  /* Span the last odd item centered */
  .service:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 340px;
    justify-self: center;
  }

  /* Differentiators: zigzag with alternating margin offset */
  .differentiator:nth-child(odd) {
    margin-right: 6rem;
  }

  .differentiator:nth-child(even) {
    margin-left: 6rem;
  }

  .differentiator:nth-child(1) .differentiator-inner {
    transform: rotate(-0.6deg);
  }

  .differentiator:nth-child(2) .differentiator-inner {
    transform: rotate(0.4deg);
  }

  .differentiator:nth-child(3) .differentiator-inner {
    transform: rotate(-0.5deg);
  }

  /* FAQ: two-column grid */
  .faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* ---------- Large screens (1024px) ---------- */

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 4.8rem;
  }

  .section-cta .section-headline {
    font-size: 3.5rem;
  }

  /* Steps: more dramatic stagger */
  .step:nth-child(2) {
    margin-top: 4rem;
  }

  .step:nth-child(3) {
    margin-top: 1.5rem;
  }

  /* Services: 3-col grid */
  .services {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 3rem;
  }

  .service:nth-child(even) {
    transform: translateY(2rem);
  }

  .service:last-child:nth-child(odd) {
    max-width: none;
  }

  /* Wider zigzag on differentiators */
  .differentiator:nth-child(odd) {
    margin-right: 10rem;
  }

  .differentiator:nth-child(even) {
    margin-left: 10rem;
  }

}
