/* =========================================================
   LogicWall — Global Styles (Light/Dark + Responsive)
   File: static/logicwall/css/site.css
========================================================= */

/* =========================
   DESIGN TOKENS
========================= */
:root{
  --brand: #1f7ae0;
  --brand2:#0b2b55;

  /* Light (toned down) */
  --bg:#f6f7fb;
  --text:#0f172a;
  --muted:#64748b;
  --card:#ffffff;
  --border:#e6e8ef;
  --shadow: 0 10px 30px rgba(2,6,23,.06);

  /* Soft accent glows */
  --g1: rgba(31,122,224,.14);
  --g2: rgba(14,165,233,.12);

  --radius: 16px;
  --container: 1120px;
}

body.theme-dark{
  --bg:#0b1220;
  --text:#e5e7eb;
  --muted:#9aa4b2;
  --card: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);
  --shadow: 0 18px 40px rgba(0,0,0,.35);

  --g1: rgba(31,122,224,.22);
  --g2: rgba(14,165,233,.18);
}

/* =========================
   RESET + BASE
========================= */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:var(--bg);
  color:var(--text);
}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 18px;
}

.page{padding-top:76px}

/* =========================
   NAV
========================= */
.nav{
  position:fixed;top:0;left:0;right:0;
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);
  z-index:50;
}
body.theme-dark .nav{ background:rgba(11,18,32,.72); }

.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:76px;
  gap:12px;
}

/* Logo */
.brand{ display:inline-flex; align-items:center; }
.brand-logo{ height:38px; width:auto; display:block; }

/* Optional chip for light theme (use .brand-chip on <a class="brand ...">) */
body:not(.theme-dark) .brand.brand-chip{
  background: rgba(10,12,20,0.92);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 14px;
  padding: 6px 10px;
  box-shadow: 0 10px 22px rgba(15,23,42,0.12);
}
body.theme-dark .brand.brand-chip{
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.nav-links{
  display:flex;
  gap:18px;
  align-items:center;
}
.nav-links a{ font-weight:800; opacity:.88; }
.nav-links a:hover{ opacity:1; }

.nav-burger{
  display:none;
  border:1px solid var(--border);
  background:var(--card);
  border-radius:12px;
  height:40px;
  width:44px;
  font-size:18px;
  color:var(--text);
}

.nav-mobile{
  display:none;
  border-top:1px solid var(--border);
  padding:12px 18px;
  background:var(--bg);
}
.nav-mobile a{
  display:block;
  padding:10px 4px;
  font-weight:900;
}
.nav-mobile .mobile-toggle{margin:10px 0 12px}
.nav-mobile.show{display:block}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius:14px;
  font-weight:900;
  border:1px solid transparent;
  white-space:nowrap;
  cursor:pointer;
}

.btn-primary{
  background:var(--brand);
  color:#fff;
  box-shadow:0 10px 25px rgba(31,122,224,.22);
}
.btn-primary:hover{filter:brightness(.98)}

.btn-ghost{
  background:var(--card);
  border:1px solid var(--border);
}
body.theme-dark .btn-ghost:hover{ border-color: rgba(255,255,255,.18); }
body:not(.theme-dark) .btn-ghost:hover{ border-color:#cbd5e1; }

.btn-outline-light{
  background: transparent;
  border: 1px solid var(--border);
}
body.theme-dark .btn-outline-light:hover{ border-color: rgba(255,255,255,.20); }
body:not(.theme-dark) .btn-outline-light:hover{ border-color:#cbd5e1; }

/* =========================
   THEME TOGGLE
========================= */
.theme-toggle{
  height:42px;
  min-width:42px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--card);
  box-shadow:var(--shadow);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-weight:900;
  color:var(--text);
}
.theme-toggle .moon{display:none}
body.theme-dark .theme-toggle .sun{display:none}
body.theme-dark .theme-toggle .moon{display:inline}

/* =========================
   HERO (PROPER) — PREMIUM
========================= */
.hero{
  position: relative;
  min-height: 72vh;
  padding: 56px 0 34px;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  overflow: hidden;
  background-image: var(--hero-img, none);
}

/* Theme binding */
body.theme-dark .hero{
  background-color: #0b1220;
  background-image:
    linear-gradient(180deg, rgba(5,9,20,.55), rgba(5,9,20,.88)),
    var(--hero-img-dark);
}
body:not(.theme-dark) .hero{
  background-color: #ffffff;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.00), rgba(255,255,255,.10)),
    var(--hero-img-light);
}

/* Ambient animated glow layer */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.9;
  background:
    radial-gradient(900px 420px at 15% 15%, rgba(0,180,255,.12), transparent 60%),
    radial-gradient(820px 420px at 85% 20%, rgba(120,80,255,.10), transparent 60%),
    radial-gradient(920px 520px at 50% 95%, rgba(0,255,180,.08), transparent 65%);
  animation: heroBreath 10s ease-in-out infinite alternate;
}

