/* ============================================================
   APP CASTLE – Gold & Midnight Blue Theme
   ============================================================ */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --bg-deep:       #060C1B;
  --bg-primary:    #0A1229;
  --bg-surface:    #101B38;
  --bg-card:       rgba(16, 27, 56, 0.6);

  --accent-deep:   #B8860B;
  --accent-gold:   #D4A853;
  --accent-bright: #F0C75E;
  --accent-light:  #FFD97D;

  --gradient:      linear-gradient(135deg, #B8860B, #D4A853, #F0C75E);
  --gradient-text: linear-gradient(135deg, #D4A853, #FFD97D);

  --glass-bg:      rgba(255, 255, 255, 0.02);
  --glass-border:  rgba(255, 255, 255, 0.06);
  --glass-hover:   rgba(255, 255, 255, 0.05);

  --text-primary:  #E6DFD1;
  --text-secondary:#8994A8;
  --text-muted:    #5B6680;

  --font-heading:  'Cinzel', serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;

  --nav-height:    72px;
  --container:     1140px;
  --radius:        12px;
  --radius-lg:     20px;
  --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- UTILITY ---------- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 100px;
  background: rgba(212, 168, 83, 0.08);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(6, 12, 27, 0.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav--scrolled {
  background: rgba(6, 12, 27, 0.88);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  transition: opacity var(--transition);
}

.nav__logo:hover {
  opacity: 0.85;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
  background: var(--glass-hover);
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 0 60px;
  overflow: hidden;
}

/* Animated grid background */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__grid {
  position: absolute;
  inset: -50%;
  background-image:
    linear-gradient(rgba(212, 168, 83, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 168, 83, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.hero__glow--1 {
  width: 500px;
  height: 500px;
  background: var(--accent-deep);
  top: -10%;
  right: -5%;
  opacity: 0.2;
  animation: glowPulse 8s ease-in-out infinite;
}

.hero__glow--2 {
  width: 400px;
  height: 400px;
  background: #1a3a6a;
  bottom: -5%;
  left: -5%;
  opacity: 0.25;
  animation: glowPulse 10s ease-in-out infinite reverse;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%      { opacity: 0.3;  transform: scale(1.1); }
}

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

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 100px;
  background: rgba(212, 168, 83, 0.08);
  margin-bottom: 28px;
}

.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient);
  color: #0A1229;
  box-shadow: 0 4px 20px rgba(184, 134, 11, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 30px rgba(212, 168, 83, 0.4);
  transform: translateY(-2px);
}

.btn--ghost {
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  background: var(--glass-bg);
}

.btn--ghost:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn--lg {
  padding: 18px 36px;
  font-size: 1.05rem;
  border-radius: 12px;
}

/* Castle illustration */
.hero__visual {
  max-width: 520px;
  margin: 0 auto;
}

.hero__castle-wrap {
  animation: castleFloat 6s ease-in-out infinite;
}

@keyframes castleFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.hero__castle-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(184, 134, 11, 0.12));
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

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

@keyframes scrollLine {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50%  { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding: 120px 0;
  position: relative;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Service Card */
.service-card {
  position: relative;
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 168, 83, 0.2);
  box-shadow: 0 12px 40px rgba(184, 134, 11, 0.08);
}

.service-card__glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(212, 168, 83, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.service-card:hover .service-card__glow {
  opacity: 1;
}

.service-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.12);
  color: var(--accent-bright);
  margin-bottom: 24px;
  transition: background var(--transition), transform var(--transition);
}

.service-card:hover .service-card__icon {
  background: rgba(212, 168, 83, 0.14);
  transform: scale(1.05);
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-card__text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   WHY US
   ============================================================ */
.why-us {
  padding: 120px 0;
  background: var(--bg-primary);
  position: relative;
}

.why-us::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.why-us__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.why-us__item {
  text-align: center;
}

.why-us__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.06);
  border: 1px solid rgba(212, 168, 83, 0.12);
  color: var(--accent-bright);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.why-us__item:hover .why-us__icon {
  background: rgba(212, 168, 83, 0.12);
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(212, 168, 83, 0.1);
}

.why-us__item h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.why-us__item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 300px;
  margin: 0 auto;
}

/* ============================================================
   PROCESS / TIMELINE
   ============================================================ */
.process {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.process::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.timeline {
  position: relative;
  padding-top: 32px;
}

.timeline__track {
  position: absolute;
  top: 56px;
  left: 5%;
  right: 5%;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.timeline__progress {
  position: absolute;
  top: 56px;
  left: 5%;
  height: 2px;
  width: 0;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline__progress.animated {
  width: 90%;
}

.timeline__steps {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.timeline__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.timeline__node {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid rgba(212, 168, 83, 0.25);
  color: var(--accent-bright);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.timeline__step:hover .timeline__node {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(212, 168, 83, 0.2);
  background: rgba(212, 168, 83, 0.08);
}

.timeline__node--final {
  border-color: var(--accent-gold);
  background: rgba(212, 168, 83, 0.1);
  box-shadow: 0 0 24px rgba(212, 168, 83, 0.15);
}

.timeline__number {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.timeline__label h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline__label p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 180px;
  margin: 0 auto;
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  padding: 100px 0;
  background: var(--bg-primary);
  position: relative;
}

.stats::before,
.stats::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.stats::before { top: 0; }
.stats::after  { bottom: 0; }

.stats__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stats__item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats__item > div:first-child {
  display: flex;
  align-items: baseline;
}

.stats__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stats__suffix {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

.stats__label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

.stats__divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--glass-border), transparent);
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  padding: 120px 0;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.cta__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--accent-deep);
  filter: blur(180px);
  opacity: 0.1;
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
}

.cta__text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.cta__email {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cta__email strong {
  color: var(--accent-bright);
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 60px 0 32px;
  background: var(--bg-deep);
  border-top: 1px solid var(--glass-border);
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer__tagline {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 280px;
}

.footer__address {
  margin-top: 16px;
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer__bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

/* Tablet */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-us__grid {
    gap: 32px;
  }

  .timeline__steps {
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
  }

  .timeline__track,
  .timeline__progress {
    display: none;
  }

  .timeline__step {
    flex: 0 1 170px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px 24px 24px;
    background: rgba(6, 12, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.4s var(--transition), opacity 0.4s var(--transition);
    gap: 4px;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav__link {
    padding: 12px 16px;
    width: 100%;
    border-radius: 10px;
  }



  .services {
    padding: 80px 0;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .why-us {
    padding: 80px 0;
  }

  .why-us__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .process {
    padding: 80px 0;
  }

  .timeline__steps {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .timeline__step {
    flex: none;
    width: 100%;
    max-width: 300px;
  }

  .stats {
    padding: 64px 0;
  }

  .stats__grid {
    flex-direction: column;
    gap: 32px;
  }

  .stats__divider {
    width: 60px;
    height: 1px;
  }

  .cta {
    padding: 80px 0;
  }

  .hero__title {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  .hero__actions {
    flex-direction: column;
    gap: 12px;
  }

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

  .hero__visual {
    max-width: 340px;
  }

  .footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__tagline {
    margin: 12px auto 0;
  }

  .footer__links {
    justify-content: center;
  }

  .section-header {
    margin-bottom: 48px;
  }

}

/* Small mobile */
@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }

  .hero__badge {
    font-size: 0.72rem;
    padding: 6px 14px;
  }

  .service-card {
    padding: 28px 20px;
  }

}
