/* styles.css */
:root{
  --shell: 980px;

  --ink:#0b1220;
  --muted: rgba(11,18,32,.72);
  --panel: rgba(255,255,255,.72);
  --panel2: rgba(255,255,255,.70);
  --border: rgba(11,18,32,.10);
  --border2: rgba(11,18,32,.08);

  --accent:#4A6CF7;
  --accentDeep:#0a3ed6;

  --themeFade: 190ms;
}

*{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
  scroll-padding-top:84px;
}

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background:#eaf2ff;
  overflow-x:hidden;
  transition: background-color var(--themeFade) ease, color var(--themeFade) ease;
}

.bg,
.topbar,
.btn,
.card,
.contact-inner,
input,
textarea,
.legal-mini,
.code-banner,
.ticklist-float li{
  transition:
    background var(--themeFade) ease,
    background-color var(--themeFade) ease,
    border-color var(--themeFade) ease,
    color var(--themeFade) ease,
    box-shadow var(--themeFade) ease,
    opacity var(--themeFade) ease,
    filter var(--themeFade) ease,
    transform 220ms ease;
}

/* ===== Background (LIGHT) ===== */
.bg{
  position:fixed;
  inset:0;
  z-index:-2;
  background:
    radial-gradient(1100px 700px at 18% 18%, rgba(191,212,255,.95), transparent 60%),
    radial-gradient(1000px 650px at 82% 24%, rgba(199,255,238,.88), transparent 62%),
    radial-gradient(900px 650px at 50% 88%, rgba(230,200,255,.70), transparent 65%),
    linear-gradient(140deg, #eaf2ff, #f2ecff, #e8fff6);
  animation: hue 26s linear infinite;
}

@keyframes hue{
  from{ filter:hue-rotate(0deg) saturate(1.10); }
  to{ filter:hue-rotate(26deg) saturate(1.10); }
}

.bg-noise{
  position:absolute;
  inset:0;
  opacity:.06;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  background-size: 260px 260px;
  pointer-events:none;
}

.bg-blobs{
  position:absolute;
  inset:0;
  background:
    radial-gradient(560px 560px at 12% 10%, rgba(191,212,255,.70), transparent 62%),
    radial-gradient(600px 600px at 90% 18%, rgba(199,255,238,.62), transparent 62%),
    radial-gradient(760px 560px at 45% 95%, rgba(255,226,240,.45), transparent 65%);
  filter: blur(18px);
  pointer-events:none;
}

/* ===== Topbar ===== */
.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:
    radial-gradient(900px 160px at 20% 20%, rgba(191,212,255,.55), transparent 70%),
    radial-gradient(900px 160px at 80% 20%, rgba(199,255,238,.45), transparent 70%),
    rgba(255,255,255,.42);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

/* FULL WIDTH container (so absolute centering works properly) */
.topbar-inner{
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 18px;
  min-height: 58px;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--ink);
  font-weight: 900;
}