/* Overlay */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  background: transparent;
}
body.theme-dark .hero::after{
  background: linear-gradient(180deg, rgba(5,9,20,0.42), rgba(5,9,20,0.78));
}
body:not(.theme-dark) .hero::before{
  opacity:.55;
  background:
    radial-gradient(900px 420px at 15% 15%, rgba(0,140,255,.10), transparent 60%),
    radial-gradient(820px 420px at 85% 20%, rgba(120,80,255,.08), transparent 60%),
    radial-gradient(920px 520px at 50% 95%, rgba(0,190,140,.06), transparent 65%);
}

@keyframes heroBreath{
  from{ transform: translateY(0) scale(1); filter: blur(0px); }
  to{ transform: translateY(-6px) scale(1.02); filter: blur(0.2px); }
}
@media (prefers-reduced-motion: reduce){
  .hero::before{ animation:none !important; }
}

/* content stacking */
.hero .container{ position:relative; z-index:1; }

.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:22px;
  align-items:start;
}

/* Typography */
.h1{
  font-size:clamp(34px, 4.6vw, 56px);
  line-height:1.05;
  margin:0 0 12px;
  letter-spacing:-.02em;
}
.lead{
  font-size:clamp(15px, 1.5vw, 18px);
  color:var(--muted);
  margin:0 0 18px;
  max-width:62ch;
  line-height:1.75;
}
.cta-row{display:flex;gap:12px;flex-wrap:wrap}

/* Badges */
.hero-badges{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.badge{
  font-size:13px;
  font-weight:900;
  background:var(--card);
  border:1px solid var(--border);
  padding:8px 10px;
  border-radius:999px;
}

/* Metrics */
.hero-metrics{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
  max-width: 720px;
}
.metric{
  padding:12px 14px;
  border:1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border-radius: 14px;
}
.metric-kpi{ font-weight:1000; font-size:14px; letter-spacing:.01em; }
.metric-sub{ margin-top:4px; font-size:13px; color: var(--muted); line-height:1.55; }

/* Hero right card */
.hero-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:18px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hero-card::before{
  content:"";
  position:absolute;
  top:-40%;
  left:-70%;
  width:60%;
  height:220%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  opacity:0;
  transition: opacity .22s ease, transform .6s ease;
  pointer-events:none;
}
.hero-card:hover{
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  box-shadow: 0 18px 44px rgba(0,0,0,.25);
}
.hero-card:hover::before{
  opacity:1;
  transform: translateX(210%) rotate(18deg);
}
.hero-card-title{font-weight:1000;margin-bottom:10px}
.checklist{margin:0;padding-left:18px;color:var(--muted)}
.checklist li{margin:8px 0}

/* =========================
   PROCESS / BRIDGE
========================= */
.section-bridge{ padding-top: 42px; }
.bridge-head{ max-width: 78ch; margin-bottom: 18px; }

.pipeline-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-top: 14px;
}
.pipeline-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pipeline-card:hover{
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  box-shadow: 0 16px 42px rgba(0,0,0,.22);
}
.pipe-icon{
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 10%, var(--card));
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.pipe-icon svg{
  width:22px; height:22px;
  color: var(--brand);
  stroke-width: 2.2;
}
.pipe-title{ font-weight: 1000; font-size: 15px; margin-bottom: 6px; }

/* =========================
   SECTIONS + GRIDS
========================= */
.section{padding:56px 0}

.section-head{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom: 1px solid var(--section-divider);
}

.section-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}
.section-kicker::before{
  content:"";
  width:26px;
  height:2px;
  border-radius:2px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
}

