:root{
  /* --bg: #0b1220;
  --panel: #0f172a;
  --card: #111a2e;
  --text: #e5e7eb;
  --muted: #9aa3b2;
  --brand: #60a5fa; 
  --ring: #2a3b63;
  --ok: #22c55e;
  --warn: #fbbf24;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.25); */
  --bg: #0b1220;
  --panel: #0f172a;
  --card: #111a2e;
  --text: #e5e7eb;
  --muted: #9aa3b2;
  --ring: #2a3b63;
  --ok: #22c55e;
  --warn: #fbbf24;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
   /* Updated Brand Base */
  --brand: #c44940;

  /* Monochromatic Variants */
  --brand-light: #e19f9e;
  --brand-dark: #a23432;

  /* Complementary Accent */
  --accent-complement: #40c4aa;

  /* Triadic Accents */
  --triad-blue: #4090c4;
  --triad-yellow: #c4c440;

  /* Analogous Warm Tones */
  --brand-warm1: #c47840;
  --brand-warm3: #c44069;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  height: 100%;
  font:16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, #1b273f 0%, transparent 70%), var(--bg);
}
main {
  /* Ensures main content expands to fill available space */
  flex: 1;
}
/* Header */
.site-header{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; background:rgba(15,23,42,.9);
  backdrop-filter: blur(8px); border-bottom:1px solid #1f2a44;
}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text); font-weight:700; letter-spacing:.2px}
.brand img{filter:drop-shadow(0 4px 12px rgba(96,165,250,.45))}
.nav{display:flex; gap:12px; align-items:center}
.nav-link{padding:10px 12px; border-radius:12px; text-decoration:none; color:var(--text); opacity:.85}
.nav-link:hover{background:#c44940; opacity:1}
.nav-link.active{background:#c44940; outline:1px solid #1f2a44}

/* Buttons */
.btn{background:var(--brand); color:#FFFFFF; border:0; padding:10px 14px; font-weight:600; border-radius:12px; box-shadow:var(--shadow); cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn-outline{background:var(#EBEBEB); color:var(#c44940); outline:1px solid #c44940}

/* Hero */
.hero{padding:56px 20px 10px}
.hero-content{max-width:960px; margin:0 auto; text-align:center}
.hero h1{margin:0 0 10px; font-size:clamp(28px,4vw,44px); letter-spacing:.2px}
.hero p{margin:0 auto 16px; color:var(--muted); max-width:780px}
.cta-row{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}

/* Sections */
.container{max-width:1200px; margin:0 auto; padding:10px 20px 40px}
.section{margin:26px 0; padding:18px; background:linear-gradient(180deg, rgba(255,255,255,.02), transparent 60%); border-radius:var(--radius); border:1px solid #1f2a44}
.section.alt{background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01) 70%)}
.section-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px}
.section-head h2, .section-head h1{margin:0}
.section-cta{color:var(--brand); text-decoration:none}

/* Grid & Cards */
.grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(270px,1fr)); gap:14px}
.card{
  background:var(--card); border:1px solid #1e2b4c; border-radius:16px; overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.15); display:flex; flex-direction:column; min-height:100%;
}
.card-media{position:relative; aspect-ratio:16/10; background:#0b1427; overflow:hidden}
.card-media img{width:100%; height:100%; object-fit:cover; opacity:.95; transform:scale(1.01); transition:opacity .2s ease}
.card-body{padding:12px 12px 6px}
.card h3{margin:2px 0 6px; font-size:16px}
.card .muted{color:var(--muted); font-size:13px}
.card .tags{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
.tag{font-size:12px; padding:4px 8px; border-radius:999px; background:#0f1b33; border:1px solid #243358}

.card-actions{display:flex; align-items:center; justify-content:space-between; padding:8px 12px 12px; gap:10px}
.card-actions a{font-size:13px; text-decoration:none; color:var(--brand)}
.card-actions button{font-size:13px}

/* Expandable panel with animation */
.expand{
  max-height:0; overflow:hidden; transition:max-height .35s ease; background:#0d162b; border-top:1px solid #1d2746
}
.card.open .expand{max-height:420px}
.expand-inner{padding:12px}
.expand-inner p{margin:.4rem 0 .6rem}
.expand-inner .source-link{font-size:13px}

/* Search bar & Load more */
.searchbar{display:flex; gap:10px; margin:10px 0 16px}
.searchbar input{
  flex:1; padding:12px; border-radius:12px; border:1px solid #233256; background:#0e1730; color:var(--text); outline: none;
}
.loadmore-wrap{display:flex; justify-content:center; margin-top:14px}

/* How it works */
.how-steps{display:grid; grid-template-columns:repeat(auto-fit, minmax(210px,1fr)); gap:14px}
.step{background:var(--card); border:1px solid #1e2b4c; border-radius:16px; padding:16px}
.step-num{width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:#102043; color:var(--brand); font-weight:700; margin-bottom:6px}

/* Footer */
/* .site-footer{padding:24px 20px; border-top:1px solid #1f2a44; background:#0b1220}
.site-footer.simple{border-top:none}
.footer-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:16px; margin-bottom:12px}
.site-footer h4{margin:0 0 6px}
.fineprint{color:var(--muted); text-align:center; font-size:13px} */

/* --- Footer --- */
    .site-footer{
      /* margin-top: auto;
      position:fixed; inset:auto 0 0 0; z-index:19; */
      padding:24px 20px;
      background:linear-gradient(0deg, rgba(10,15,26,0.92), rgba(10,15,26,0.65));
      border-top:1px solid var(--line); backdrop-filter: blur(10px);
    }
    .footer-wrap{ max-width:1200px; margin:0 auto; padding:16px }
    .footer-grid{
      display:grid; grid-template-columns:repeat(5,1fr); gap:16px; align-items:start;
    }
    .footer-col h4{ margin:0 0 8px 0; font-size:14px; color:#e6f3ff; opacity:.9 }
    .footer-col ul{ list-style:none; padding:0; margin:0; display:grid; gap:6px }
    .footer-col a{ color:var(--muted); text-decoration:none; font-size:13px }
    .footer-col a:hover{ color:var(--text) }
    .newsletter input{
      width:100%; padding:10px 12px; border-radius:10px; border:1px solid var(--line);
      background:var(--glass-strong); color:var(--text); margin-bottom:8px;
    }
    .newsletter button{ width:100%; }
    .subfooter{
      margin-top:12px; padding-top:12px; border-top:1px solid var(--line);
      display:flex; gap:10px; align-items:center; justify-content:space-between; color:var(--muted); font-size:12px;
    }
    .social{ display:flex; gap:10px }
    .social a{ display:inline-flex; padding:6px; border:1px solid var(--line); border-radius:10px; background:var(--glass-strong) }
    .back-to-top{ color:var(--muted); text-decoration:none }
    .back-to-top:hover{ color:var(--text) }

    @media (max-width:980px){
      .footer-grid{ grid-template-columns:repeat(2,1fr) }
    }
    @media (max-width:580px){
      .footer-grid{ grid-template-columns:1fr }
      main{ inset:56px 0 200px 0 } /* footer taller on small screens */
    }

/* Skeletons */
.skel{border:1px dashed #223155; background:repeating-linear-gradient( -45deg, #0f1830, #0f1830 12px, #101a34 12px, #101a34 24px ); animation: pulse 1.2s infinite ease-in-out}
@keyframes pulse{ 0%{opacity:.5} 50%{opacity:.85} 100%{opacity:.5} }

/* Small */
@media (max-width: 680px){
  .nav{gap:6px}
  .nav-link{padding:8px 10px}
}

.backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.5);
  opacity:0; pointer-events:none;
  transition:opacity .2s ease; z-index:49;
}
.backdrop.show{ opacity:1; pointer-events:auto }

.drawer{
  position:fixed; top:0; right:0; height:100%;
  width:min(1100px, 92vw);
  background:var(--panel); border-left:1px solid #1f2a44;
  box-shadow:var(--shadow);
  transform:translateX(100%);
  transition:transform .3s ease;
  display:flex; flex-direction:column; z-index:50;
}
.drawer-meta {
  display: inline-flex;           /* sit side by side as inline elements */
  gap: 12px;                       /* space between items */
  align-items: baseline;          /* align them nicely by text baseline */
}

.drawer-meta > .chip,
.drawer-meta > .tags {
  margin: 0;                       /* remove conflicting inline margins */
}

.drawer.open{ transform:translateX(0) }

.drawer-head{ padding:16px; border-bottom:1px solid #1f2a44 }
.drawer .chip{ margin:12px 16px 0; background:#0f1b33; border:1px solid #243358;
  border-radius:999px; padding:6px 10px; display:inline-block; font-size:13px; color:var(--muted) }
.drawer .scroll{ padding:12px 16px 24px; overflow:auto }
.pre{ white-space:pre-wrap; line-height:1.45 }

@media (prefers-reduced-motion: reduce){
  .drawer, .backdrop{ transition:none }
}

/* ---------------------------------------*/

/* Hero image block inside section */
.section-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
}

/* Background image */
.section-hero img {
  width: 100%;
  height: 270px; /* adjust as needed */
  object-fit: cover;
  display: block;
  opacity: 0.25; /* dimmed for text contrast */
  border-radius: inherit;
}

/* Overlay text on top of image */
.section-hero .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.section-hero .overlay p {
  max-width: 800px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text); /* keep consistent with your theme */
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Ensure seamless merge into section background */
.section.us-cpsc {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 70%);
  border-radius: var(--radius);
  border: 1px solid #1f2a44;
}

/* ---------- Contact form (dark theme) ---------- */

.contact-form {
  display: block;
  max-width: 880px;
  
}

/* Labels above fields (keeps placeholders optional, not required) */
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
}

/* Inputs, selects, textareas */
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  appearance: none;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line, #243358);
  border-radius: var(--radius);
  box-shadow: none;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

/* Placeholder should be lower-contrast than body text */
.contact-form ::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
  opacity: 1; /* ensure consistent across browsers */
}

/* Hover affordance */
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover {
  border-color: color-mix(in srgb, var(--line, #243358) 40%, var(--brand) 60%);
}

/* Keyboard-visible focus ring (meets WCAG “focus visible”) */
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible,
.contact-form button:focus-visible {
  border-color: var(--brand);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(196, 73, 64, .25);
}

/* Buttons (if you need a baseline) */
.contact-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 10px 14px;
  font: inherit;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background-color .15s ease;
}
.contact-form .btn:hover { filter: brightness(1.05); }
.contact-form .btn:active { transform: translateY(1px); }
/* .contact-form .btn:disabled { opacity: .6; cursor: not-allowed; } */

/* Helper text and status area */
.contact-form .help,
#formStatus {
  color: var(--muted);
  font-size: 12px;
}

/* Error / success states you can toggle via server or JS */
.contact-form [aria-invalid="true"],
.contact-form .is-error input,
.contact-form .is-error select,
.contact-form .is-error textarea {
  border-color: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 35%, transparent);
}

.contact-form .error-text {
  color: var(--warn);
  font-size: 12px;
  margin-top: 4px;
}

.contact-form .is-valid input,
.contact-form .is-valid select,
.contact-form .is-valid textarea {
  border-color: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent);
}

