/* ════════════════════════════════════════════
   WILNEXO — SHARED STYLESHEET
   ════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────── */
:root {
  --red:         #D62B2B;
  --red-dark:    #B81E1E;
  --red-light:   #FFF0F0;
  --black:       #0D0D0D;
  --gray-900:    #1A1A1A;
  --gray-700:    #3D3D3D;
  --gray-500:    #6B6B6B;
  --gray-300:    #C4C4C4;
  --gray-100:    #F4F4F4;
  --white:       #FFFFFF;
  --green:       #1a7a3f;
  --green-light: #EAFFF3;
  --radius-sm:   6px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --shadow-md:   0 6px 24px rgba(0,0,0,.10);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.14);
  --t:           .26s cubic-bezier(.4,0,.2,1);
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
}

/* ── RESET ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--white); color: var(--black); overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── OVERLAY ─────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,.4); opacity: 0; visibility: hidden;
  transition: opacity var(--t), visibility var(--t); backdrop-filter: blur(2px);
}
.overlay.active { opacity: 1; visibility: visible; }

/* ── SLIDE MENU ──────────────────────────── */
.slide-menu {
  position: fixed; top: 0; left: 0; z-index: 100;
  width: min(300px,82vw); height: 100dvh; background: var(--white);
  transform: translateX(-100%);
  transition: transform .36s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.slide-menu.open { transform: translateX(0); }
.menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--gray-100);
}
.menu-logo { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--red); }
.menu-close {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--gray-700);
  transition: background var(--t), color var(--t);
}
.menu-close:hover { background: var(--red); color: var(--white); }
.menu-close svg { width: 20px; height: 20px; }
nav.slide-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
nav.slide-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px; font-size: .97rem; font-weight: 500;
  color: var(--gray-700); border-left: 3px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t);
}
nav.slide-nav a:hover, nav.slide-nav a.active {
  background: var(--red); color: var(--white); border-left-color: var(--red-dark);
}
nav.slide-nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.menu-footer { padding: 20px 24px; border-top: 1px solid var(--gray-100); font-size: .78rem; color: var(--gray-500); }

/* ── HEADER ──────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}
.topbar {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; gap: 16px;
}
.hamburger {
  background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--radius-sm); transition: background var(--t); flex-shrink: 0;
}
.hamburger:hover { background: var(--gray-100); }
.hamburger span {
  display: block; width: 22px; height: 2px; background: var(--black);
  border-radius: 4px; transition: transform var(--t), opacity var(--t), width var(--t);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 14px; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.logo-area { display: flex; align-items: center; gap: 10px; flex: 1; }
.logo-box { width: 36px; height: 36px; background: var(--red); border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.logo-box svg { width: 20px; height: 20px; color: var(--white); }
.logo-wordmark { font-family: var(--font-head); font-size: 1.28rem; font-weight: 800; letter-spacing: -.5px; }
.logo-wordmark span { color: var(--red); }
.desktop-nav { display: none; align-items: center; gap: 4px; }
.desktop-nav a {
  padding: 7px 14px; font-size: .9rem; font-weight: 500;
  color: var(--gray-700); border-radius: var(--radius-sm);
  transition: background var(--t), color var(--t);
}
.desktop-nav a:hover { background: var(--gray-100); color: var(--black); }
.desktop-nav .active-tool { background: var(--red-light); color: var(--red); font-weight: 600; }
.header-cta { background: var(--red) !important; color: var(--white) !important; padding: 8px 18px !important; border-radius: var(--radius-sm); }
.header-cta:hover { background: var(--red-dark) !important; }
@media (min-width:900px) { .desktop-nav { display: flex; } }

/* ── HERO MINI ───────────────────────────── */
.hero-mini {
  background: var(--white); padding: 52px 24px 44px;
  text-align: center; border-bottom: 1px solid var(--gray-100);
  position: relative; overflow: hidden;
}
.hero-mini::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(214,43,43,.06) 0%, transparent 70%);
  pointer-events: none;
}
.breadcrumb {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .82rem; color: var(--gray-500); margin-bottom: 16px;
}
.breadcrumb a { color: var(--red); }
.breadcrumb a:hover { opacity: .75; }
.breadcrumb svg { width: 14px; height: 14px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red-light); color: var(--red);
  border: 1px solid rgba(214,43,43,.18); border-radius: 999px;
  padding: 5px 14px; font-size: .78rem; font-weight: 600; margin-bottom: 20px;
}
.hero-badge .dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; animation: pulse 1.8s infinite; }
.hero-mini h1 {
  font-family: var(--font-head); font-size: clamp(1.8rem,5vw,3rem);
  font-weight: 800; letter-spacing: -1px; line-height: 1.1;
  color: var(--black); max-width: 720px; margin: 0 auto 16px;
}
.hero-mini h1 span { color: var(--red); }
.hero-mini .hero-desc { font-size: 1rem; color: var(--gray-500); max-width: 560px; margin: 0 auto; line-height: 1.75; }