.h2{
  font-size:clamp(24px, 2.6vw, 34px);
  letter-spacing:-.02em;
  margin:0 0 10px;
}
.muted{color:var(--muted)}

.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:18px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px}
.grid2{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:16px}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}
.card-title{font-weight:1000;margin-bottom:8px;font-size:16px}


/* =========================================================
   ABOUT + WHY — Read More (theme safe)
   Fixes: invisible text on light theme + black fade shed
========================================================= */

/* About cards grid */
.about-grid{ margin-top: 18px; }
.about-card .mini-title{ font-weight: 1000; margin-bottom: 6px; }

/* ---------- Theme-safe tokens for Read More ---------- */
/* Light theme defaults */
:root{
  --rm-text: color-mix(in srgb, var(--text) 82%, transparent);
  --rm-fade-from: color-mix(in srgb, var(--bg) 0%, transparent);
  --rm-fade-to: var(--bg);
}

/* Dark theme overrides */
body.theme-dark{
  --rm-text: color-mix(in srgb, var(--text) 92%, transparent);
  --rm-fade-from: rgba(10,15,30,0);
  --rm-fade-to: rgba(10,15,30,.95);
}

/* ---------- Shared behaviour: About + Why text ---------- */
.about-text,
.why-text{
  /* show only first few lines */
  max-height: 7.5em;
  overflow: hidden;
  position: relative;
  transition: max-height .4s ease;

  /* readability */
  font-size: 16.5px;
  line-height: 1.85;
  letter-spacing: .2px;
  white-space: pre-line;

  /* layout */
  max-width: 78ch;
  margin-inline: auto;

  /* theme-safe color */
  color: var(--rm-text);
}

/* Expanded state */
.about-text.is-open,
.why-text.is-open{
  max-height: 1000px;
}

/* Fade hint (theme-safe) */
.about-text:not(.is-open)::after,
.why-text:not(.is-open)::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height: 70px;
  background: linear-gradient(to bottom, var(--rm-fade-from), var(--rm-fade-to));
  pointer-events:none;
}

/* ---------- Button ---------- */
.read-more-btn{
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;

  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}
.read-more-btn:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* =========================
   SERVICES
========================= */
.services-grid{ margin-top:18px; }

.service-card{
  display:block;
  text-decoration:none;
  cursor:pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  position:relative;
  overflow:hidden;
}
.service-card:hover{
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.service-icon-top{ margin: 0 auto 14px; width:72px; height:72px; }
.service-icon-box{
  width:100%;
  height:100%;
  border-radius:22px;
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--card);
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .22s ease, border-color .22s ease;
}
.service-card:hover .service-icon-box{
  transform: translateY(-1px) scale(1.03);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.service-lucide svg,
.service-icon-box svg{ width:34px; height:34px; }

.service-title{ font-size:18px; font-weight:1000; margin-top:6px; text-align:center; }
.service-desc{
  margin-top:8px;
  line-height:1.6;
  text-align:center;
  max-width:44ch;
  margin-left:auto;
  margin-right:auto;
}
.service-more{
  margin-top:14px;
  font-weight:900;
  letter-spacing:.01em;
  color: var(--text);
  opacity:.9;
  text-align:center;
  transition: transform .22s ease, opacity .22s ease;
}
.service-card:hover .service-more{ transform: translateX(2px); opacity:1; }

.service-card::before{
  content:"";
  position:absolute;
  inset:auto -30% 0 -30%;
  height:2px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--brand) 55%, transparent),
    transparent
  );
  opacity:0;
  transition: opacity .22s ease;
}
.service-card:hover::before{ opacity:.9; }

.service-card-disabled{ cursor: default; opacity: .85; }
.service-card-disabled:hover{ transform: none; box-shadow: none; }