/* Select caret (consistent look) */
.contact-form select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* Disabled & read-only */
/* .contact-form :disabled,
.contact-form :read-only {
  opacity: .7;
  cursor: not-allowed;
} */

/* Textarea sizing */
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* Grid (matches your existing responsive grid idea) */
.contact-form .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

/* Small screens */
@media (max-width: 640px) {
  .contact-form .grid { grid-template-columns: 1fr; }
  .contact-form label { font-size: 13px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .contact-form * { transition: none !important; }
}

/* EU vs US conditional display */
.drawer[data-source="EU"] .us-only {
  display: none !important;
}
.drawer[data-source="US"] .eu-only { display: none !important; }


/* ========== Drawer gallery ========== */
.gallery{
  display:grid; gap:10px; margin:12px 0;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
}

.thumb{
  position:relative; border-radius:12px; overflow:hidden; border:1px solid var(--line);
  background:var(--panel); cursor:pointer; padding:0; display:block; width:100%;
  aspect-ratio: 4 / 3; /* keep nice tiles */                    /* MDN aspect-ratio */
}
.thumb img{
  width:100%; height:100%; object-fit:cover; object-position:center; /* MDN object-fit */
  display:block; transform:scale(1.01); transition:transform .25s ease, opacity .25s ease;
}
.thumb::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.18) 100%);
  opacity:.6; transition:opacity .25s ease;
}
.thumb:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }
.thumb:hover img{ transform:scale(1.04); }
.thumb:hover::after{ opacity:.35; }

