/* =============================================
   Net Bloom — Codex-inspired aesthetic
   ============================================= */

:root {
  --color-bg: #0a0a0a;
  --color-bg-elevated: #111111;
  --color-bg-card: #161616;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #f5f5f5;
  --color-text-muted: rgba(255, 255, 255, 0.55);
  --color-accent: #ffffff;
  --font-display: 'Roc Grotesk', 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --container: min(1200px, 92vw);
  --header-h: 88px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

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

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

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

.container {
  width: var(--container);
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

/* Ensure [hidden] attr works even when a class sets display */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 300;
  padding: 0.65rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
  outline: none;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition), border-color var(--transition);
}

.site-header--hero:not(.site-header--scrolled) {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

.site-header--scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo .site-logo--nav {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--color-text);
}

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

.lang-switch {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.lang-switch__btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}

.lang-switch__btn.active {
  background: var(--color-text);
  color: var(--color-bg);
}

.nav__menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
}

.nav__menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: var(--transition);
}

.nav__menu-btn.is-open span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav__menu-btn.is-open span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5rem;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.15) 45%,
    rgba(10, 10, 10, 0.8) 100%
  );
}

.hero__pause {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background var(--transition), opacity var(--transition);
  opacity: 0;
}

.hero:hover .hero__pause,
.hero__pause:focus-visible {
  opacity: 1;
}

.hero__pause:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 2rem);
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.75rem;
}

.nav__logo .site-logo,
.footer__brand .site-logo {
  object-fit: contain;
  flex-shrink: 0;
}

.hero__logo {
  width: clamp(56px, 12vw, 88px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.4));
}

.hero__media--fallback {
  background: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.hero__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  text-transform: lowercase;
  line-height: 1;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--color-text);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
  border: 1px solid var(--color-text);
  width: 100%;
}

.btn--primary:hover {
  background: transparent;
  color: var(--color-text);
}

/* ---- Stats ---- */
.stats {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 3.5rem 0;
  background: var(--color-bg-elevated);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

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

.stats__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.stats__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stats__suffix {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
  margin-left: 2px;
}

.stats__label {
  margin-top: 0.65rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Sections ---- */
.section {
  padding: 7rem 0;
  border-top: 1px solid var(--color-border);
}

.section__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 20ch;
  margin-bottom: 3rem;
}

/* ---- About ---- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.about__text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.75;
}

.about__quote {
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  padding-left: 1.75rem;
}

.about__quote p {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--color-text);
}

/* ---- Services ---- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.service-card {
  background: var(--color-bg);
  padding: 2.5rem 2rem;
  transition: background var(--transition);
}

.service-card:hover {
  background: var(--color-bg-elevated);
}

.service-card__num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.service-card__link {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.service-card__link:hover {
  color: var(--color-text);
}

/* ---- Contact ---- */
.section--contact {
  background: var(--color-bg-elevated);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact__desc {
  color: var(--color-text-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
  max-width: 36ch;
}

.contact__email {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: opacity var(--transition);
}

.contact__email:hover {
  opacity: 0.7;
}

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

.form-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-group input.is-error,
.form-group textarea.is-error {
  border-color: rgba(255, 100, 100, 0.6);
}

.form__error {
  display: block;
  font-size: 0.75rem;
  color: #ff8a8a;
  margin-top: 0.35rem;
}

.form__success {
  font-size: 0.875rem;
  color: #6ee7a0;
  text-align: center;
}

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

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer__links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

.footer__trust {
  margin-bottom: 3rem;
  overflow: hidden;
}

.footer__trust-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

.logo-slider {
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.logo-slider__track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: slide-right 35s linear infinite;
}

.logo-slider__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 0 1rem;
}

.logo-slider__item img {
  height: auto;
  width: auto;
  max-height: 56px;
  max-width: min(280px, 32vw);
  object-fit: contain;
  object-position: center;
}

.logo-slider__item--speedqueen {
  height: 110px;
}

.logo-slider__item--speedqueen img {
  max-height: 100px;
  max-width: min(480px, 48vw);
}

@keyframes slide-right {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.footer__clocks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--color-border);
  margin-bottom: 0;
}

.footer__clock {
  text-align: center;
}

.footer__clock-time {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.footer__clock-city {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__privacy {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer__privacy:hover {
  color: var(--color-text);
}

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(30, 30, 30, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.cookie-banner p a {
  text-decoration: underline;
  margin-left: 0.25rem;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-banner__accept {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border-radius: 4px;
  transition: background var(--transition);
}

.cookie-banner__accept:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---- Chatbot ---- */
.chatbot {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 150;
}

body:has(#whatsapp-fab:not(.hidden)) .chatbot {
  bottom: 5.5rem;
}

body:has(.cookie-banner:not([hidden])) .chatbot {
  bottom: 5.5rem;
}

body:has(#whatsapp-fab:not(.hidden)):has(.cookie-banner:not([hidden])) .chatbot {
  bottom: 9.5rem;
}

.chatbot__toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition);
}

.chatbot__toggle:hover {
  transform: scale(1.05);
}

.chatbot__panel {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 2rem));
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 480px;
}

.chatbot__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chatbot__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chatbot__clear,
.chatbot__close {
  font-size: 1.2rem;
  line-height: 1;
  color: var(--color-text-muted);
  padding: 2px 6px;
  transition: color var(--transition);
}

.chatbot__clear:hover,
.chatbot__close:hover {
  color: var(--color-text);
}

.chatbot__close {
  font-size: 1.4rem;
}

.chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 200px;
  max-height: 320px;
}

.chatbot__msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.chatbot__msg--bot {
  background: rgba(255, 255, 255, 0.06);
  align-self: flex-start;
}

.chatbot__msg--user {
  background: var(--color-text);
  color: var(--color-bg);
  align-self: flex-end;
}

.chatbot__msg--typing {
  opacity: 0.5;
  font-style: italic;
}

.chatbot__input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.chatbot__input input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 0.875rem;
}

.chatbot__input input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.chatbot__input button.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

.chatbot__input button {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--color-text);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- WhatsApp FAB ---- */
.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 140;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition);
}

.whatsapp-fab:hover {
  transform: scale(1.06);
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---- Legal page ---- */
.legal-page {
  padding: calc(var(--header-h) + 4rem) 0 6rem;
}

.legal-page__content {
  max-width: 680px;
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.8;
}

.legal-page__content h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin: 2rem 0 0.75rem;
}

.legal-page__content p {
  margin-bottom: 0.75rem;
}

.legal-page__back {
  margin-top: 3rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav__links {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li a {
    display: block;
    padding: 0.85rem var(--container);
  }

  .nav__menu-btn {
    display: flex;
  }

  .about__grid,
  .contact__inner,
  .services__grid,
  .stats__grid {
    grid-template-columns: 1fr;
  }

  .stats__grid {
    gap: 2.5rem;
  }

  .hero {
    min-height: 90vh;
    padding-bottom: 6rem;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem 1.25rem;
  }

  .chatbot {
    right: 1rem;
  }

  .whatsapp-fab {
    bottom: 1rem;
    right: 1rem;
  }

  body:has(.cookie-banner:not([hidden])) .whatsapp-fab {
    bottom: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-slider__track {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
