/* ================================================
   DUŠAN DUŠANOVIĆ — PORTFOLIO CSS
   ================================================ */

/* --- RESET & VARIABLES --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #16161f;
  --surface: #1c1c27;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8e8f0;
  --text-muted: #7a7a96;
  --accent: #6c63ff;
  --accent-2: #ff6584;
  --accent-muted: rgba(108, 99, 255, 0.15);
  --white: #ffffff;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);

  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--white);
}

/* --- CUSTOM CURSOR --- */
.cursor,
.cursor-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

.cursor {
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.cursor-follower {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--accent);
  transition: transform 0.12s, opacity 0.3s, width 0.3s, height 0.3s, background 0.3s;
  background: transparent;
}

.cursor-follower.hovered {
  width: 48px;
  height: 48px;
  background: var(--accent-muted);
}

@media (hover: none) {

  .cursor,
  .cursor-follower {
    display: none;
  }

  body {
    cursor: auto;
  }
}

/* --- LOADER --- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), 
              visibility 0.8s, 
              filter 0.8s;
  overflow: hidden;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  filter: blur(20px);
}

.loader-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.loader-orb {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: loaderOrbPulse 3s ease-in-out infinite;
}

@keyframes loaderOrbPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.loader-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.loader-name-wrap {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  overflow: hidden;
}

.loader-char {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  animation: loaderCharReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
  opacity: 0;
  transform: translateY(100%);
}

.loader-char:nth-child(2) {
  animation-delay: 0.1s;
  color: var(--accent);
}

@keyframes loaderCharReveal {
  to { transform: translateY(0); opacity: 1; }
}

.loader-bar {
  width: 240px;
  height: 3px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 1rem;
  position: relative;
}

.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 15px var(--accent);
}

.loader-percentage {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* --- LAYOUT --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--white);
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.paypal-btn {
  border-color: #009cde;
  color: #009cde;
}

.paypal-btn:hover {
  border-color: #009cde;
  color: #fff;
  background: #009cde;
}

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  z-index: 900;
  transition: background 0.4s, box-shadow 0.4s;
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-active {
  color: var(--accent);
}

.lang-sep {
  opacity: 0.4;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 1px;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- MOBILE NAV --- */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 800;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s;
}

.mobile-nav-link:hover {
  color: var(--accent);
}

.mobile-nav-footer {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mobile-nav-footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.mobile-nav-footer a:hover {
  color: var(--accent);
}

/* --- HERO --- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 4vw, 2.5rem) 6rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(108, 99, 255, 0.12);
  top: -100px;
  right: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(255, 101, 132, 0.08);
  bottom: -80px;
  left: -80px;
  animation-delay: -4s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(20px, -20px) scale(1.05);
  }
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.hero-line-italic {
  font-style: italic;
  color: var(--text-muted);
}

.hero-desc {
  font-size: 1.1rem;
  max-width: 490px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

.hero-stats {
  position: absolute;
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: 2.5rem;
  display: flex;
  gap: 2.5rem;
}

.stat {
  text-align: right;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- REVEAL ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- ABOUT --- */
.about {
  background: var(--bg-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-img {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  min-width: 200px;
}

.badge-icon {
  font-size: 1.5rem;
}

.about-badge strong {
  display: block;
  font-size: 0.875rem;
  font-family: var(--font-display);
  color: var(--white);
}

.about-badge small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-text p {
  font-size: 1rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-2);
  padding: 2rem;
  position: relative;
  transition: background 0.3s;
}

.service-card:hover {
  background: var(--surface);
}

.service-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 2px;
  background: var(--accent);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-line {
  right: 0;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.875rem;
}

/* --- PORTFOLIO --- */
.portfolio {
  background: var(--bg-2);
}

.portfolio-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.portfolio-card.hidden {
  display: none;
}

.portfolio-img-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.portfolio-img {
  width: 100%;
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-img img {
  transform: scale(1.08);
}

.portfolio-img.img-placeholder {
  border-radius: 0;
}

.img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108, 99, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  letter-spacing: 0.05em;
}

.portfolio-card:hover .img-overlay {
  opacity: 1;
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-info h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.portfolio-info p {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.portfolio-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.portfolio-tags span {
  font-size: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: 100px;
}

/* --- IMAGE PLACEHOLDERS --- */
.img-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-muted) 0%, transparent 60%);
}

.img-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.img-inner svg {
  width: 80px;
  height: 80px;
  opacity: 0.5;
}

.img-inner span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.img-label {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 1;
}

/* --- WORKFLOW --- */
.workflow {
  background: var(--bg);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.workflow-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.workflow-item:hover {
  transform: translateY(-10px);
  border-color: var(--accent-muted);
}

.workflow-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.2;
  transition: opacity 0.3s;
}

.workflow-item:hover .workflow-num {
  opacity: 1;
}

.workflow-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.workflow-item p {
  font-size: 0.95rem;
}

/* --- CONTACT --- */
.contact {
  background: var(--bg-2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.contact-list small {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

.contact-list a {
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--accent-2);
}

.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loader {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-feedback {
  font-size: 0.85rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--radius);
}

.form-feedback.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.form-feedback.error {
  color: var(--accent-2);
  background: rgba(255, 101, 132, 0.1);
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-socials a:hover {
  color: var(--accent);
}

/* --- BACK TO TOP --- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 800;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.5);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image-wrap {
    max-width: 360px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .header-actions .btn {
    display: none;
  }

  .burger {
    display: flex;
  }

  .testimonials-inner {
    flex-direction: column;
  }

  .testimonial-card {
    min-width: unset;
    max-width: 100%;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.6rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-badge {
    display: none;
  }

  .contact-form-wrap {
    padding: 1.5rem;
  }
}