/* Optional: tiny loading shimmer */
.thumb[aria-busy="true"]::before{
  content:""; position:absolute; inset:0; background:
    linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  animation:shimmer 1.2s linear infinite;
}
@keyframes shimmer{ from{ background-position:-200% 0 } to{ background-position:200% 0 } }

/* ========== Lightbox ========== */
.lightbox-app[hidden]{ display:none !important; }
.lightbox-app{
  position:fixed; inset:0; z-index:999;
  background:rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display:grid; place-items:center; padding:16px;
}
.lb-wrap{
  justify-content: center;
  background:var(--panel); border:1px solid var(--line); border-radius:16px;
  width:min(960px, 96vw); box-shadow: var(--shadow);
  display:grid; gap:10px; padding:10px;
}
.lb-close{
  position:absolute; top:10px; right:10px; z-index:2;
}
.lb-figure{ margin:0; position:relative; }
.lb-figure img{
  width:auto; height:auto; max-height:72vh; display:block;
  border-radius:12px; background:var(--card);
}
.lb-caption{
  font-size:13px; color:var(--muted); margin-top:6px; padding:0 6px 2px 6px;
  text-align:center;
}
.lb-nav{
  display:flex; align-items:center; justify-content:center; gap:12px; padding:6px;
}
.lb-prev, .lb-next{
  background:var(--glass-strong, rgba(255,255,255,.06));
  border:1px solid var(--line); border-radius:10px; padding:6px 10px; cursor:pointer;
}
.lb-prev:focus-visible, .lb-next:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }
.lb-count{ color:var(--muted); font-size:12px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .thumb img{ transition:none }
}


