/* ═══════════════════════════════════════════════════
   Doticca — Main Stylesheet
   ══════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────────── */
:root {
  --bg:         #080808;
  --bg2:        #111111;
  --card:       rgba(255,255,255,0.032);
  --border:     rgba(255,255,255,0.10);
  --border-h:   rgba(255,255,255,0.35);
  --text:       #f0f0f0;
  --muted:      #8c8c8c;
  --accent:     #ffffff;
  --accent2:    #bbbbbb;
  --accent-dim: rgba(255,255,255,0.08);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; }
html  { scroll-behavior: auto; }
body  { background: var(--bg); color: var(--text); font-family: 'DM Sans', sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
h1, h2, h3, h4, h5 { font-family: 'Bricolage Grotesque', sans-serif; }

/* ── Cursor ──────────────────────────────────────────── */
@media (pointer: fine) {
  * { cursor: none !important; }
  #chat-input, #chat-messages, .chat-msg { cursor: text !important; }
  #chat-toggle, #chat-send, #chat-close { cursor: pointer !important; }
  #cur-ring {
    position: fixed; top: 0; left: 0; width: 38px; height: 38px;
    border: 1.5px solid rgba(255,255,255,0.45); border-radius: 50%;
    pointer-events: none; z-index: 99999; transform: translate(-50%,-50%);
    transition: width .2s, height .2s, border-color .2s; will-change: transform;
  }
  #cur-dot {
    position: fixed; top: 0; left: 0; width: 6px; height: 6px;
    background: #ffffff; border-radius: 50%; pointer-events: none;
    z-index: 99999; transform: translate(-50%,-50%); will-change: transform;
  }
  body.cursor-hover #cur-ring {
    width: 56px; height: 56px;
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.04);
  }
}

/* ── Background layers ───────────────────────────────── */
#aurora-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.dot-grid {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 38px 38px;
}
.noise {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
section, nav, footer { position: relative; z-index: 3; }

/* ── Nav ─────────────────────────────────────────────── */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 18px 0; transition: all .35s; border-bottom: 1px solid transparent; }
#nav.scrolled {
  background: rgba(8,8,8,.88); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--border); padding: 12px 0;
}
.nav-link { font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); position: relative; }
.nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: var(--text); border-radius: 2px; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif; font-weight: 500; border-radius: 10px;
  text-decoration: none; transition: all .22s; white-space: nowrap; position: relative;
}
.btn-p { padding: 12px 26px; font-size: 15px; background: #ffffff; color: #080808; border: 1px solid rgba(255,255,255,.15); will-change: transform; font-weight: 600; }
.btn-p:hover { background: #e8e8e8; box-shadow: 0 0 40px rgba(255,255,255,.18); transform: translateY(-2px); }
.btn-g { padding: 12px 26px; font-size: 15px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.22); }
.btn-g:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.4); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 14px; background: #ffffff; color: #080808; border-radius: 8px; font-weight: 600; }
.btn-sm:hover { background: #e8e8e8; box-shadow: 0 0 18px rgba(255,255,255,.2); }

/* ── Badge ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-family: 'DM Sans', sans-serif; font-weight: 500;
  color: rgba(255,255,255,.55); letter-spacing: .2em; text-transform: uppercase;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,.7); animation: pdot 2.2s ease infinite;
}
@keyframes pdot {
  0%, 100% { box-shadow: 0 0 8px rgba(34,197,94,.7); }
  50%       { box-shadow: 0 0 18px rgba(34,197,94,.9); }
}

/* ── Glass card ──────────────────────────────────────── */
.glass {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  position: relative; overflow: hidden;
  transition: border-color .3s, box-shadow .3s, background .3s; will-change: transform;
}
.glass::before {
  content: ''; position: absolute; inset-x: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  border-radius: 18px 18px 0 0;
}
.glass:hover { border-color: var(--border-h); box-shadow: 0 8px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.08); }
.glass[data-tilt] { transition: none; }

/* ── Divider ─────────────────────────────────────────── */
.div-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }

/* ── Hero ────────────────────────────────────────────── */
#hero { min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding-top: 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; padding: 80px 32px;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding: 60px 20px; } }

