/* Home and contact: restrained motion, with readable defaults if JS is absent. */
:is(.home-page, .contact-page) {
  --surface-wash: rgba(37, 99, 235, 0.055);
  --surface-ring: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] :is(.home-page, .contact-page) {
  --surface-wash: rgba(34, 211, 238, 0.06);
  --surface-ring: rgba(34, 211, 238, 0.22);
}

:is(.home-page, .contact-page) [data-enter].entry-ready {
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

[data-enter].entry-ready:not(.is-entered) {
  opacity: 0;
  transform: translateY(18px);
}

[data-enter].entry-ready.is-entered {
  transition-delay: var(--enter-delay, 0ms), var(--enter-delay, 0ms), 0ms, 0ms, 0ms;
}

/* Keyboard navigation must never land in an invisible element. */
[data-enter].entry-ready:focus-within {
  opacity: 1;
  transform: none;
  transition: none;
}

.home-page #top {
  padding-top: calc(var(--header-height) + clamp(1.5rem, 4vh, 3rem));
}

.home-page .status-badge {
  max-width: 100%;
  padding: 8px 14px;
  line-height: 1.55;
  text-wrap: balance;
}

.home-page .status-dot {
  flex: 0 0 8px;
}

/* A cool blue surface integrates into the light background without a white glare. */
[data-theme="light"] .home-page .status-badge {
  background: #e7effb;
  border-color: #b8cbee;
  color: #1e3a5f;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

[data-theme="light"] .home-page .status-dot {
  background: #0f766e;
  animation: none;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.home-page .hero-img-blob {
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.home-page .hero-img-blob picture {
  width: 100%;
  height: 100%;
}

.home-page .hero-visual::before {
  content: '';
  position: absolute;
  width: min(95%, 440px);
  aspect-ratio: 1;
  border: 1px solid var(--surface-ring);
  border-radius: 44% 56% 58% 42% / 52% 44% 56% 48%;
  transform: rotate(-12deg) scale(1.03);
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1), border-color 300ms ease;
  pointer-events: none;
}

.home-page .hero-btns .btn,
.contact-page .contact-form-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.action-arrow {
  flex-shrink: 0;
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

:is(.home-page, .contact-page) .btn:focus-visible .action-arrow {
  transform: translateX(3px);
}

.home-page .credibility-item svg {
  transition: color 250ms ease, transform 250ms ease;
}

/* Contact details and form share the same subtle blue/cyan accents. */
.contact-page .section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  margin: 1.25rem auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.contact-page .contact-wrapper {
  max-width: 960px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.contact-page .contact-item {
  align-items: center;
  padding: 0.75rem;
  margin: -0.75rem;
  border: 1px solid transparent;
  border-radius: 0.875rem;
  transition: background-color 250ms ease, border-color 250ms ease;
}

.contact-page .contact-item > :last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-page .contact-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  color: var(--primary);
  background: var(--surface-wash);
  border: 1px solid var(--surface-ring);
  border-radius: 12px;
}

.contact-page .contact-icon svg {
  transition: transform 300ms ease;
}

.contact-page .contact-icon img {
  filter: none;
  transition: transform 300ms ease;
}

.contact-page .contact-icon--location {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.07));
}

.contact-page .contact-icon--gmail {
  background: var(--bg-surface);
  border-color: rgba(252, 65, 61, 0.22);
}

.contact-page .contact-icon--phone {
  color: #0f766e;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .contact-page .contact-icon--phone {
  color: #34d399;
}

/* Brand colours stay intact in both themes; motion uses translation and uniform scale. */
.contact-page .brand-action {
  --brand-rgb: 252, 65, 61;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 54px;
  height: 48px;
  border-radius: 14px;
  border-color: rgba(var(--brand-rgb), 0.24);
  background: linear-gradient(145deg, var(--bg-surface) 40%, rgba(var(--brand-rgb), 0.07));
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease, border-color 220ms ease, box-shadow 260ms ease;
}

.contact-page .brand-action--whatsapp {
  --brand-rgb: 37, 211, 102;
}

.contact-page .brand-action::before {
  content: '';
  position: absolute;
  inset: -60% -30%;
  z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.contact-page .brand-action .brand-icon {
  filter: none;
  opacity: 1;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-page .brand-action:active {
  transform: translateY(0) scale(0.95);
}

.contact-page :is(.brand-action, .brand-link):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.contact-page .brand-link {
  gap: 0.55rem;
}

.contact-page .brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-page .brand-mark img {
  filter: none;
  opacity: 1;
}

.contact-page .contact-item a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.contact-page .contact-item a:is(:hover, :focus-visible) {
  color: var(--primary);
  text-decoration-color: currentColor;
}

.contact-page .contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-page .contact-form {
  position: relative;
  min-width: 0;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.contact-page .contact-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-page .contact-form::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.contact-page .contact-form:focus-within {
  border-color: var(--surface-ring);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--surface-wash);
}

.contact-page .form-group label {
  transition: color 200ms ease;
}

.contact-page .form-group:focus-within label {
  color: var(--primary);
}

.contact-page :is(.form-input, .form-textarea) {
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

/* Keep the same spacing in standards mode, without an inline textarea baseline gap. */
.contact-page .form-textarea {
  display: block;
}

.contact-page :is(.form-input, .form-textarea):focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--surface-wash);
}

.contact-page .contact-form-actions .btn {
  min-width: 0;
  width: 100%;
}

.contact-page .contact-form-actions .btn:active {
  transform: translateY(1px);
}

@media (min-width: 768px) {
  .contact-page .contact-wrapper {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  }
}

@media (max-width: 991px) {
  .home-page .hero-container {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-page :is(.hero-content-wrapper, .hero-visual) {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .contact-page .contact-form {
    padding: 1.5rem;
  }

  .home-page .hero-visual::before {
    width: 310px;
    max-width: 100%;
  }
}

@media (hover: hover) and (pointer: fine) {
  .home-page .hero-visual:hover::before {
    transform: rotate(0) scale(1.06);
    border-color: var(--primary);
  }

  :is(.home-page, .contact-page) .btn:hover .action-arrow {
    transform: translateX(3px);
  }

  .home-page .credibility-item:hover svg {
    color: var(--primary);
    transform: translateY(-2px);
  }

  .contact-page .contact-item:is(:hover, :focus-within) {
    background: var(--surface-wash);
    border-color: var(--surface-ring);
  }

  .contact-page .contact-item:hover .contact-icon :is(svg, img) {
    transform: translateY(-2px);
  }

  .contact-page .brand-action:hover {
    transform: translateY(-3px);
    background-color: var(--bg-surface);
    border-color: rgba(var(--brand-rgb), 0.55);
    box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.15), 0 0 0 3px rgba(var(--brand-rgb), 0.06);
  }

  .contact-page .brand-action:hover::before {
    transform: translateX(130%);
  }

  .contact-page .brand-action:hover .brand-icon {
    transform: translateY(-1px) scale(1.05);
  }

  .contact-page .brand-action:hover:active {
    transform: translateY(0) scale(0.95);
  }

  .contact-page .brand-link:hover .brand-mark {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce), print {
  [data-enter].entry-ready {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .home-page .hero-img-blob {
    animation: none;
  }

  :is(.home-page, .contact-page) .action-arrow,
  .home-page .hero-visual::before,
  .contact-page .brand-action::before,
  .contact-page :is(.brand-action, .brand-link, .brand-icon, .brand-mark, .contact-icon svg, .contact-icon img) {
    transition: none;
  }

  .contact-page .brand-action::before,
  .contact-page :is(.brand-action, .brand-link, .brand-icon, .brand-mark, .contact-icon svg, .contact-icon img) {
    transform: none !important;
  }

  .contact-page .brand-action::before {
    opacity: 0;
  }
}
