/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: #0a0a0a;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── Grain texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

/* ── Orange glow utils ── */
.glow-orange { box-shadow: 0 0 24px rgba(255,107,26,0.4), 0 0 48px rgba(255,107,26,0.15); }
.glow-orange-sm { box-shadow: 0 0 12px rgba(255,107,26,0.35); }
.text-gradient {
  background: linear-gradient(135deg, #ff6b1a 0%, #ff9544 50%, #ffb870 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Gradient border card ── */
.gradient-border {
  position: relative;
  background: #141414;
  border-radius: 16px;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,107,26,0.5), rgba(255,107,26,0.05) 50%, rgba(255,107,26,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── 3D tilt card ── */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
  cursor: default;
}
.tilt-card:hover {
  box-shadow: 0 20px 60px rgba(255,107,26,0.25), 0 0 30px rgba(255,107,26,0.1);
}
.tilt-card-inner {
  transform: translateZ(20px);
}

/* ── Scroll animations ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Hero animated gradient ── */
.hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,107,26,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 80%, rgba(255,107,26,0.08) 0%, transparent 60%),
              #0a0a0a;
}

/* ── Nav ── */
nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10,10,10,0.85);
  border-bottom: 1px solid rgba(255,107,26,0.08);
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, #ff6b1a, #ff9544);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,26,0.45);
}
.btn-secondary {
  background: transparent;
  color: #ff6b1a;
  border: 1.5px solid #ff6b1a;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover {
  background: rgba(255,107,26,0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,107,26,0.2);
}

/* ── Badge ── */
.badge {
  background: rgba(255,107,26,0.1);
  border: 1px solid rgba(255,107,26,0.25);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 14px;
  color: #ff9544;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ── Section titles ── */
.section-label {
  display: inline-block;
  background: rgba(255,107,26,0.1);
  border: 1px solid rgba(255,107,26,0.3);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff6b1a;
  margin-bottom: 16px;
}

/* ── Tech pill ── */
.tech-pill {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #b3b3b3;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  display: inline-block;
}
.tech-pill:hover {
  border-color: rgba(255,107,26,0.5);
  color: #ff9544;
  background: rgba(255,107,26,0.06);
}

/* ── Case tag ── */
.case-tag {
  background: rgba(255,107,26,0.08);
  border: 1px solid rgba(255,107,26,0.2);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #ff9544;
}

/* ── Process step connector ── */
.step-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 1px;
  background: linear-gradient(90deg, rgba(255,107,26,0.5), rgba(255,107,26,0.05));
}

/* ── FAQ accordion ── */
.faq-item {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  background: #141414;
  transition: border-color 0.2s;
}
.faq-item.open { border-color: rgba(255,107,26,0.4); }
.faq-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 20px 24px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(255,107,26,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff6b1a;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.3s, background 0.3s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: rgba(255,107,26,0.15);
}
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
  color: #b3b3b3;
  font-size: 14px;
  line-height: 1.7;
}
.faq-item.open .faq-body {
  max-height: 200px;
  padding: 0 24px 20px;
}

/* ── Form ── */
.form-input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 14px 16px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: rgba(255,107,26,0.6);
  box-shadow: 0 0 0 3px rgba(255,107,26,0.08);
}
.form-input::placeholder { color: #555; }
select.form-input option { background: #1a1a1a; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ff6b1a; }

/* ── Mobile nav toggle ── */
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; }

/* ── Why-us card hover ── */
.why-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.why-card:hover {
  border-color: rgba(255,107,26,0.4);
  box-shadow: 0 8px 32px rgba(255,107,26,0.12);
  transform: translateY(-4px);
}

/* ── Toast / Success ── */
#toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, #1a1a1a, #222);
  border: 1px solid rgba(255,107,26,0.5);
  border-radius: 12px;
  padding: 16px 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s ease;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(255,107,26,0.15);
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Hero floating particles ── */
.particle {
  position: absolute;
  border-radius: 50%;
  animation: float-ember linear infinite;
  pointer-events: none;
  will-change: transform, opacity;
}
.particle.glow {
  filter: blur(2px);
}
.particle.glow-lg {
  filter: blur(4px);
}
@keyframes float-ember {
  0%   { transform: translateY(105vh) translateX(0px) scale(0.3); opacity: 0; }
  8%   { opacity: 1; }
  30%  { transform: translateY(70vh) translateX(var(--drift)) scale(1); }
  70%  { transform: translateY(30vh) translateX(calc(var(--drift) * -0.5)) scale(0.9); opacity: var(--peak-opacity); }
  92%  { opacity: 0.3; }
  100% { transform: translateY(-120px) translateX(calc(var(--drift) * 0.3)) scale(0.5); opacity: 0; }
}

/* ── Portfolio case badge ── */
.portfolio-case-badge {
  display: inline-block;
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(255,107,26,0.35);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: #b3b3b3;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  letter-spacing: 0.01em;
  line-height: 1.5;
}
.portfolio-case-badge:hover {
  box-shadow: 0 0 18px rgba(255,107,26,0.3), 0 0 4px rgba(255,107,26,0.15);
  border-color: rgba(255,107,26,0.6);
  background: rgba(255,107,26,0.05);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero-headline { font-size: 2.8rem !important; }
  #toast { left: 16px; right: 16px; bottom: 16px; }
}

/* ── Living Fox ── */
#fox-hero-wrap { cursor: pointer; }
#fox-hero-wrap:hover #fox-aura {
  stroke-width: 14 !important;
  opacity: 1 !important;
}
/* Pupil smooth movement */
#fox-pupil-left, #fox-pupil-right {
  transition: transform 0.12s ease-out;
}
/* Eyelid blink */
#fox-lid-left, #fox-lid-right {
  transition: height 0.07s ease-in, y 0.07s ease-in;
}
/* Ear twitch */
@keyframes ear-twitch-left {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-8deg); }
  45%  { transform: rotate(5deg); }
  70%  { transform: rotate(-4deg); }
  100% { transform: rotate(0deg); }
}
@keyframes ear-twitch-right {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(8deg); }
  45%  { transform: rotate(-5deg); }
  70%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}
.ear-twitch-left  { animation: ear-twitch-left  0.5s ease-in-out forwards; }
.ear-twitch-right { animation: ear-twitch-right 0.5s ease-in-out forwards; }

/* Hover burst particles */
.fox-burst {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: #ff6b1a;
  animation: burst-out 0.7s ease-out forwards;
}
@keyframes burst-out {
  0%   { transform: translate(0,0) scale(1); opacity: 0.9; }
  100% { transform: translate(var(--bx), var(--by)) scale(0.2); opacity: 0; }
}

/* ── Language switcher ── */
.lang-switcher { position: relative; }
#lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 12px rgba(255,107,26,0.06);
  z-index: 200;
  min-width: 120px;
}
#lang-menu.hidden { display: none; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #b3b3b3;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: 'Inter', sans-serif;
  text-align: left;
}
.lang-option:hover { color: #fff; background: rgba(255,107,26,0.08); }
.lang-option.active { color: #ff6b1a; }