/* ── Meteors ─────────────────────────────────────────── */
#meteors { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
@keyframes meteor {
  0%   { transform: rotate(215deg) translateX(0); opacity: 1; }
  70%  { opacity: .8; }
  100% { transform: rotate(215deg) translateX(-700px); opacity: 0; }
}
.meteor-el {
  position: absolute; top: 0; width: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.75));
  transform: rotate(215deg); animation: meteor linear infinite; border-radius: 999px;
}

/* ── Service hero enhancements ───────────────────────── */
.svc-hero[data-svc] { min-height: 64vh; }
@media (max-width: 768px) { .svc-hero[data-svc] { min-height: auto; padding-top: 150px; } }

.svc-meteors { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.svc-spotlight {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(620px circle at var(--mx, 72%) var(--my, 28%), rgba(255,255,255,.07), transparent 62%);
}
.svc-glyph {
  position: absolute; top: 7%; right: 4%; z-index: 1; pointer-events: none;
  width: clamp(180px, 26vw, 340px); color: rgba(255,255,255,.07);
  will-change: transform; transition: transform .25s ease-out;
}
.svc-glyph svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .svc-glyph { width: clamp(140px, 38vw, 220px); color: rgba(255,255,255,.05); top: 5%; } }

/* entrance: hidden until JS reveals (matches site convention) */
.svc-hero[data-svc] .svc-back,
.svc-hero[data-svc] .svc-category,
.svc-hero[data-svc] .svc-page-title,
.svc-hero[data-svc] .svc-tag-lg { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .svc-hero[data-svc] .svc-back,
  .svc-hero[data-svc] .svc-category,
  .svc-hero[data-svc] .svc-page-title,
  .svc-hero[data-svc] .svc-tag-lg { opacity: 1; }
  .svc-meteors { display: none; }
}

/* ── Matrix rain (Why section) ───────────────────────── */
.why-rain-section { position: relative; overflow: hidden; }
#why-rain { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5; }
@media (prefers-reduced-motion: reduce) { #why-rain { display: none; } }
/* opaque card surface so the rain never shows through (same look as elsewhere) */
.why-rain-section .why-card {
  background: linear-gradient(var(--card), var(--card)), var(--bg);
}

/* ── 3D Hero Stack ───────────────────────────────────── */
.hero-3d-wrap { display: flex; align-items: center; justify-content: center; height: 460px; perspective: 1200px; }
@media (max-width: 900px) { .hero-3d-wrap { height: 300px; } }
.cards-scene {
  position: relative; width: 320px; height: 220px;
  transform-style: preserve-3d; animation: sceneFloat 7s ease-in-out infinite;
}
@keyframes sceneFloat {
  0%, 100% { transform: rotateX(6deg) rotateY(-12deg) translateY(0); }
  50%       { transform: rotateX(3deg) rotateY(-8deg) translateY(-22px); }
}
.fc { position: absolute; width: 290px; border-radius: 18px; padding: 22px; transform-style: preserve-3d; transition: transform .3s; }
.fc-front { transform: translateZ(0) translateY(0); background: rgba(22,22,22,.92); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(20px); z-index: 3; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(255,255,255,.04); }
.fc-mid   { transform: translateZ(-55px) translateY(35px) rotateX(6deg); background: rgba(16,16,16,.8); border: 1px solid rgba(255,255,255,.10); backdrop-filter: blur(12px); z-index: 2; opacity: .75; }
.fc-back  { transform: translateZ(-110px) translateY(70px) rotateX(11deg); background: rgba(10,10,10,.65); border: 1px solid rgba(255,255,255,.06); z-index: 1; opacity: .45; }
.fc-label { font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.45); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.fc-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; font-weight: 800; color: #f0f0fe; margin-bottom: 14px; }
.fc-bars  { display: flex; flex-direction: column; gap: 6px; }
.fc-bar-wrap  { display: flex; align-items: center; gap: 8px; }
.fc-bar-label { font-size: 11px; color: rgba(255,255,255,.4); width: 52px; flex-shrink: 0; }
.fc-bar-bg    { flex: 1; height: 5px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.fc-bar-fill  { height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.65), rgba(255,255,255,.35)); animation: barLoad 2s ease forwards; }
@keyframes barLoad { from { width: 0; } to { width: var(--w); } }
.fc-status     { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.fc-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,.8); animation: pdot 2s infinite; }
.fc-status-text { font-size: 12px; color: rgba(255,255,255,.5); }
.fc-icon-wrap { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* ── Bento grid ──────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.b-wide { grid-column: span 2; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr; } .b-wide { grid-column: span 1; } }
.svc-card { padding: 28px 26px; min-height: 200px; }
.svc-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.svc-tag  { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-family: 'DM Sans', sans-serif; }

