/* =============================================
   MAIN — Page-level section styles
   ============================================= */

/* =============================================
   HERO
   ============================================= */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--space-32) + 80px);
  padding-bottom: var(--space-24);
  overflow: hidden;
}

.hero-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 900px;
}

/* Ambient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-orb--violet {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
  top: -200px;
  left: -200px;
}

.hero-orb--blue {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
}

/* Eyebrow */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.hero-eyebrow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.hero-eyebrow-availability {
  color: #4ade80;
}

/* Headline */
.hero-headline {
  position: relative;
  z-index: 1;
}

/* Sub copy */
.hero-sub {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: rgba(248,250,252,0.95);
  line-height: 1.7;
  max-width: 580px;
  text-shadow: 0 0 18px rgba(255,255,255,0.45), 0 0 40px rgba(255,255,255,0.12);
  min-height: 3.4em;
}

/* Blinking cursor for subtitle typewriter */
.hero-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: rgba(248,250,252,0.85);
  vertical-align: text-bottom;
  margin-left: 2px;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(255,255,255,0.7);
  animation: hero-cursor-blink 750ms ease-in-out infinite;
}

.hero-cursor--done {
  animation: none;
  opacity: 0;
  transition: opacity 600ms ease 0.8s;
}

@keyframes hero-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Prevent layout jump while cycle word backspaces */
#hero-cycle-word {
  display: inline-block;
  min-width: 0.05em;
}

.br-desktop {
  display: inline;
}

#featured-work {
  scroll-margin-top: 90px;
}

@media (max-width: 768px) {
  #featured-work {
    scroll-margin-top: 80px;
  }
}

/* CTAs */
.hero-ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-btn-primary {
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-6);
}

/* Stats */
.hero-stats {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  gap: var(--space-1);
  min-width: 88px;
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity var(--duration-base) var(--ease-smooth);
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.7), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* =============================================
   SECTION HEADERS
   ============================================= */

.section-header {
  margin-bottom: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.section-title {
  margin-top: var(--space-1);
}

.section-sub {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
}

/* =============================================
   SERVICES GRID
   ============================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.service-card {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.service-number {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.service-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =============================================
   CONTACT FORM
   ============================================= */

/* Honeypot — visually hidden but not display:none so bots still see it */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-10);
  border-radius: var(--radius-xl);
}

.form-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.form-title {
  margin-top: var(--space-1);
}

.form-subtext {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
  outline: none;
  transition:
    border-color var(--duration-base) var(--ease-smooth),
    background var(--duration-base) var(--ease-smooth),
    box-shadow var(--duration-base) var(--ease-smooth);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.form-input:focus {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.04);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.form-input.invalid {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
}

.form-consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.form-consent-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: #8b5cf6;
  cursor: pointer;
}

.form-consent-group.invalid .form-consent-label {
  color: #f87171;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.form-submit {
  position: relative;
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-8);
  min-width: 160px;
  justify-content: center;
  overflow: hidden;
}

.form-submit.loading .form-submit-text,
.form-submit.loading .form-submit-icon {
  opacity: 0;
}

.form-submit.loading .form-spinner {
  display: block;
}

.form-submit-icon {
  transition: opacity var(--duration-fast);
}

.form-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

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

.form-privacy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Success / error banners — [hidden] must win over display:flex */
.form-success[hidden],
.form-error[hidden] {
  display: none;
}

.form-success,
.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #4ade80;
}

.form-error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #f87171;
}

/* =============================================
   CUSTOM SELECT DROPDOWN
   ============================================= */

.custom-select {
  position: relative;
  user-select: none;
  outline: none;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition:
    border-color var(--duration-base) var(--ease-smooth),
    background var(--duration-base) var(--ease-smooth),
    box-shadow var(--duration-base) var(--ease-smooth);
}

.custom-select:hover .custom-select-trigger,
.custom-select:focus .custom-select-trigger {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.custom-select.open .custom-select-trigger {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.04);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.custom-select.invalid .custom-select-trigger {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.custom-select-value {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-smooth);
  flex: 1;
}

.custom-select.has-value .custom-select-value {
  color: var(--text-primary);
}

.custom-select-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-spring);
}

.custom-select.open .custom-select-chevron {
  transform: rotate(180deg);
  color: var(--accent-violet);
}

/* Dropdown list */
.custom-select-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(10, 10, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity var(--duration-base) var(--ease-smooth),
    transform var(--duration-base) var(--ease-smooth);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(139, 92, 246, 0.08) inset;
}