/* REVEAL */
.reveal-on-scroll{
  opacity:0;
  transform: translateY(10px) scale(.98);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-on-scroll.is-visible{
  opacity:1;
  transform: translateY(0) scale(1);
}

/* =========================
   PRODUCTS
========================= */
.products-grid { margin-top: 18px; }

.product-card-vertical{
  text-align:center;
  padding-top:22px;
  position:relative;
  overflow:hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-logo-top{
  margin:0 auto 14px;
  width:min(140px, 44vw);
  height:min(140px, 44vw);
  max-width:140px;
  max-height:140px;
}
.product-logo-box{
  width:100%;
  height:100%;
  border-radius:28px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.product-logo{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
  transition: transform .22s ease, opacity .22s ease;
}
.product-logo-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:1000;
  font-size:28px;
  color:var(--text);
  letter-spacing:.04em;
  transition: transform .22s ease, opacity .22s ease;
}

.product-name-center{
  font-size:clamp(18px, 2.2vw, 22px);
  font-weight:1000;
  margin-top:6px;
}
.product-tagline-center{ margin-top:6px; color:var(--muted); font-weight:800; font-size:13px; }
.product-desc-center{
  margin-top:12px;
  color:var(--muted);
  line-height:1.6;
  max-width:42ch;
  margin-left:auto;
  margin-right:auto;
}
.product-actions-center{ margin-top:16px; display:flex; justify-content:center; }

.product-card-vertical::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: inherit;
  pointer-events:none;
  opacity:0;
  transition: opacity .22s ease;
  background:
    radial-gradient(1000px 240px at 20% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%),
    radial-gradient(800px 240px at 100% 10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 60%);
}
.product-card-vertical::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-70%;
  width:60%;
  height:220%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  opacity:0;
  transition: opacity .22s ease, transform .6s ease;
  pointer-events:none;
}
.product-card-vertical:hover{
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.product-card-vertical:hover::before{ opacity:1; }
.product-card-vertical:hover::after{ opacity:1; transform: translateX(210%) rotate(18deg); }
.product-card-vertical:hover .product-logo-box{
  transform: translateY(-1px) scale(1.03);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.product-card-vertical:hover .product-logo,
.product-card-vertical:hover .product-logo-fallback{ transform: scale(1.02); }
.product-learnmore span{ display:inline-block; transition: transform .22s ease; }
.product-card-vertical:hover .product-learnmore span{ transform: translateX(3px); }

/* FAQ */
.faq{margin-top:14px}
.faq-item{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px 14px;
  background:var(--card);
  margin-bottom:10px;
}
.faq-item summary{cursor:pointer;font-weight:1000}

/* WHY */
.why-intro{ max-width: 72ch; margin: 10px 0 26px; line-height: 1.75; }
.why-grid{ margin-top: 8px; }
.why-card{
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.why-card:hover{
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  box-shadow: 0 14px 36px rgba(0,0,0,.25);
}
.why-card .mini-title{ font-weight: 1000; margin-bottom: 6px; }
.why-card::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:10px;
  height:2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 40%, transparent), transparent);
  opacity:0;
  transition: opacity .22s ease;
}
.why-card:hover::after{ opacity:1; }
.why-card .muted{ line-height: 1.7; }
.why-icon{
  width:42px; height:42px; margin-bottom:12px;
  display:flex; align-items:center; justify-content:center;
  border-radius:14px;
  background: color-mix(in srgb, var(--brand) 10%, var(--card));
  border: 1px solid var(--border);
}
.why-icon svg{ width:22px; height:22px; stroke-width:2.2; color: var(--brand); }

/* CONTACT */
.contact-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:14px;
  margin-top:18px;
}
.form .form-row{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:12px;
}
label{font-weight:900;font-size:13px}

/* Base inputs (fallback if any field misses class="input") */
input, textarea, select{
  width:100%;
  display:block;
  font:inherit;
  padding:12px 14px;
  min-height:44px;

  border-radius:12px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
}

/* Preferred class (Django form adds .input already) */
.input{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}

textarea{ min-height:120px; resize:vertical; }

input:focus, textarea:focus, select:focus,
.input:focus{
  outline:none;
  border-color:rgba(31,122,224,.55);
  box-shadow: 0 0 0 4px rgba(31,122,224,.18);
}

/* =========================
   FOOTER (fixed + responsive)
========================= */
.footer{
  border-top:1px solid var(--border);
  padding:28px 0 18px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 92%, var(--brand) 2%),
      var(--bg)
    );
}

.footer-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items:start;
}