/* ── Services List ───────────────────────────────────── */
.svc-list { border-top: 1px solid rgba(255,255,255,.08); margin-top: 56px; }

.svc-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 44px;
  text-decoration: none; color: inherit;
  align-items: center;
  gap: 28px;
  padding: 30px 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
  cursor: default;
  overflow: hidden;
  transition: background .35s ease, padding-left .35s cubic-bezier(.23,1,.32,1);
}
.svc-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: #f0f0fe;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s cubic-bezier(.23,1,.32,1);
}
.svc-row:hover { background: rgba(255,255,255,.025); padding-left: 16px; }
.svc-row:hover::before { transform: scaleY(1); }

.svc-row-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: .1em;
  color: rgba(255,255,255,.22);
  transition: color .3s;
  align-self: start;
  padding-top: 6px;
}
.svc-row:hover .svc-row-num { color: rgba(255,255,255,.55); }

.svc-row-main { min-width: 0; }

.svc-row-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 800;
  color: #f0f0fe;
  letter-spacing: -.022em;
  line-height: 1.1;
  margin: 0;
  transition: transform .4s cubic-bezier(.23,1,.32,1);
}
.svc-row:hover .svc-row-title { transform: translateX(4px); }

.svc-row-desc {
  font-size: 14px;
  color: rgba(255,255,255,.42);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height .45s cubic-bezier(.23,1,.32,1), opacity .3s ease .05s, margin-top .35s ease;
}
.svc-row:hover .svc-row-desc { max-height: 80px; opacity: 1; margin-top: 9px; }

.svc-row-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.22);
  white-space: nowrap;
  transition: color .3s;
  justify-self: end;
}
.svc-row:hover .svc-row-tag { color: rgba(255,255,255,.5); }

.svc-row-arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
  transition: border-color .3s, color .3s, transform .4s cubic-bezier(.23,1,.32,1), background .3s;
}
.svc-row:hover .svc-row-arrow {
  border-color: rgba(255,255,255,.45);
  color: #f0f0fe;
  transform: translateX(4px) rotate(-45deg);
  background: rgba(255,255,255,.05);
}

@media (max-width: 640px) {
  .svc-row { grid-template-columns: 40px 1fr 38px; gap: 14px; }
  .svc-row-tag { display: none; }
}

/* ── Tech Marquee ────────────────────────────────────── */
.tech-marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
}
.tech-marquee-track {
  display: flex;
  width: max-content;
  gap: 10px;
  margin-bottom: 10px;
}
.tech-marquee-track:last-child { margin-bottom: 0; }
.go-left  { animation: marquee-left  30s linear infinite; }
.go-right { animation: marquee-right 24s linear infinite; }
@keyframes marquee-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.tech-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 22px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 100px;
  background: rgba(255,255,255,.04);
  white-space: nowrap; flex-shrink: 0;
  transition: border-color .3s, background .3s;
}
.tech-chip:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); }
.tech-chip img { width: 18px; height: 18px; opacity: .65; }
.tech-chip-name {
  font-size: 13px; color: rgba(255,255,255,.58);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; letter-spacing: .02em;
}

/* ── Why section ─────────────────────────────────────── */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 768px) { .why-grid { grid-template-columns: 1fr; } }
.why-card { padding: 32px 26px; text-align: center; }
.why-icon-wrap { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }

/* ── Process ─────────────────────────────────────────── */
.process-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 768px) { .process-layout { grid-template-columns: 1fr; } }
.pstep { display: flex; gap: 18px; margin-bottom: 20px; }
.pstep-dot-wrap { flex-shrink: 0; width: 52px; display: flex; align-items: flex-start; justify-content: center; padding-top: 20px; }
.pstep-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.18);
  transition: background .45s, box-shadow .45s, border-color .45s;
}
.pstep-content { flex: 1; opacity: 0.38; transition: opacity .45s; }
.pstep-content h3 { color: rgba(255,255,255,.5); transition: color .45s; }

.pstep--active .pstep-dot {
  background: #fff; border-color: rgba(255,255,255,.9);
  box-shadow: 0 0 14px rgba(255,255,255,.5), 0 0 4px rgba(255,255,255,.8);
}
.pstep--active .pstep-content { opacity: 1; }
.pstep--active .pstep-content h3 { color: #f0f0fe; }
.pstep--active .glass { border-color: rgba(255,255,255,.22) !important; }

/* ── Mid CTA ──────────────────────────────────────────── */
.cta-glow-card { position: relative; overflow: hidden; }
.cta-glow-card-inner {
  padding: 80px 48px; text-align: center;
  background: transparent; position: relative;
}
.cta-dot-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.18) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 88% 82% at 50% 50%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 50% 50%, black 0%, transparent 78%);
  pointer-events: none; z-index: 0;
}
@media (max-width: 640px) { .cta-glow-card-inner { padding: 48px 24px; } }
.cta-glow-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 70% at 50% 50%, rgba(255,255,255,.038) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.cta-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; z-index: 0; }
.cta-ring  { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); opacity: 0; animation: cta-ring-out 4s ease-out infinite; }
@keyframes cta-ring-out {
  0%   { transform: scale(.08); opacity: .9; }
  40%  { opacity: .45; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Word reveal ─────────────────────────────────────── */
.word-outer { display: inline-block; overflow: hidden; vertical-align: bottom; line-height: 1.15; }
.word-inner { display: inline-block; }

/* ── Contact form ────────────────────────────────────── */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:start; }
@media(max-width:768px){ .contact-grid { grid-template-columns:1fr; gap:40px; } }
.contact-field { display:flex; flex-direction:column; gap:8px; }
.contact-label { font-size:11px; font-weight:600; color:rgba(255,255,255,.45); font-family:'DM Sans',sans-serif; letter-spacing:.09em; text-transform:uppercase; }
.contact-input { background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:10px; padding:13px 16px; font-size:14.5px; color:#f0f0fe; font-family:'DM Sans',sans-serif; transition:border-color .2s, background .2s; outline:none; width:100%; box-sizing:border-box; }
.contact-input:focus { border-color:rgba(255,255,255,.3); background:rgba(255,255,255,.06); }
.contact-input::placeholder { color:rgba(255,255,255,.2); }
textarea.contact-input { resize:vertical; min-height:130px; line-height:1.6; }
select.contact-input { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='rgba(255,255,255,.35)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 16px center; padding-right:40px; cursor:pointer; }
select.contact-input option { background:#141414; color:#f0f0fe; }
@media(max-width:480px){ #contact-form [style*="grid-template-columns:1fr 1fr"] { grid-template-columns:1fr !important; } }

/* ── Stats ───────────────────────────────────────────── */
.stat-sep { width: 1px; height: 40px; background: rgba(255,255,255,.07); align-self: center; }

/* ── Stat Strip ──────────────────────────────────────── */
.stat-strip { padding: 48px 0; overflow: hidden; }
.stat-strip-inner {
  max-width: 1000px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
}
.stat-item {
  flex: 1; min-width: 160px; display: flex; flex-direction: column;
  align-items: center; text-align: center; padding: 16px 24px;
}
.stat-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(48px, 6vw, 80px); font-weight: 900;
  color: #f0f0fe; line-height: 1; letter-spacing: -.04em;
}
.stat-plus { font-size: .6em; vertical-align: super; color: var(--accent2); }
.stat-label {
  font-size: 12px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255,255,255,.35); margin-top: 8px;
}
.stat-divider {
  width: 1px; height: 60px; background: rgba(255,255,255,.08);
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .stat-divider { display: none; }
  .stat-item { min-width: 120px; }
}

/* ── About ───────────────────────────────────────────── */
.about-split {
  display: grid; grid-template-columns: 1fr 1.15fr;
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
}
@media (max-width: 768px) { .about-split { grid-template-columns: 1fr; } }
.about-split-left {
  padding: 48px 44px;
  background: rgba(255,255,255,.025);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: space-between;
}
@media (max-width: 768px) {
  .about-split-left { border-right: none; border-bottom: 1px solid var(--border); padding: 36px 28px; }
}
.about-big-line {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 800; line-height: 1.08; letter-spacing: -.02em; color: var(--text);
}
.about-big-line em { font-style: italic; color: var(--accent2); }
.about-location {
  font-size: 12px; font-weight: 500; letter-spacing: .05em;
  color: rgba(255,255,255,.25); margin-top: 36px; font-family: 'DM Sans', sans-serif;
}
.about-split-right { padding: 48px 44px; position: relative; overflow: hidden; }
@media (max-width: 768px) { .about-split-right { padding: 36px 28px; } }
.about-ghost {
  position: absolute; bottom: -10px; right: -4px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(80px, 11vw, 140px);
  font-weight: 900; letter-spacing: -.04em;
  color: rgba(255,255,255,.035);
  user-select: none; pointer-events: none; line-height: 1;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.about-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; padding: 4px 10px; color: rgba(255,255,255,.45);
  font-family: 'DM Sans', sans-serif;
}

/* ── Footer ──────────────────────────────────────────── */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Fade-up (before GSAP kicks in) ─────────────────── */
.fu-gsap { opacity: 0; }

/* ── Focus ring (accessibility) ─────────────────────── */
*:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 3px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════
   Portfolio Carousel
   ══════════════════════════════════════════════════ */
.portfolio-outer  {
  position: relative; margin: 0 14px;
  background: rgba(255,255,255,.018);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  padding: 6px 0;
  box-shadow: inset 0 2px 12px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.03);
}
.portfolio-fade-l { position: absolute; left: 0; top: 0; bottom: 16px; width: 72px; background: linear-gradient(to right, rgba(14,14,18,.92), transparent); pointer-events: none; z-index: 5; border-radius: 24px 0 0 24px; }
.portfolio-fade-r { position: absolute; right: 0; top: 0; bottom: 16px; width: 72px; background: linear-gradient(to left,  rgba(14,14,18,.92), transparent); pointer-events: none; z-index: 5; border-radius: 0 24px 24px 0; }
.portfolio-track {
  display: flex; gap: 20px; overflow-x: auto; overflow-y: visible;
  scroll-snap-type: none; -webkit-overflow-scrolling: touch;
  padding: 24px 2px 28px; cursor: grab; user-select: none;
}
.portfolio-track.is-dragging { cursor: grabbing; }
.portfolio-track::-webkit-scrollbar { display: none; }
.portfolio-track { scrollbar-width: none; }

/* Project card */
.proj-card {
  flex-shrink: 0; width: 380px; border-radius: 20px; overflow: hidden;
  background: rgba(255,255,255,.032); border: none;
  transition: transform .55s cubic-bezier(.23,1,.32,1), box-shadow .55s, border-color .4s;
  will-change: transform; position: relative;
}
.proj-card::before {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  border-radius: 20px; border: 1px solid rgba(255,255,255,0);
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.0) 40%, rgba(255,255,255,.12) 100%);
  background-size: 200% 200%; opacity: 0; transition: opacity .45s;
}
@keyframes glowBreath {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.22), 0 0 24px rgba(255,255,255,.05); }
  50%       { box-shadow: 0 18px 70px rgba(0,0,0,.68), 0 0 0 1.5px rgba(255,255,255,.58), 0 0 72px rgba(255,255,255,.14); }
}
@keyframes shimmerBorder {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes thumbPan {
  0%   { transform: scale(1.14) translate(0%,    0%   ); }
  18%  { transform: scale(1.14) translate(3.5%,  -1.5%); }
  42%  { transform: scale(1.14) translate(2%,    3.5% ); }
  68%  { transform: scale(1.14) translate(-3.5%, 1.5% ); }
  88%  { transform: scale(1.14) translate(-1.5%, -3%  ); }
  100% { transform: scale(1.14) translate(0%,    0%   ); }
}
.proj-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0); animation: glowBreath 2.8s ease-in-out infinite; }
.proj-card:hover::before { opacity: 1; animation: shimmerBorder 2.8s ease-in-out infinite; border-color: rgba(255,255,255,.35); }
@media (max-width: 480px) { .proj-card { width: 300px; } }