.custom-select.open .custom-select-list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.custom-select-option {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  transition:
    color var(--duration-fast) var(--ease-smooth),
    background var(--duration-fast) var(--ease-smooth),
    padding-left var(--duration-base) var(--ease-smooth);
}

.custom-select-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent-gradient);
  transition: width var(--duration-base) var(--ease-smooth);
  border-radius: 0 2px 2px 0;
}

.custom-select-option:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.08);
  padding-left: calc(var(--space-4) + 6px);
}

.custom-select-option:hover::before {
  width: 3px;
}

.custom-select-option[aria-selected="true"] {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  padding-left: calc(var(--space-4) + 6px);
}

.custom-select-option[aria-selected="true"]::before {
  width: 3px;
}

.custom-select-option + .custom-select-option {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* =============================================
   FULL PAGE THANK YOU OVERLAY
   ============================================= */

.ty-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease-smooth);
}

.ty-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.ty-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(139, 92, 246, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 60%),
    rgba(7, 7, 15, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ty-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  padding: var(--space-10);
  max-width: 480px;
}

/* Animated check icon */
.ty-icon-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ty-icon-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  animation: ty-pulse 2s ease-in-out infinite;
}

@keyframes ty-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.15); opacity: 1; }
}

.ty-check {
  width: 80px;
  height: 80px;
}

/* Circle draw animation */
.ty-check-circle {
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
}

.ty-overlay.active .ty-check-circle {
  animation: ty-draw-circle 700ms var(--ease-out) 100ms forwards;
}

@keyframes ty-draw-circle {
  to { stroke-dashoffset: 0; }
}

/* Tick draw animation */
.ty-check-tick {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.ty-overlay.active .ty-check-tick {
  animation: ty-draw-tick 400ms var(--ease-out) 700ms forwards;
}

@keyframes ty-draw-tick {
  to { stroke-dashoffset: 0; }
}

/* Text */
.ty-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(16px);
}

.ty-overlay.active .ty-title {
  animation: ty-fade-up 500ms var(--ease-out) 900ms forwards;
}

.ty-sub {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(16px);
}

.ty-overlay.active .ty-sub {
  animation: ty-fade-up 500ms var(--ease-out) 1050ms forwards;
}

.ty-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  opacity: 0;
}

.ty-overlay.active .ty-hint {
  animation: ty-fade-up 400ms var(--ease-out) 1400ms forwards;
}

@keyframes ty-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Progress bar */
.ty-progress-wrap {
  width: 220px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  opacity: 0;
}

.ty-overlay.active .ty-progress-wrap {
  animation: ty-fade-up 400ms var(--ease-out) 1200ms forwards;
}

.ty-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-pill);
  transition: width linear;
}

/* =============================================
   FLOATING WHATSAPP BUTTON
   ============================================= */

.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  overflow: hidden;
  transition:
    box-shadow var(--duration-base) var(--ease-smooth),
    transform var(--duration-base) var(--ease-spring),
    padding var(--duration-base) var(--ease-smooth);
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.whatsapp-float-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition:
    max-width var(--duration-slow) var(--ease-smooth),
    opacity var(--duration-base) var(--ease-smooth);
}

.whatsapp-float:hover {
  box-shadow: 0 12px 48px rgba(37, 211, 102, 0.6);
  transform: translateY(-3px);
}

.whatsapp-float:hover .whatsapp-float-label {
  max-width: 120px;
  opacity: 1;
}

.whatsapp-float:active {
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: var(--space-4);
    right: var(--space-4);
    padding: var(--space-3);
    border-radius: 50%;
  }

  .whatsapp-float-label {
    display: none;
  }
}

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

@media (max-width: 640px) {
  .form-wrap {
    padding: var(--space-6) var(--space-5);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 768px) {
  .hero {
    padding-top: calc(var(--space-24) + 80px);
    min-height: 90svh;
  }

  .hero-sub .br-desktop {
    display: none;
  }

  .hero-stats {
    gap: var(--space-2);
  }
}

@media (max-width: 768px) {
  .hero-ctas .btn {
    flex: 0 1 auto;
  }
}

@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-ctas .btn {
    width: auto;
    max-width: 220px;
  }

  .stat-pill {
    min-width: 72px;
    padding: var(--space-2) var(--space-3);
  }
}
