/* ==========================================================================
   Link Butterfly — Design System
   Light-first layout, dark hero + footer. Tasteful, restrained animation.
   ========================================================================== */

:root {
  /* Brand tokens */
  --navy: #10233F;
  --deep: #0B1220;
  --accent: #3478F6;
  --accent-dark: #2459C4;
  --violet: #8B5CF6;
  --soft: #F5F7FB;
  --text: #172033;
  --secondary: #64748B;
  --white: #FFFFFF;
  --border: #E3E9F2;
  --success: #16A34A;
  --error: #DC2626;

  /* Shape + spacing */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 35, 63, .06);
  --shadow-md: 0 10px 30px -12px rgba(16, 35, 63, .18);
  --shadow-lg: 0 24px 60px -24px rgba(16, 35, 63, .28);
  --container: 1140px;
  --font: 'Inter', 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.015em; color: var(--navy); margin: 0 0 .6em; font-weight: 750; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .45em; }

.container { width: min(var(--container), 92%); margin: 0 auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--deep); color: #DCE6F5; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #9DB9FF; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .8rem;
}
.section-dark .eyebrow { color: #9DB9FF; }
.lead { font-size: 1.15rem; color: var(--secondary); max-width: 62ch; }
.section-dark .lead { color: #AAB8D0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.7rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  text-decoration: none !important; white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent) 0%, var(--violet) 130%);
  background-size: 160% 160%;
  box-shadow: 0 10px 24px -10px rgba(52, 120, 246, .55);
}
.btn-primary:hover { transform: translateY(-2px); background-position: 90% 50%; box-shadow: 0 16px 32px -10px rgba(52,120,246,.6); }
.btn-ghost { color: var(--navy); border-color: var(--border); background: #fff; }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn-light { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-light:hover { transform: translateY(-2px); border-color: #fff; }
.btn-whatsapp { background: #22C55E; color: #fff; }
.btn-whatsapp:hover { transform: translateY(-2px); background: #16A34A; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--navy); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.01em; text-decoration: none !important; }
.brand .wordmark-butterfly { background: linear-gradient(120deg, var(--accent), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img { width: 38px; height: 38px; display: block; }

.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav > ul { display: flex; align-items: center; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.main-nav a.nav-link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .6rem .85rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 600; font-size: .96rem; text-decoration: none !important;
}
.main-nav a.nav-link:hover, .main-nav a.nav-link:focus-visible { background: var(--soft); color: var(--accent); }
.main-nav a.nav-link[aria-current="page"] { color: var(--accent); }
.header-cta { margin-left: .8rem; }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .5rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: .65rem .9rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: .94rem; text-decoration: none !important; }
.dropdown a:hover { background: var(--soft); color: var(--accent); }
.caret { width: 10px; height: 10px; transition: transform .2s ease; }
.has-dropdown:hover .caret, .has-dropdown:focus-within .caret { transform: rotate(180deg); }

/* Mobile menu */
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .7rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.mobile-panel { display: none; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 600px at 85% -10%, rgba(139,92,246,.28), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(52,120,246,.25), transparent 60%),
                    var(--deep);
         color: #DCE6F5; overflow: hidden; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.hero h1 { color: #fff; }
.hero .lead { color: #AAB8D0; }
.hero .eyebrow { color: #9DB9FF; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.6rem; }
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 50px rgba(0,0,0,.4)); }

/* Floating network animation (SVG) */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse-link { 0% { stroke-dashoffset: 60; opacity: .55; } 50% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: .55; } }
@keyframes blink-node { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.net-group { animation: floaty 7s ease-in-out infinite; }
.net-link { stroke-dasharray: 6 6; animation: pulse-link 5s linear infinite; }
.net-node { animation: blink-node 4s ease-in-out infinite; }
.net-node.d2 { animation-delay: 1.2s; } .net-node.d3 { animation-delay: 2.1s; }
.net-node.d4 { animation-delay: .6s; } .net-node.d5 { animation-delay: 1.8s; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.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: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #CBD8F0; }
.card .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(52,120,246,.12), rgba(139,92,246,.14)); margin-bottom: 1rem; }
.card .icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--secondary); font-size: .97rem; flex: 1; }
.card .card-link { font-weight: 700; margin-top: 1rem; display: inline-flex; align-items: center; gap: .4rem; }
.card .card-link::after { content: '→'; transition: transform .2s ease; }
.card .card-link:hover::after { transform: translateX(4px); }

.step-card { position: relative; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet));
  margin-bottom: 1rem; box-shadow: 0 8px 18px -8px rgba(52,120,246,.6);
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: .8rem; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: .28em; width: 1.15em; height: 1.15em; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/62% no-repeat;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(180deg, var(--deep) 0%, #132A4E 100%); color: #DCE6F5; padding: clamp(2.5rem,5vw,4rem) 0; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero p { color: #AAB8D0; max-width: 66ch; }
.breadcrumbs { font-size: .88rem; margin-bottom: 1.2rem; color: #8FA3C4; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '/'; margin-right: .5rem; color: #5C7194; }
.breadcrumbs a { color: #B9CBEC; }
.breadcrumbs [aria-current="page"] { color: #fff; font-weight: 600; }

/* ---------- FAQ accordion ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: none; border: 0; padding: 1.15rem 1.4rem; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--navy); text-align: left; font-size: 1.02rem;
}
.faq-q .plus { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--soft);
  display: grid; place-items: center; transition: transform .3s ease, background .3s ease; }
.faq-q .plus svg { width: 14px; height: 14px; }
.faq-q[aria-expanded="true"] .plus { transform: rotate(45deg); background: var(--accent); }
.faq-q[aria-expanded="true"] .plus svg path { stroke: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .38s ease; }
.faq-a-inner { padding: 0 1.4rem 1.4rem; color: var(--secondary); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, #16305A 55%, #2A1F5C 100%);
  border-radius: calc(var(--radius) + 6px); color: #E4EBF9;
  padding: clamp(2.2rem, 5vw, 3.6rem); text-align: center;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ''; position: absolute; inset: -40%;
  background: radial-gradient(400px 300px at 20% 20%, rgba(139,92,246,.35), transparent 60%),
              radial-gradient(400px 300px at 80% 80%, rgba(52,120,246,.35), transparent 60%);
  animation: cta-drift 12s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes cta-drift { from { transform: translate(-4%, -4%); } to { transform: translate(4%, 4%); } }
.cta-band h2 { color: #fff; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Forms ---------- */
.form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .4rem; color: var(--navy); }
.field .req { color: var(--error); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem; color: var(--text); background: #fff; transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,120,246,.15); }
.field .hint { font-size: .85rem; color: var(--secondary); margin-top: .3rem; }
.field .err { display: none; font-size: .86rem; color: var(--error); margin-top: .35rem; font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field.invalid .err { display: block; }
.checkbox-field { display: flex; gap: .7rem; align-items: flex-start; }
.checkbox-field input { width: 20px; height: 20px; margin-top: .2rem; flex-shrink: 0; accent-color: var(--accent); }
.checkbox-field label { font-weight: 500; font-size: .93rem; color: var(--secondary); }
.form-note { font-size: .88rem; color: var(--secondary); margin-top: 1rem; }
.form-status { display: none; border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 1.2rem; font-weight: 600; }
.form-status.success { display: block; background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.form-status.error { display: block; background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contact info blocks ---------- */
.info-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--soft); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.info-card .icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); }
.info-card .icon svg { width: 22px; height: 22px; }
.info-card strong { display: block; color: var(--navy); }
.info-card a { color: var(--text); font-weight: 600; word-break: break-all; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--violet)); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 2.2rem 4rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .t-dot { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: #fff;
  border: 2px solid var(--accent); display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.timeline h3 { margin-bottom: .3rem; }
.timeline p { color: var(--secondary); }

/* ---------- Tables / pricing ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
.pkg { position: relative; }
.pkg.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); }
.pkg .tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(120deg, var(--accent), var(--violet));
  color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .35rem 1rem; border-radius: 999px; white-space: nowrap; }
.price-line { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 1rem 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #AAB8D0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.2rem; padding: 3.5rem 0 2.5rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #AAB8D0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .brand { color: #fff; margin-bottom: .8rem; }
.footer-brand p { font-size: .93rem; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.4rem 0; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; font-size: .86rem; color: #7E93B8; }
.footer-bottom ul { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(4rem, 10vw, 7rem) 0; }
.error-page .code { font-size: clamp(5rem, 14vw, 9rem); font-weight: 800; line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; } .reveal-d2 { transition-delay: .2s; } .reveal-d3 { transition-delay: .3s; }

/* ---------- Focus & accessibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(52,120,246,.5); outline-offset: 2px;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .7rem 1.2rem; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .grid-3, .grid-4, .pkg-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav > ul, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .mobile-panel {
    display: block; position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); z-index: 150;
    background: #fff; box-shadow: var(--shadow-lg); padding: 1.2rem 1.4rem 2rem;
    transform: translateX(105%); transition: transform .32s ease; overflow-y: auto;
  }
  .mobile-panel.open { transform: none; }
  .mobile-panel ul { list-style: none; margin: 0; padding: 0; }
  .mobile-panel a { display: block; padding: .7rem .4rem; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border); text-decoration: none !important; }
  .mobile-panel .sub a { padding-left: 1.4rem; font-weight: 500; font-size: .93rem; color: var(--secondary); border-bottom: 0; }
  .mobile-panel .btn { margin-top: 1.2rem; width: 100%; justify-content: center; }
  .panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
  .panel-close { background: var(--soft); border: 0; border-radius: 8px; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--navy); }
  .scrim { position: fixed; inset: 0; background: rgba(11,18,32,.5); z-index: 140; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .scrim.show { opacity: 1; visibility: visible; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .pkg-grid, .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .hero-ctas .btn { width: auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