.proj-thumb    { width: 100%; height: 220px; position: relative; overflow: hidden; }
.proj-thumb-bg { position: absolute; inset: 0; transform: scale(1.14); will-change: transform; transition: opacity .3s ease, filter .4s ease; }
.proj-card:hover .proj-thumb-bg { animation: thumbPan 9s ease-in-out infinite; }
.proj-card:has(.proj-hover-reveal):hover .proj-thumb-bg { filter: blur(5px); }
.proj-thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(8,8,8,.85)); }
.proj-thumb-label   { position: absolute; bottom: 14px; left: 18px; right: 18px; font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; font-weight: 800; color: #f0f0fe; line-height: 1.15; }

/* Hover reveal overlay — covers the full card */
.proj-hover-reveal {
  position: absolute; inset: 0; z-index: 5; border-radius: 20px;
  background: linear-gradient(to bottom, rgba(8,8,14,0.55) 0px, rgba(8,8,14,0.55) 165px, rgba(8,8,14,0.97) 215px, rgb(8,8,14) 100%);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  padding: 28px 26px;
  opacity: 0;
  transition: opacity .32s ease;
  pointer-events: none;
}
.proj-card:hover .proj-hover-reveal { opacity: 1; pointer-events: auto; }
.proj-hover-reveal-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.45); margin-bottom: 6px;
  transform: translateY(10px); transition: transform .35s ease .05s;
}
.proj-hover-reveal-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; font-weight: 800;
  color: #f0f0fe; line-height: 1.2; margin-bottom: 14px;
  transform: translateY(10px); transition: transform .35s ease .08s;
}
.proj-hover-reveal-desc {
  font-size: 12.5px; color: rgba(255,255,255,.55); line-height: 1.6; margin-bottom: 14px;
  transform: translateY(10px); opacity: 0; transition: transform .35s ease .10s, opacity .35s ease .10s;
}
.proj-hover-reveal-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #f0f0fe; border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
  padding: 8px 16px; text-decoration: none;
  transform: translateY(10px); transition: transform .35s ease .14s, background .2s, border-color .2s;
}
.proj-hover-reveal-link:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.proj-card:hover .proj-hover-reveal-cat,
.proj-card:hover .proj-hover-reveal-title,
.proj-card:hover .proj-hover-reveal-desc,
.proj-card:hover .proj-hover-reveal-link { transform: translateY(0); }
.proj-card:hover .proj-hover-reveal-desc { opacity: 1; }