/* ── SECTION LABELS ──────────────────────── */
.section-label {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-head); font-size: clamp(1.6rem,4vw,2.5rem);
  font-weight: 800; letter-spacing: -.8px; line-height: 1.15; color: var(--black); margin-bottom: 16px;
}
.section-desc { font-size: 1rem; color: var(--gray-500); line-height: 1.75; max-width: 560px; margin-bottom: 48px; }
.text-center { text-align: center; }
.text-center .section-desc { margin-left: auto; margin-right: auto; }

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; font-family: var(--font-body);
  border: 2px solid transparent; cursor: pointer;
  transition: all var(--t); white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); box-shadow: 0 4px 16px rgba(214,43,43,.25); }
.btn-primary:hover:not(:disabled) { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(214,43,43,.35); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-ghost:hover { border-color: var(--black); color: var(--black); background: var(--gray-100); }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.btn-green { background: var(--green); color: var(--white); border-color: var(--green); box-shadow: 0 4px 14px rgba(26,122,63,.2); }
.btn-green:hover { background: #155e31; transform: translateY(-1px); }
.btn-green:disabled { opacity: .45; cursor: not-allowed; }
.btn-danger { background: var(--white); color: #c0392b; border-color: #fcd5d5; }
.btn-danger:hover { background: #fff5f5; border-color: #c0392b; }
.btn-full { width: 100%; }
.action-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── CARDS ───────────────────────────────── */
.card {
  background: var(--white); border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-header {
  padding: 18px 24px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px;
}
.card-icon {
  width: 36px; height: 36px; background: var(--red-light); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-icon svg { width: 18px; height: 18px; color: var(--red); }
.card-title { font-family: var(--font-head); font-size: 1rem; font-weight: 700; }
.card-sub { font-size: .8rem; color: var(--gray-500); margin-top: 1px; }
.card-body { padding: 24px; }

/* ── DROP ZONE ───────────────────────────── */
.drop-zone {
  border: 2.5px dashed var(--gray-300); border-radius: var(--radius-md);
  background: var(--gray-100); padding: 48px 24px; text-align: center;
  cursor: pointer; transition: border-color var(--t), background var(--t); position: relative;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--red); background: var(--red-light); }
.drop-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon {
  width: 52px; height: 52px; background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; transition: background var(--t);
}
.drop-zone:hover .drop-icon, .drop-zone.drag-over .drop-icon { background: var(--red); }
.drop-icon svg { width: 24px; height: 24px; color: var(--gray-500); transition: color var(--t); }
.drop-zone:hover .drop-icon svg, .drop-zone.drag-over .drop-icon svg { color: var(--white); }
.drop-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.drop-sub { font-size: .85rem; color: var(--gray-500); }
.drop-formats { margin-top: 10px; font-size: .76rem; color: var(--gray-300); }

/* file loaded state */
.file-loaded {
  display: none; align-items: center; gap: 14px;
  background: var(--green-light); border: 1.5px solid rgba(26,122,63,.2);
  border-radius: var(--radius-md); padding: 16px 20px; margin-top: 14px;
}
.file-loaded.visible { display: flex; }
.file-loaded-icon { width: 42px; height: 42px; background: var(--green); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-loaded-icon svg { width: 20px; height: 20px; color: var(--white); }
.file-name { font-family: var(--font-head); font-size: .95rem; font-weight: 700; color: var(--green); word-break: break-all; }
.file-meta { font-size: .78rem; color: var(--gray-500); margin-top: 2px; }
.file-remove {
  margin-left: auto; background: none; border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); transition: background var(--t), color var(--t); flex-shrink: 0;
}
.file-remove:hover { background: rgba(214,43,43,.1); color: var(--red); }
.file-remove svg { width: 16px; height: 16px; }

/* ── ERROR ───────────────────────────────── */
.error-msg {
  display: none; align-items: center; gap: 10px;
  background: #fff5f5; border: 1.5px solid #fcd5d5;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: .88rem; color: #c0392b; font-weight: 500; margin-bottom: 16px;
}
.error-msg.show { display: flex; }
.error-msg svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── STEPS GRID ──────────────────────────── */
.steps-section { padding: 72px 24px; }
.steps-container { max-width: 1200px; margin: 0 auto; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 22px; margin-top: 48px; }
.step-card {
  background: var(--gray-100); border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-md); padding: 26px 22px;
  transition: border-color var(--t), box-shadow var(--t);
}
.step-card:hover { border-color: rgba(214,43,43,.2); box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: rgba(214,43,43,.15); line-height: 1; margin-bottom: 12px; }
.step-card h3 { font-family: var(--font-head); font-size: .92rem; font-weight: 700; margin-bottom: 7px; }
.step-card p { font-size: .84rem; color: var(--gray-500); line-height: 1.65; }

/* ── INFO GRID ───────────────────────────── */
.info-section { background: var(--gray-100); padding: 72px 24px; }
.info-container { max-width: 1200px; margin: 0 auto; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 18px; margin-top: 48px; }
.info-card {
  background: var(--white); border-radius: var(--radius-md); padding: 22px;
  border: 1.5px solid var(--gray-100); transition: border-color var(--t);
}
.info-card:hover { border-color: rgba(214,43,43,.2); }
.info-icon { width: 40px; height: 40px; background: var(--red-light); border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.info-icon svg { width: 20px; height: 20px; color: var(--red); }
.info-card h3 { font-family: var(--font-head); font-size: .9rem; font-weight: 700; margin-bottom: 7px; }
.info-card p { font-size: .83rem; color: var(--gray-500); line-height: 1.65; }

/* ── REVEAL ANIMATION ────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── FOOTER — BLACK ──────────────────────── */
footer {
  background: #111111;
  color: var(--white);
  padding: 52px 24px 28px;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 44px; }
@media (min-width:600px) { .footer-top { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo-box { width: 34px; height: 34px; background: rgba(255,255,255,.12); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.footer-logo-box svg { width: 18px; height: 18px; color: var(--white); }
.footer-wordmark { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; color: var(--white); }
.footer-tagline { font-size: .87rem; opacity: .65; line-height: 1.65; max-width: 280px; color: var(--white); }
.footer-col h4 {
  font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px;
  color: rgba(255,255,255,.45);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: .88rem; color: rgba(255,255,255,.7); transition: color var(--t); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: .82rem; color: rgba(255,255,255,.45); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: .82rem; color: rgba(255,255,255,.45); transition: color var(--t); }
.footer-links a:hover { color: var(--white); }

/* ── BACK TO TOP ─────────────────────────── */
.btt {
  position: fixed; bottom: 28px; right: 24px; z-index: 70;
  width: 44px; height: 44px; background: var(--red); color: var(--white);
  border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(214,43,43,.4);
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity var(--t), transform var(--t), background var(--t);
}
.btt.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.btt:hover { background: var(--red-dark); }
.btt svg { width: 20px; height: 20px; }

/* ── TOAST ───────────────────────────────── */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 200; background: var(--black); color: var(--white);
  padding: 12px 24px; border-radius: 999px; font-size: .88rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .28s, transform .28s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── ANIMATIONS ──────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes fadeUp { from{opacity:0;transform:translateY(-18px)} to{opacity:1;transform:translateY(0)} }

/* ── SPINNER ─────────────────────────────── */
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gray-300); border-top-color: var(--red); animation: spin .8s linear infinite; flex-shrink: 0; }

/* ── SELECT ──────────────────────────────── */
select {
  width: 100%; padding: 11px 38px 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300); background: var(--white);
  font-family: var(--font-body); font-size: .9rem; color: var(--black);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  transition: border-color var(--t), box-shadow var(--t);
}
select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(214,43,43,.1); }

/* ── INPUT RANGE ─────────────────────────── */
input[type="range"] { width: 100%; height: 6px; border-radius: 4px; outline: none; border: none; background: var(--gray-100); cursor: pointer; appearance: none; -webkit-appearance: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--red); cursor: pointer; border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(214,43,43,.4); }

/* ── GENERIC SECTION ─────────────────────── */
.generic-section { max-width: 860px; margin: 0 auto; padding: 64px 24px; }
.generic-section h2 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; margin: 36px 0 12px; color: var(--black); letter-spacing: -.5px; }
.generic-section h2:first-child { margin-top: 0; }
.generic-section h3 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin: 24px 0 8px; color: var(--black); }
.generic-section p { font-size: .97rem; color: var(--gray-700); line-height: 1.8; margin-bottom: 14px; }
.generic-section ul { padding-left: 20px; margin-bottom: 14px; }
.generic-section ul li { font-size: .97rem; color: var(--gray-700); line-height: 1.8; margin-bottom: 6px; }
.generic-section a { color: var(--red); border-bottom: 1px solid rgba(214,43,43,.2); }
.generic-section a:hover { border-bottom-color: var(--red); }
.last-updated { display: inline-block; background: var(--gray-100); border-radius: var(--radius-sm); padding: 6px 14px; font-size: .8rem; color: var(--gray-500); margin-bottom: 32px; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width:480px) {
  .card-body { padding: 18px; }
  .card-header { padding: 14px 18px; }
  .steps-section, .info-section { padding: 52px 16px; }
  .generic-section { padding: 40px 18px; }
}