/* ========== app showcase ========== */


/* ===== App showcase hero ===== */


.hero-cta{ 
  display: flex;
  justify-content: center;  /* centers horizontally */
  align-items: center;      /* centers vertically if needed */
  gap: 14px;
}
.store-badge img{ display:block }

/* Device visual */
.phone-hero{
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* ===== Re-usable gallery (thumbnails) ===== */
.gallery-app{
  display:grid; gap:10px; margin:12px 0;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.thumb-app{
  position:relative; border-radius:16px; overflow:hidden;
  border:1px solid var(--line); background:var(--panel);
  cursor:pointer; padding:0; display:block; width:100%; aspect-ratio: 9 / 19.5;
}
.thumb-app img{
  width:100%; height:100%; object-fit:cover; object-position:center;
  display:block; transform:scale(1.005);
  transition:transform .25s ease, opacity .25s ease;
}
.thumb-app:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }
.thumb-app:hover img{ transform:scale(1.03); }

/* ===== Lightbox ===== */
.lightbox[hidden]{ display:none !important; }
.lightbox{
  position:fixed; inset:0; z-index:999;
  background:rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display:grid; place-items:center; padding:16px;
}
.lb-wrap-app{
  justify-content: center;
  background:var(--panel); border:1px solid var(--line); border-radius:16px;
  width:min(980px, 96vw); box-shadow: var(--shadow);
  display:grid; gap:10px; padding:10px; position:relative;
}
.lb-close-app{ position:absolute; top:10px; right:10px; }
.lb-figure-app{ margin:0 }
.lb-figure-app img{ 
  width:auto; 
  height:auto; 
  max-height:72vh; 
  border-radius:12px; 
  background:var(--card) }
.lb-caption-app{ font-size:13px; color:var(--muted); margin-top:6px; text-align:center }
.lb-nav-app{ display:flex; align-items:center; justify-content:center; gap:12px; padding:6px }
.lb-prev-app, .lb-next-app{
  background:var(--glass-strong, rgba(255,255,255,.06));
  border:1px solid var(--line); border-radius:10px; padding:6px 10px; cursor:pointer;
}
.lb-prev-app:focus-visible, .lb-next-app:focus-visible{ outline:2px solid var(--brand); outline-offset:2px }

/* Responsive */

/* ------------------ hamberger menu ------------------ */

/* Base nav styling */
.nav-container {
  position: relative;
}
.nav-menu {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Hamburger (hidden by default) */
.nav-hamburger {
  display: none;
  cursor: pointer;
  font-size: 24px;
}

/* Hide checkbox */
.nav-toggle {
  display: none;
}

/* Mobile-specific layout */
@media (max-width: 768px) {
  .nav-hamburger {
    display: block;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--panel);
    flex-direction: column;
    width: 200px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
  .nav-menu li { margin: 0; }

  /* Reveal menu when checkbox is checked */
  .nav-toggle:checked + .nav-hamburger + .nav-menu {
    max-height: 400px; /* enough for all items */
  }
}

