/* DEFFE_DESIGN_KIT_v3 */
:root{
  --deffe-radius: 1.25rem;
  --deffe-radius-sm: .9rem;
	  --deffe-shadow-1: 0 12px 34px rgba(0,0,0,.11);
	  --deffe-shadow-2: 0 20px 60px rgba(0,0,0,.20);
  --deffe-accent: #5b7cfa;
  --deffe-accent2: #b063ff;
	  --deffe-accent3: #34d399;
	  --deffe-accent4: #fb7185;
  --deffe-success: #16a34a;
  --deffe-warning: #f59e0b;
  --deffe-danger: #ef4444;
  --deffe-page-bg-light: radial-gradient(1000px 520px at 18% -10%, rgba(168,85,247,.24), transparent 60%), radial-gradient(900px 520px at 86% 0%, rgba(14,165,233,.18), transparent 58%), radial-gradient(900px 520px at 15% 120%, rgba(245,158,11,.10), transparent 55%), linear-gradient(180deg, #faf5ff, #f1f5f9);
  --deffe-page-bg-dark: radial-gradient(1000px 520px at 18% -10%, rgba(168,85,247,.28), transparent 60%), radial-gradient(900px 520px at 86% 0%, rgba(14,165,233,.22), transparent 58%), radial-gradient(900px 520px at 15% 120%, rgba(245,158,11,.10), transparent 55%), linear-gradient(180deg, #050312, #0b1020);
}

/* Typography & rhythm */
html, body{ height: 100%; }
body{
	  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Slightly nicer headings by default */
h1,h2,h3{
  letter-spacing: -.02em;
}

/* Sticky footer baseline */
main{ flex: 1 0 auto; }
footer{ margin-top: auto; }

/* Homepage hero helpers */
.hero,
.hero-section,
.site-hero,
.banner-hero,
.cover-hero,
.masthead,
.deffe-hero-guard{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(420px, 55vh, 600px);
  max-height: 720px;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}
.page-hero{
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(320px, 46svh, 620px);
  padding-block: clamp(2.8rem, 6vw, 4.5rem);
  overflow: hidden;
}
.hero > .container,
.hero-section > .container,
.site-hero > .container,
.banner-hero > .container,
.cover-hero > .container,
.masthead > .container,
.page-hero > .container,
.deffe-hero-guard > .container,
.hero .container,
.hero-section .container,
.site-hero .container,
.banner-hero .container,
.cover-hero .container,
.masthead .container,
.page-hero .container,
.deffe-hero-guard .container{
  position: relative;
  z-index: 1;
}
.hero img,
.hero-section img,
.site-hero img,
.banner-hero img,
.cover-hero img,
.masthead img,
.deffe-hero-guard img{
  max-width: 100%;
}
.hero h1,
.hero-section h1,
.site-hero h1,
.banner-hero h1,
.cover-hero h1,
.masthead h1,
.deffe-hero-guard h1{
  margin-bottom: 1rem;
}
.hero .btn,
.hero-section .btn,
.site-hero .btn,
.banner-hero .btn,
.cover-hero .btn,
.masthead .btn,
.deffe-hero-guard .btn{
  margin-top: .5rem;
}
.deffe-hero-guard{
  height: auto !important;
  min-height: clamp(420px, 62svh, 860px) !important;
  padding-block: clamp(4rem, 9vw, 7rem) !important;
}
@media (max-width: 767.98px){
  .hero,
  .hero-section,
  .site-hero,
  .banner-hero,
  .cover-hero,
  .masthead,
  .deffe-hero-guard{
    min-height: clamp(360px, 58svh, 720px);
    padding-block: clamp(3rem, 10vw, 5rem);
    align-items: flex-end;
  }
  .page-hero{
    min-height: clamp(280px, 40svh, 520px);
    padding-block: clamp(2.25rem, 8vw, 3.5rem);
  }
}

/* Theme variables expected by prompts (theme-light / theme-dark) */
body.theme-light{
  --bg: #fbfbfd;
	  --surface: rgba(255,255,255,.86);
	  --surface2: rgba(255,255,255,.68);
  --text: #0f172a;
  --muted: rgba(15,23,42,.70);
  --border: rgba(15,23,42,.14);
  --glow: rgba(91,124,250,.42);
  background: var(--deffe-page-bg, var(--deffe-page-bg-light,
    radial-gradient(900px 420px at 10% -10%, rgba(91,124,250,.34), transparent 60%),
    radial-gradient(900px 420px at 90% -20%, rgba(176,99,255,.28), transparent 55%),
    radial-gradient(900px 520px at 15% 115%, rgba(52,211,153,.20), transparent 55%),
    radial-gradient(900px 520px at 85% 120%, rgba(251,113,133,.16), transparent 55%),
    linear-gradient(180deg, var(--bg), #f6f7fb)
  ));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
    color: var(--text);
}
body.theme-dark{
  --bg: #0b1020;
  --surface: rgba(255,255,255,.06);
  --surface2: rgba(255,255,255,.04);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --border: rgba(255,255,255,.12);
  --glow: rgba(176,99,255,.22);
  background: var(--deffe-page-bg, var(--deffe-page-bg-dark,
    radial-gradient(900px 420px at 10% -10%, rgba(91,124,250,.42), transparent 60%),
    radial-gradient(900px 420px at 90% -20%, rgba(176,99,255,.38), transparent 55%),
    radial-gradient(900px 520px at 15% 115%, rgba(52,211,153,.22), transparent 55%),
    radial-gradient(900px 520px at 85% 120%, rgba(251,113,133,.20), transparent 55%),
    linear-gradient(180deg, #070a12, var(--bg))
  ));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
    color: var(--text);
  color-scheme: dark;
}

/* Make Bootstrap utilities behave nicely in dark theme */
body.theme-dark .text-muted,
body.theme-dark .text-secondary,
body.theme-dark .text-body-secondary,
body.theme-dark .text-dark,
body.theme-dark .link-dark{
  color: var(--muted) !important;
}
body.theme-dark .border,
body.theme-dark .border-top,
body.theme-dark .border-bottom,
body.theme-dark .border-start,
body.theme-dark .border-end{
  border-color: var(--border) !important;
}

/* Links */
a{
  text-underline-offset: .18em;
  text-decoration-thickness: .08em;
}
a:hover{
  text-decoration-thickness: .12em;
}

/* Navbar & header polish */
.navbar{
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.theme-light .navbar{
  background: rgba(251,251,253,.92);
}
body.theme-dark .navbar{
  background: rgba(11,16,32,.88);
}

/* Cards */
.card{
  border-radius: var(--deffe-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--deffe-shadow-1);
	  backdrop-filter: blur(12px);
	  -webkit-backdrop-filter: blur(12px);
	  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	  overflow: hidden;
}
	.card:hover{
	  transform: translateY(-2px);
	  box-shadow: var(--deffe-shadow-2);
	}
body.theme-dark .card{
  box-shadow: 0 14px 48px rgba(0,0,0,.45);
}

/* Buttons */
.btn{
  border-radius: calc(var(--deffe-radius-sm) - .15rem);
	  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.btn-primary{
  border: 0;
  background: linear-gradient(135deg, var(--deffe-accent), var(--deffe-accent2));
  box-shadow: 0 10px 25px var(--glow);
}
.btn-primary:hover{
  filter: brightness(1.02);
  transform: translateY(-1px);
}
.btn-outline-primary{
  border-color: rgba(91,124,250,.55);
}

/* Images */
img{
  border-radius: calc(var(--deffe-radius) - .35rem);
}

/* Sections (optional helper class) */
.section{
  padding: clamp(3rem, 6vw, 5rem) 0;
}

/* Lightbox overlay baseline (if used) */
#imgLightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,.72);
  z-index: 1056;
}
#imgLightbox.is-open{display:flex;}
#imgLightbox img{
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--deffe-radius);
  box-shadow: var(--deffe-shadow-2);
}
#imgLightbox .lb-close{
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Global design tokens and theme variables */
:root {
  --radius: 12px;
  --accent: #2563eb; /* primary blue */
  --muted: #6c757d;
}

body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }

/* Light theme */
.theme-light {
  --bg: #fbfbfd;
  --text: #0f172a;
  --muted: #6b7280;
  --card-bg: #ffffff;
  --surface: #f5f7fb;
  --border: rgba(15,23,42,0.06);
}

/* Dark theme */
.theme-dark {
  --bg: #0b1221;
  --text: #ecf0f6;
  --muted: #9aa6b2 !important;
  --card-bg: #0f1724;
  --surface: #071022;
  --border: rgba(255,255,255,0.06);
  color-scheme: dark;
}

body { background: var(--bg); color: var(--text); }
.bg-surface { background: var(--surface); }
.card, .visual-card, .feature-card { background: var(--card-bg); border: 1px solid var(--border); }
.border-top { border-top-color: var(--border) !important; }
.site-header { background: transparent; }
.logo { object-fit: cover; border-radius: 8px; }
.nav-link { color: var(--text); opacity: .85; text-decoration: none; }
.link-muted { color: var(--muted); text-decoration: none; }
.text-muted { color: var(--muted) !important; }

/* Hero */
.hero-section { min-height: 65svh; display: flex; align-items: center; }
.hero-section .text-section { padding-right: 2rem; }
.visual-card { overflow: hidden; border-radius: var(--radius); }
.visual-card img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Cards and features */
.feature-card { border-radius: 12px; }
.card-sm img { height: 190px; object-fit: cover; }

/* Footer */
footer { color: var(--muted); }

/* Lightbox styles */
.img-lightbox { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1100; }
.img-lightbox-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,0.6); }
.img-lightbox-content { position: relative; z-index: 2; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.img-lightbox-content img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 30px rgba(2,6,23,0.6); }
.btn-close-light { position: absolute; right: -10px; top: -10px; background: rgba(255,255,255,0.9); border: none; border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.theme-dark .btn-close-light { background: rgba(0,0,0,0.6); color: #fff; }

/* Responsive tweaks */
@media (max-width: 767px) {
  .hero-section { min-height: 48svh; }
}

/* Ensure muted and secondary text strong contrast in dark */
.theme-dark .text-muted, .theme-dark .text-secondary, .theme-dark .lead { color: var(--muted) !important; }

/* DEFFE_DESIGN_ENHANCE_v1 */

/* Slightly stronger depth by default (applies only when theme classes exist) */
body.theme-light{
  background:
    radial-gradient(1100px 520px at 10% -10%, rgba(91,124,250,.46), transparent 60%),
    radial-gradient(1100px 520px at 90% -20%, rgba(176,99,255,.38), transparent 55%),
    radial-gradient(1100px 620px at 15% 115%, rgba(52,211,153,.24), transparent 55%),
    radial-gradient(1100px 620px at 85% 120%, rgba(251,113,133,.20), transparent 55%),
    linear-gradient(180deg, var(--bg), #f4f6ff) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
}
body.theme-dark{
  background:
    radial-gradient(1100px 520px at 10% -10%, rgba(91,124,250,.54), transparent 60%),
    radial-gradient(1100px 520px at 90% -20%, rgba(176,99,255,.46), transparent 55%),
    radial-gradient(1100px 620px at 15% 115%, rgba(52,211,153,.26), transparent 55%),
    radial-gradient(1100px 620px at 85% 120%, rgba(251,113,133,.22), transparent 55%),
    linear-gradient(180deg, #050713, var(--bg)) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
}

/* Brand + nav polish */
.navbar .navbar-brand{
  font-weight: 800;
  letter-spacing: -.02em;
}
@supports (-webkit-background-clip: text){
  .navbar .navbar-brand{
    background: linear-gradient(135deg, var(--deffe-accent), var(--deffe-accent2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.navbar .nav-link{
  padding: .55rem .85rem;
  border-radius: 999px;
  color: var(--muted) !important;
}
.navbar .nav-link:hover{
  background: rgba(91,124,250,.10);
  color: var(--text) !important;
}
.navbar .nav-link.active,
.navbar .nav-link[aria-current="page"]{
  background: rgba(91,124,250,.14);
  color: var(--text) !important;
}

/* Fallback: if the model did NOT use Bootstrap's navbar, still make header nav look decent */
header nav a{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}
header nav a:hover{
  background: rgba(91,124,250,.10);
  color: var(--text);
}

/* Better primary buttons even if the model outputs a flat Bootstrap default */
.btn-primary{
  border: 0 !important;
  background: linear-gradient(135deg, var(--deffe-accent), var(--deffe-accent2)) !important;
  box-shadow: 0 10px 25px var(--glow) !important;
}
.btn-primary:hover{ filter: brightness(1.03); transform: translateY(-1px); }
.btn-primary:active{ transform: translateY(0); }

/* Inputs: softer + clearer focus ring */
.form-control, .form-select{
  border-radius: calc(var(--deffe-radius-sm) - .15rem);
  border-color: var(--border);
  background: var(--surface2);
  color: var(--text);
}
.form-control:focus, .form-select:focus{
  border-color: rgba(91,124,250,.55);
  box-shadow: 0 0 0 .25rem rgba(91,124,250,.18);
}

/* Common scaffold helpers so auth/account pages never look unstyled */
.page-hero{
  padding: clamp(2.4rem, 5vw, 4rem) 0 1rem;
}
.section-card{
  border-radius: var(--deffe-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--deffe-shadow-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(1.15rem, 2vw, 1.6rem);
}
.feature-card{
  border-radius: var(--deffe-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--deffe-shadow-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(1.15rem, 2vw, 1.6rem);
}
.page-content > :last-child{ margin-bottom: 0; }
.mini-list{
  list-style: none;
  padding: 0;
  margin: 0;
}
.mini-list li{
  position: relative;
  padding-left: 1.05rem;
}
.mini-list li + li{ margin-top: .7rem; }
.mini-list li::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--deffe-accent);
}

/* Light-theme rescue for darker SaaS/API drafts */
body.theme-light,
body.theme-light .text-body,
body.theme-light .navbar,
body.theme-light .section-card,
body.theme-light .feature-card,
body.theme-light .doc-card,
body.theme-light .cta-card,
body.theme-light .page-card,
body.theme-light .hero-card,
body.theme-light .stat{
  color: var(--text) !important;
}
body.theme-light .text-muted-soft,
body.theme-light .text-muted,
body.theme-light .text-secondary,
body.theme-light .text-body-secondary,
body.theme-light .small.text-muted,
body.theme-light .footer,
body.theme-light .footer .text-muted{
  color: rgba(15,23,42,.68) !important;
}
body.theme-light .feature-card,
body.theme-light .doc-card,
body.theme-light .cta-card,
body.theme-light .page-card,
body.theme-light .hero-card,
body.theme-light .section-card,
body.theme-light .stat{
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72)) !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  box-shadow: 0 16px 44px rgba(15,23,42,.10) !important;
}
body.theme-light .hero-badge,
body.theme-light .mini-kbd{
  background: rgba(255,255,255,.72) !important;
  border-color: rgba(15,23,42,.10) !important;
  color: rgba(15,23,42,.74) !important;
}
body.theme-light .code-window{
  background: #0b1220 !important;
  border-color: rgba(15,23,42,.10) !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.16) !important;
}
body.theme-light .code-top{
  color: rgba(255,255,255,.72) !important;
  border-bottom-color: rgba(255,255,255,.10) !important;
}
body.theme-light .code-window pre,
body.theme-light .doc-card pre,
body.theme-light pre{
  color: #dbe7ff;
}
body.theme-light .btn-outline-light{
  color: var(--text) !important;
  border-color: rgba(15,23,42,.14) !important;
  background: rgba(255,255,255,.70) !important;
}
body.theme-light .btn-outline-light:hover,
body.theme-light .btn-outline-secondary:hover{
  color: var(--text) !important;
  border-color: rgba(91,124,250,.35) !important;
  background: rgba(91,124,250,.10) !important;
}
body.theme-light .navbar{
  border-bottom-color: rgba(15,23,42,.08) !important;
}
body.theme-light .navbar .nav-link{
  color: rgba(15,23,42,.72) !important;
}
body.theme-light .navbar .nav-link:hover,
body.theme-light .navbar .nav-link.active,
body.theme-light .navbar .nav-link[aria-current="page"]{
  color: var(--text) !important;
}
body.theme-light .navbar .navbar-toggler{
  border-color: rgba(15,23,42,.12) !important;
}
body.theme-light .navbar .navbar-toggler-icon{
  filter: invert(1) grayscale(1);
}
body.theme-light .table{
  --bs-table-color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(15,23,42,.10);
  --bs-table-striped-color: var(--text);
  --bs-table-striped-bg: rgba(15,23,42,.025);
  --bs-table-hover-color: var(--text);
  --bs-table-hover-bg: rgba(91,124,250,.05);
}
body.theme-dark .table{
  --bs-table-color: rgba(255,255,255,.92);
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(255,255,255,.10);
  --bs-table-striped-color: rgba(255,255,255,.92);
  --bs-table-striped-bg: rgba(255,255,255,.03);
  --bs-table-hover-color: rgba(255,255,255,.96);
  --bs-table-hover-bg: rgba(255,255,255,.04);
}
.deffe-theme-switch .btn.active{
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--deffe-accent), var(--deffe-accent2)) !important;
  box-shadow: 0 10px 25px var(--glow) !important;
}

/* Section headings: a bit more "designed" */
h1{ font-weight: 800; }
h2{ font-weight: 750; }

/* DEFFE_BRAND_LOGO_v1 */
.deffe-brand-logo{width:32px;height:32px;display:inline-block;object-fit:contain;vertical-align:middle;margin-right:.75rem;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.12);}
.navbar .deffe-brand-logo,.site-brand .deffe-brand-logo{flex:0 0 auto;}