.proj-body { padding: 20px 22px 24px; }
.proj-cat  { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-family: 'DM Sans', sans-serif; }
.proj-desc { font-size: 13.5px; color: rgba(255,255,255,.45); line-height: 1.62; margin-bottom: 14px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.proj-tag  { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 5px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.5); }
.proj-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
.proj-link:hover { color: #f0f0fe; }

/* Carousel arrows */
.p-arrow {
  position: absolute; top: calc(110px + 24px); transform: translateY(-50%); z-index: 30;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(12,12,12,.92); border: 1px solid rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s, border-color .2s, opacity .2s;
  backdrop-filter: blur(8px); color: rgba(255,255,255,.75);
}
.p-arrow:hover   { background: rgba(28,28,28,.98); border-color: rgba(255,255,255,.42); color: #fff; }
.p-arrow.disabled { opacity: .2; pointer-events: none; }
.p-arrow-prev { left: 12px; }
.p-arrow-next { right: 12px; }
@media (min-width: 768px) { .p-arrow { display: none; } }

/* Carousel dots */
.p-dots { display: flex; justify-content: center; gap: 7px; margin-top: 24px; }
.p-dot  { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.18); cursor: pointer; transition: background .25s, width .25s, border-radius .25s; border: none; padding: 0; flex-shrink: 0; }
.p-dot.active { background: rgba(255,255,255,.88); width: 22px; border-radius: 3px; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

/* ── Chat Widget ─────────────────────────────────────── */
#chat-widget {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}

#chat-toggle {
  width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.12);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0; position: relative;
}
#chat-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.2);
}
#chat-toggle svg { width: 22px; height: 22px; transition: opacity .2s, transform .2s; }
#chat-toggle .icon-chat  { opacity: 1;  transform: scale(1) rotate(0deg); }
#chat-toggle .icon-close { opacity: 0;  transform: scale(.6) rotate(-45deg); position: absolute; }
#chat-widget.open #chat-toggle .icon-chat  { opacity: 0;  transform: scale(.6) rotate(45deg); }
#chat-widget.open #chat-toggle .icon-close { opacity: 1;  transform: scale(1) rotate(0deg); }

