/* ===== Design tokens ===== */
:root {
  /* Palette derived from the TheZun logo: plum, rose-mauve, teal, violet spark */
  --bg: #faf8fb;
  --bg-2: #f3eef5;
  --surface: #ffffff;
  --surface-2: #f6f1f7;
  --border: rgba(74, 28, 68, 0.1);
  --text: #2b1230;
  --text-muted: #6f5f74;
  --primary: #6e2c63;
  --primary-2: #a3507e;
  --accent: #2f7c7c;
  --violet: #7c4dff;
  --success: #2f9e7a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(74, 28, 68, 0.14);
  --container: 1140px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 30px rgba(110, 44, 99, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(110, 44, 99, 0.42);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(110, 44, 99, 0.06);
}

/* ===== Header ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(250, 248, 251, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo img {
  height: 48px;
  width: auto;
}

.footer .logo img {
  height: 56px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.nav-cta {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* .nav-links a is more specific than .btn-primary, so restate the color */
.nav-links .nav-cta,
.nav-links .nav-cta:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 180px 0 120px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  animation: float 12s ease-in-out infinite;
}

.hero-bg .blob-1 {
  width: 520px;
  height: 520px;
  background: var(--primary);
  top: -120px;
  left: -140px;
}

.hero-bg .blob-2 {
  width: 460px;
  height: 460px;
  background: var(--accent);
  bottom: -160px;
  right: -120px;
  animation-delay: -6s;
}

.hero-bg .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 28, 68, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 28, 68, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 64px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin-bottom: 20px;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone {
  width: 280px;
  height: 580px;
  border-radius: 44px;
  background: #1f0f24;
  border: 10px solid #3a1f3d;
  box-shadow: 0 30px 70px rgba(43, 18, 48, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  animation: phoneFloat 6s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-16px) rotate(-2deg); }
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #3a1f3d;
  border-radius: 999px;
  z-index: 2;
}

.phone-screen {
  position: absolute;
  inset: 0;
  padding: 56px 20px 24px;
  background: linear-gradient(180deg, #33193a 0%, #1f0f24 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-card {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.screen-card.tall {
  flex: 1;
  background: linear-gradient(135deg, rgba(163, 80, 126, 0.55), rgba(47, 124, 124, 0.45));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.screen-line {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  margin-bottom: 8px;
}

.screen-line.short { width: 55%; }
.screen-line.xshort { width: 35%; }

.screen-row {
  display: flex;
  gap: 10px;
}

.screen-dot {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  flex-shrink: 0;
}

.screen-dot.cyan { background: linear-gradient(135deg, var(--accent), #4fa3a3); }
.screen-dot.green { background: linear-gradient(135deg, var(--violet), #a78bfa); }

.float-badge {
  position: absolute;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: badgeFloat 5s ease-in-out infinite;
}

.float-badge strong {
  display: block;
  font-size: 0.95rem;
}

.float-badge span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.float-badge .icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.badge-1 {
  top: 80px;
  left: 0;
}

.badge-2 {
  bottom: 90px;
  right: 0;
  animation-delay: -2.5s;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== Clients / logos strip ===== */
.logos {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logos p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.logos-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px 56px;
  opacity: 0.55;
}

.logos-row span {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

/* ===== Services ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(110, 44, 99, 0.1), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 44, 99, 0.35);
  box-shadow: 0 20px 50px rgba(74, 28, 68, 0.14);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(110, 44, 99, 0.12), rgba(47, 124, 124, 0.14));
  color: var(--primary);
}

.card h3 {
  font-size: 1.2rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.card li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 6px 0 6px 24px;
  position: relative;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
}

/* ===== Process ===== */
.process {
  background: var(--bg-2);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.step {
  position: relative;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.step h3 {
  font-size: 1.1rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ===== Portfolio ===== */
.work-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  transition: transform 0.3s ease;
}

.work-item:hover {
  transform: translateY(-6px);
}

.work-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--work-bg, linear-gradient(135deg, #6366f1, #22d3ee));
  opacity: 0.85;
  transition: transform 0.5s ease;
}

.work-item:hover::before {
  transform: scale(1.06);
}

.work-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.75) 100%);
}

.work-meta {
  position: relative;
  z-index: 1;
}

.work-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  margin-bottom: 10px;
}

.work-meta h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.work-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ===== Tech stack ===== */
.tech-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tech-chip {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.tech-chip:hover {
  color: var(--text);
  border-color: rgba(110, 44, 99, 0.45);
  background: rgba(110, 44, 99, 0.06);
}

/* ===== Testimonials ===== */
.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.testimonial .quote {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial .stars {
  color: #e0a52a;
  letter-spacing: 2px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author strong {
  display: block;
  font-size: 0.95rem;
}

.author span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== CTA / Contact ===== */
.cta {
  position: relative;
  overflow: hidden;
}

.cta-box {
  position: relative;
  border-radius: 28px;
  padding: 72px 48px;
  background: linear-gradient(135deg, rgba(110, 44, 99, 0.1), rgba(47, 124, 124, 0.08));
  border: 1px solid rgba(110, 44, 99, 0.2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.cta-box h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.cta-box > div > p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.contact-list svg {
  color: var(--accent);
  flex-shrink: 0;
}

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}

.form-group {
  margin-bottom: 16px;
}

.form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110, 44, 99, 0.18);
}

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

.form .btn {
  width: 100%;
}

.form-msg {
  margin-top: 14px;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.form-msg.ok { color: var(--success); }
.form-msg.err { color: #c53d5b; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: var(--bg-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 320px;
}

.footer h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li {
  margin-bottom: 10px;
}

.footer li a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer li a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--text-muted);
  margin-left: 20px;
}

.footer-bottom a:hover {
  color: var(--text);
}

.social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.social a:hover {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(110, 44, 99, 0.06);
}

/* ===== Legal pages ===== */
.legal-hero {
  padding: 160px 0 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(163, 80, 126, 0.18), transparent),
    radial-gradient(500px 300px at 90% 10%, rgba(47, 124, 124, 0.14), transparent);
}

.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.legal-hero p {
  color: var(--text-muted);
  margin: 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  padding-top: 64px;
  padding-bottom: 96px;
}

.toc {
  position: sticky;
  top: 100px;
  align-self: start;
}

.toc h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc li a {
  display: block;
  padding: 7px 0 7px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all 0.2s ease;
}

.toc li a:hover,
.toc li a.active {
  color: var(--text);
  border-left-color: var(--primary);
}

.legal-content {
  max-width: 760px;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 48px 0 16px;
  scroll-margin-top: 100px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin: 28px 0 10px;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  font-size: 1rem;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--accent);
}

.legal-content strong {
  color: var(--text);
}

.notice {
  background: rgba(110, 44, 99, 0.06);
  border: 1px solid rgba(110, 44, 99, 0.22);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 32px;
}

.notice p {
  margin: 0;
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== Back to top ===== */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 90;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 24px;
  }

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

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

  .cta-box {
    grid-template-columns: 1fr;
    padding: 48px 32px;
  }

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

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 85vw);
    background: var(--bg-2);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 96px 32px 32px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 101;
  }

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

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

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

  .hero {
    padding: 140px 0 80px;
  }

  .phone {
    width: 240px;
    height: 500px;
  }

  .float-badge {
    display: none;
  }

  .grid-2,
  .grid-3,
  .steps {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom a {
    margin-left: 0;
    margin-right: 20px;
  }

  .legal-hero {
    padding: 130px 0 40px;
  }
}