.footer-title{ font-weight:1000; font-size:18px; letter-spacing:-.01em; }
.footer-desc{ margin:10px 0 14px; max-width:58ch; line-height:1.75; }
.footer-cta-row{ display:flex; gap:10px; flex-wrap:wrap; }

.footer-toplink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--card);
}
.footer-toplink:hover{
  border-color: color-mix(in srgb, var(--brand) 25%, var(--border));
}

.footer-panel{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.footer-title-sm{
  font-weight:1000;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.9;
  margin-bottom:10px;
}

.footer-links{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px 14px;
}
.footer-links a{ font-weight:900; opacity:.86; }
.footer-links a:hover{ opacity:1; text-decoration: underline; text-underline-offset: 3px; }

.footer-contact{ display:grid; gap:8px; line-height:1.6; }

.footer-social{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
}
.footer-social a{ font-weight:900; opacity:.86; }
.footer-social a:hover{ opacity:1; text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.footer-mini{ opacity:.75; }



/* =========================================================
   Product Page Utilities
========================================================= */
.grid-2{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* Unified input style (product forms) */
.input{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  outline: none;
}
.input::placeholder{ color: var(--muted); }
.input:focus{ border-color: rgba(255, 255, 255, 0.18); }
body:not(.theme-dark) .input:focus{ border-color: rgba(31,122,224,.55); }

.form-wrap{ max-width: 760px; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns:1fr; }
  .grid4{grid-template-columns:repeat(2,1fr)}
  .grid3{grid-template-columns:repeat(2,1fr)}
  .grid2{grid-template-columns:1fr}
  .contact-grid{grid-template-columns:1fr}
  .footer-grid{ grid-template-columns: 1fr; }
  .footer-panel{ grid-template-columns: 1fr; }

  .nav-links{display:none}
  .nav-burger{display:inline-flex}

  .section{padding:44px 0}
  .pipeline-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px){
  .grid-2,
  .grid-3{ grid-template-columns: 1fr; }
}

@media (max-width: 820px){
  .hero-metrics{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .container{padding:0 14px}
  .page{padding-top:74px}
  .nav-inner{height:74px}

  .cta-row{gap:10px}
  .btn{padding:11px 14px}

  .grid4{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}

  .card{padding:16px}
  .hero{padding:46px 0 26px}

  .product-card-vertical{padding-top:18px}
  .product-logo-top{
    width:min(120px, 48vw);
    height:min(120px, 48vw);
    max-width:120px;
    max-height:120px;
    margin-bottom:12px;
  }
  .product-logo-box{ border-radius:22px; padding:12px; }
  .product-desc-center{max-width:100%}

  .footer-links{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px){
  .footer-links{ grid-template-columns: 1fr; }
}

@media (max-width: 420px){
  .btn{width:100%}
  .cta-row{flex-direction:column;align-items:stretch}
  .badge{font-size:12px}
  .nav-mobile{padding:10px 14px}
}


/* =========================
   SECTION DIVIDERS (THEME SAFE)
========================= */
body.theme-light { --section-divider: rgba(15, 23, 42, 0.08); }
body.theme-dark  { --section-divider: rgba(255, 255, 255, 0.06); }

/* Use for explicit divider elements (recommended) */
.section-divider{
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--section-divider), transparent);
  margin-top: 24px;
}

hr{
  border: none;
  height: 1px;
  background: var(--section-divider);
}


/* =========================
   Cookie banner
========================= */
.cookie-banner{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
}

.cookie-card{
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.20);
}

.cookie-title{
  font-weight: 900;
  margin-bottom: 6px;
}

.cookie-text{
  font-size: 13px;
  line-height: 1.6;
}

.cookie-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-settings{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.cookie-check{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
}


/* =========================
   Cookie banner — DARK THEME FIX
   (improves contrast + readability)
========================= */
body.theme-dark .cookie-banner{
  left: 12px;
  right: 12px;
  bottom: 12px;
}

body.theme-dark .cookie-card{
  /* Stronger separation from page */
  background: rgba(16, 22, 35, 0.92);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.theme-dark .cookie-title{
  color: rgba(255,255,255,0.96);
}

body.theme-dark .cookie-text{
  color: rgba(255,255,255,0.78);
}

body.theme-dark .cookie-text a{
  color: rgba(255,255,255,0.92);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.28);
  text-underline-offset: 3px;
}

body.theme-dark .cookie-text a:hover{
  text-decoration-color: rgba(255,255,255,0.65);
}

body.theme-dark .cookie-settings{
  border-top: 1px solid rgba(255,255,255,0.12);
}

body.theme-dark .cookie-check{
  color: rgba(255,255,255,0.82);
}

body.theme-dark .cookie-check input[type="checkbox"]{
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #4ea1ff); /* uses your accent if defined */
  filter: brightness(1.1);
}

/* If your ghost buttons look too dark on dark bg */
body.theme-dark .cookie-actions .btn.btn-ghost{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
}

body.theme-dark .cookie-actions .btn.btn-ghost:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
}

.footer-legal{
  margin-top: 12px;
  font-size: 13px;
}

.footer-legal a{
  opacity: .85;
}

.footer-legal a:hover{
  opacity: 1;
  text-decoration: underline;
}


/* =========================
   TOASTS (Django messages)
   Top-right on desktop, full-width on mobile
========================= */

#toast-container{
  position: fixed;
  z-index: 99999;

  /* Safe placement */
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));

  display: flex;
  flex-direction: column;
  gap: 10px;

  /* Prevent crazy widths */
  width: min(420px, calc(100vw - 32px));
  pointer-events: none; /* allow clicks through container */
}