#chat-panel {
  width: 360px;
  background: rgba(10,10,14,.96);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.97);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-height: 520px;
}
#chat-widget.open #chat-panel {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: auto;
}

#chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
#chat-close {
  margin-left: auto; background: none; border: none;
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4);
  transition: background .15s, color .15s;
}
#chat-close:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
#chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,.7) 100%);
  color: #080808; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#chat-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 14px; color: #f0f0fe;
}
#chat-status {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.chat-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,.6);
}

#chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
#chat-messages::-webkit-scrollbar { width: 4px; }
#chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.chat-msg {
  max-width: 82%; padding: 10px 14px;
  font-family: 'DM Sans', sans-serif; font-size: 13.5px; line-height: 1.55;
  border-radius: 14px; word-break: break-word;
  user-select: text; -webkit-user-select: text;
}
.chat-msg.user {
  align-self: flex-end;
  background: #fff; color: #080808;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  align-self: flex-start;
  display: flex; align-items: center; gap: 5px;
  padding: 12px 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; border-bottom-left-radius: 4px;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  animation: chatDot 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-5px); opacity: 1; }
}

#chat-input-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
#chat-input {
  flex: 1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 9px 14px; color: #f0f0fe;
  font-family: 'DM Sans', sans-serif; font-size: 13.5px;
  outline: none; transition: border-color .2s;
}
#chat-input::placeholder { color: rgba(255,255,255,.28); }
#chat-input:focus { border-color: rgba(255,255,255,.28); }
#chat-send {
  width: 36px; height: 36px; border-radius: 9px;
  background: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
#chat-send:hover { background: rgba(255,255,255,.88); transform: scale(1.05); }
#chat-send svg { width: 16px; height: 16px; }
#chat-send:disabled { opacity: .35; cursor: default; transform: none; }

@media (max-width: 420px) {
  #chat-widget { bottom: 16px; right: 16px; left: 16px; align-items: flex-end; }
  #chat-panel  { width: 100%; }
}

/* ── Pre-chat form ───────────────────────────────────── */
#chat-prechat {
  padding: 20px 16px 16px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
}
#chat-prechat-intro {
  font-size: 13.5px; color: rgba(240,240,254,.65);
  line-height: 1.6; margin: 0;
}
.chat-prechat-field { display: flex; flex-direction: column; gap: 6px; }
.chat-prechat-field label {
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: rgba(255,255,255,.45);
  font-family: 'DM Sans', sans-serif;
}
.chat-prechat-field input {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; padding: 10px 13px; font-size: 14px; color: #f0f0fe;
  font-family: 'DM Sans', sans-serif; outline: none; transition: border-color .2s;
}
.chat-prechat-field input:focus { border-color: rgba(255,255,255,.3); }
.chat-prechat-field input::placeholder { color: rgba(255,255,255,.2); }
#chat-prechat-err { font-size: 12px; color: #f87171; min-height: 16px; margin: 0; }
#chat-prechat-start {
  background: #f0f0fe; color: #080808; border: none; border-radius: 8px;
  padding: 11px 18px; font-size: 14px; font-weight: 700;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: opacity .2s; align-self: flex-start; margin-top: 4px;
}
#chat-prechat-start:hover { opacity: .88; }