.brand-center{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.logo{ width:30px; height:30px; display:grid; place-items:center; }

.brand-name{
  font-size: 15px;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-weight: 800;
}

/* Right area */
.nav{
  display:flex;
  align-items:center;
  gap: 10px;
}

.nav-right{
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 13px;
  text-decoration:none;
  border: 1px solid var(--border);
  cursor:pointer;
  background: rgba(255,255,255,.75);
  color: var(--ink);
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(11,18,32,.14);
}

.btn.primary{
  color:#fff;
  background: linear-gradient(180deg, var(--accent), var(--accentDeep));
  border-color: rgba(255,255,255,.28);
}

.btn.icon-btn{
  width: 42px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
}
.theme-icon{ font-size: 16px; line-height: 1; }

/* Layout */
.shell{
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 18px 60px;
}

.hero{
  padding: 24px 0 10px;
  text-align:center;
}

.hero-blank{
  height: 300px;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

/* ===== Code box (square, centered, 50% opaque) ===== */
.code-banner{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
  position: relative;

  background:
    radial-gradient(900px 260px at 20% 0%, rgba(74,108,247,.14), transparent 60%),
    radial-gradient(900px 260px at 80% 0%, rgba(33,197,155,.12), transparent 60%),
    rgba(10, 14, 28, .92);

  box-shadow: 0 28px 80px rgba(11,18,32,.22);
  backdrop-filter: blur(10px);
}

/* THIS is what stops it stretching full width */
.code-square{
  width: min(520px, 92vw);
  height: 260px;
  margin-top: 18px;
  opacity: 0.50;
}

.code-topbar{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.dot{
  width:10px; height:10px; border-radius:50%;
  display:inline-block;
  opacity:.9;
}
.dot.r{ background:#ff5f57; }
.dot.y{ background:#febc2e; }
.dot.g{ background:#28c840; }

.code-filename{
  margin-left: 8px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,.72);
}

.code{
  margin:0;
  padding: 14px 16px 18px;
  text-align:left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,.84);
  white-space: pre;
  overflow:auto;
  height: calc(100% - 44px);
}

.code-glow{
  position:absolute;
  inset:-35%;
  background:
    radial-gradient(circle at 30% 30%, rgba(74,108,247,.18), transparent 60%),
    radial-gradient(circle at 70% 40%, rgba(33,197,155,.14), transparent 60%);
  filter: blur(28px);
  pointer-events:none;
}

/* Code colours */
.kw{ color: #8bd5ff; font-weight: 700; }
.fn{ color: #b4ffd8; font-weight: 700; }
.tp{ color: #d6c7ff; font-weight: 700; }
.st{ color: #ffd27b; }
.cmt{ color: rgba(255,255,255,.55); font-style: italic; }

/* Cards */
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:26px;
}

.cards-secondary{
  margin-top: 0;
}

.card{
  background: rgba(255,255,255,.92);
  padding:18px;
  border-radius:10px;
  box-shadow:0 18px 40px rgba(11,18,32,.12);
  border: 1px solid rgba(11,18,32,.06);
}

.card-icon{
  width: 56px;
  height: 42px;
  margin: 0 auto 10px;
  display:grid;
  place-items:center;
  font-size: 20px;
}

.card-title{
  font-size:13px;
  margin:6px 0;
  letter-spacing: -.2px;
}

.center-card-title{ text-align:center; }

.card p{
  font-size:12px;
  line-height: 1.45;
  color: rgba(11,18,32,.70);
  margin: 0;
}

/* Gaps */
.big-gap{ height: 54px; }
.gap-after-services{ height: 54px; }
.gap-after-secondary{ height: 56px; }

.section{ margin-top: 18px; }

/* ===== Services floating ===== */
.services-inner{
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.center-title{
  margin: 0 0 6px;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -.2px;
  color: var(--ink);
}

.center-muted{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Floating list */
.ticklist-float{
  margin: 14px auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  text-align: left;
  width: min(760px, 100%);
}

.ticklist-float li{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(11,18,32,.06);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

/* Strong hover (you WILL see it) */
.ticklist-float li:hover{
  transform: translateY(-6px) scale(1.02);
  background: rgba(255,255,255,.74);
  border-color: rgba(74,108,247,.55);
  box-shadow:
    0 30px 90px rgba(11,18,32,.26),
    0 0 0 6px rgba(74,108,247,.14);
}

.ticklist-float li::before{
  content: "✓";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
  color: #0b3d22;
  background: rgba(34, 220, 128, .22);
  border: 1px solid rgba(34, 220, 128, .55);
  margin-top: 1px;
}

/* Contact */
.contact{ margin-top: 18px; }

.contact-inner{
  background: var(--panel2);
  padding:18px;
  border-radius:12px;
  border: 1px solid var(--border2);
  backdrop-filter: blur(10px);
}

.contact-inner h2{
  margin: 0;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -.2px;
}

.contact-inner p{
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.form .row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.field{
  display:grid;
  gap:6px;
  text-align:left;
}

.field span{
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

input, textarea{
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(11,18,32,.14);
  background: rgba(255,255,255,.90);
  color: var(--ink);
  outline:none;
}

textarea{ min-height: 110px; resize: vertical; }

input:focus, textarea:focus{
  border-color: rgba(74,108,247,.55);
  box-shadow: 0 0 0 4px rgba(74,108,247,.18);
}

.form-actions{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top: 12px;
}

.form-note{
  font-size: 12px;
  font-weight: 800;
  color: rgba(11,18,32,.72);
}
.form-note.sending{ color: rgba(10,62,214,.80); }
.form-note.ok{ color: rgba(11,18,32,.84); }

.hp{
  position:absolute !important;
  left:-10000px !important;
  top:auto !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}

/* Legal card */
.legal-mini{
  max-width: 640px;
  margin: 18px auto 0;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(255,255,255,.56);
  backdrop-filter: blur(10px);
  text-align: center;

  font-size: 11px;
  line-height: 1.7;
  color: rgba(11,18,32,.74);

  box-shadow: 0 12px 30px rgba(11,18,32,.10);
}

/* Responsive */
@media (max-width:860px){
  .cards{ grid-template-columns:1fr; }
  .form .row{ grid-template-columns:1fr; }
  .form-actions{ flex-direction: column; align-items:flex-start; }
  .code-square{ height: 250px; }
}

/* ===== DARK MODE ===== */
.theme-dark{
  --ink: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --panel: rgba(12,18,34,.62);
  --panel2: rgba(12,18,34,.62);
  --border: rgba(255,255,255,.12);
  --border2: rgba(255,255,255,.10);
}

.theme-dark .bg{
  background:
    radial-gradient(900px 600px at 20% 20%, rgba(56, 22, 140, .24), transparent 62%),
    radial-gradient(900px 600px at 80% 30%, rgba(10, 120, 210, .18), transparent 64%),
    radial-gradient(900px 600px at 50% 90%, rgba(0, 210, 170, .10), transparent 68%),
    linear-gradient(160deg, #050816, #071026, #071a35);
  animation: hueNight 34s linear infinite;
}
@keyframes hueNight{
  from{ filter:hue-rotate(0deg) saturate(1.14); }
  to{ filter:hue-rotate(36deg) saturate(1.14); }
}

.theme-dark .topbar{
  background:
    radial-gradient(900px 160px at 20% 20%, rgba(56, 22, 140, .18), transparent 70%),
    radial-gradient(900px 160px at 80% 20%, rgba(10, 120, 210, .12), transparent 70%),
    rgba(10,14,28,.52);
  border-bottom-color: rgba(255,255,255,.10);
}

.theme-dark .btn{
  background: rgba(16,22,40,.55);
  color: var(--ink);
  border-color: rgba(255,255,255,.12);
}

.theme-dark .card{
  background: rgba(12,18,34,.62);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.theme-dark .card p{ color: rgba(255,255,255,.72); }

.theme-dark input,
.theme-dark textarea{
  background: rgba(16,22,40,.55);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
}
.theme-dark input:focus,
.theme-dark textarea:focus{
  box-shadow: 0 0 0 4px rgba(74,108,247,.22);
}

.theme-dark .form-note,
.theme-dark .form-note.ok,
.theme-dark .form-note.sending{
  color: rgba(255,255,255,.92) !important;
}

.theme-dark .legal-mini{
  border-color: rgba(255,255,255,.12);
  background: rgba(12,18,34,.56);
  color: rgba(255,255,255,.70);
}

.theme-dark .ticklist-float li{
  background: rgba(12,18,34,.26);
  border-color: rgba(255,255,255,.10);
}
.theme-dark .ticklist-float li:hover{
  background: rgba(12,18,34,.60);
  border-color: rgba(74,108,247,.34);
  box-shadow:
    0 34px 95px rgba(0,0,0,.55),
    0 0 0 6px rgba(74,108,247,.14);
}

.theme-dark .ticklist-float li::before{
  color: rgba(255,255,255,.92);
  background: rgba(34, 220, 128, .18);
  border-color: rgba(34, 220, 128, .38);
}