.toast{
  pointer-events: auto; /* allow selecting/copying if needed */
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
  line-height: 1.35;

  background: rgba(15, 23, 42, .92);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;

  box-shadow: 0 14px 35px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);

  transition: opacity .35s ease, transform .35s ease;
  transform: translateY(0);
  opacity: 1;
}

/* Success / error styling */
.toast-success{ border-color: rgba(34,197,94,.35); }
.toast-error, .toast-danger{ border-color: rgba(239,68,68,.35); }
.toast-warning{ border-color: rgba(245,158,11,.35); }
.toast-info{ border-color: rgba(59,130,246,.35); }

.toast-hide{
  opacity: 0;
  transform: translateY(-8px);
}

/* Mobile: centered + full width */
@media (max-width: 520px){
  #toast-container{
    left: 12px;
    right: 12px;
    top: calc(12px + env(safe-area-inset-top));
    width: auto;
  }
  .toast{
    border-radius: 12px;
  }
}


/* =========================
   GLOBAL FORM INPUTS
   (Works on home + product pages)
========================= */

.input,
input.input,
textarea.input,
select.input{
  width: 100%;
  display: block;
  padding: 12px 14px;
  min-height: 44px;

  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);

  color: var(--text);
  outline: none;
}

textarea.input{ min-height: 120px; resize: vertical; }

.input::placeholder{ color: var(--muted); }


.input:focus{
  border-color: rgba(31,122,224,.55);
  box-shadow: 0 0 0 4px rgba(31,122,224,.18);
}

/* If any card overlay exists, don't block form interaction */
.card{ position: relative; }
.card::before,
.card::after{ pointer-events: none !important; }



/* =========================================================
   FORM VISIBILITY FIX (Dark theme)
   Makes inputs clearly visible inside cards
========================================================= */

.form-wrap input,
.form-wrap textarea,
.form-wrap select,
.form input,
.form textarea,
.form select,
.input{
  width: 100%;
  display: block;
  padding: 12px 14px;
  min-height: 44px;

  border-radius: 12px;

  /* Stronger separation from card */
  background: rgba(0, 0, 0, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;

  color: var(--text) !important;
}

.form-wrap textarea,
.form textarea{
  min-height: 120px;
  resize: vertical;
}

.form-wrap input::placeholder,
.form-wrap textarea::placeholder,
.form input::placeholder,
.form textarea::placeholder,
.input::placeholder{
  color: rgba(255,255,255,0.55) !important;
}

.form-wrap input:focus,
.form-wrap textarea:focus,
.form input:focus,
.form textarea:focus,
.input:focus{
  outline: none !important;
  border-color: rgba(31,122,224,.55) !important;
  box-shadow: 0 0 0 4px rgba(31,122,224,.18) !important;
}
/* DEBUG: make inputs obvious */
input, textarea, select{
  background: #ff00ff !important;
  border: 4px solid #00ff00 !important;
  color: #ffffff !important;
}
