/* ============================================================
   VistaCraft — style.css
   Design System: variables, reset, header, footer, nav,
   buttons, WhatsApp float, reveal animations
   H&FV Web Design · 2026
   ============================================================ */

/* ── 1. CSS VARIABLES ──────────────────────────────────────── */
:root {
  /* Colors */
  --bg:            #111111;
  --bg-elevated:   #1a1a1a;
  --bg-deep:       #0a0a0a;
  --primary:       #e0e0e0;
  --secondary:     #333333;
  --accent:        #aaaaaa;
  --text:          #f5f5f5;
  --text-muted:    #888888;
  --border:        rgba(224, 224, 224, 0.12);
  --border-strong: rgba(224, 224, 224, 0.25);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Lato', sans-serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --space-4xl: 10rem;

  /* Layout */
  --max-width:     1280px;
  --header-height: 90px;

  /* Brand accent colors (from logo) */
  --gold:   #fdaf00;  /* amber — energy, stats, key first letters */
  --cobalt: #185ab8;  /* deep blue — trust, conversion, forms */

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ── 2. RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ── 3. TYPOGRAPHY BASE ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text);
}

h2 { font-size: clamp(2.5rem, 4vw + 1rem, 5rem); }
h3 { font-size: clamp(1.5rem, 2vw + 0.5rem, 2.5rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.75rem); font-family: var(--font-body); font-weight: 700; }

p {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.7;
  color: var(--accent);
}

/* ── 4. CONTAINERS ─────────────────────────────────────────── */
.hfv-container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.hfv-container--narrow {
  max-width: 820px;
}

/* ── 5. BUTTONS ────────────────────────────────────────────── */
.hfv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.hfv-btn--primary {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.hfv-btn--primary:hover,
.hfv-btn--primary:focus-visible {
  background: transparent;
  color: var(--primary);
  transform: translateY(-1px);
}

.hfv-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.hfv-btn--ghost:hover,
.hfv-btn--ghost:focus-visible {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.hfv-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.hfv-btn:hover svg,
.hfv-btn:focus-visible svg {
  transform: translate(2px, -2px);
}

/* ── 6. HEADER & NAV ───────────────────────────────────────── */
.hfv-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.hfv-header.is-scrolled {
  background: rgba(17, 17, 17, 0.96);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hfv-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-lg);
  padding-top: 10px;
}

.hfv-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--text);
  flex-shrink: 0;
}

.hfv-logo span {
  color: var(--accent);
}

.hfv-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.hfv-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hfv-nav__links a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color var(--transition-fast);
}

.hfv-nav__links a:hover,
.hfv-nav__links a:focus-visible {
  color: var(--text);
}

/* Hamburger */
.hfv-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.hfv-hamburger__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

.hfv-hamburger[aria-expanded="true"] .hfv-hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hfv-hamburger[aria-expanded="true"] .hfv-hamburger__bar:nth-child(2) {
  opacity: 0;
}
.hfv-hamburger[aria-expanded="true"] .hfv-hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

#mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.05em;
  color: var(--text);
  transition: color var(--transition-fast);
}

#mobile-menu a:hover {
  color: var(--accent);
}

/* ── 7. FOOTER ─────────────────────────────────────────────── */
.hfv-footer {
  background: var(--bg-deep);
  border-top: 2px solid var(--primary);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.hfv-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: start;
}

.hfv-footer__brand {
  max-width: 600px;
}

.hfv-footer__tagline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.hfv-footer__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 400px;
  margin-bottom: var(--space-md);
}

.hfv-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: right;
}

.hfv-footer__links a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color var(--transition-fast);
}

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

.hfv-footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hfv-footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── 8. WHATSAPP FLOAT ─────────────────────────────────────── */
.hfv-whatsapp {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 900;
  width: 52px;
  height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hfv-whatsapp:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.hfv-whatsapp svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

/* ── 9. REVEAL ANIMATIONS ──────────────────────────────────── */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

.js-enabled .reveal--delay-1 { transition-delay: 100ms; }
.js-enabled .reveal--delay-2 { transition-delay: 200ms; }
.js-enabled .reveal--delay-3 { transition-delay: 300ms; }
.js-enabled .reveal--delay-4 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .js-enabled .reveal,
  .js-enabled .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── 10. SECTION BASE ──────────────────────────────────────── */
.hfv-section {
  position: relative;
  overflow: hidden;
}

/* ── 11. EYEBROW TEXT ──────────────────────────────────────── */
.hfv-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

/* ── 11b. SKIP LINK ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* ── 11c. SR-ONLY ──────────────────────────────────────────── */
.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;
}

/* ── 12. DIVIDER ───────────────────────────────────────────── */
.hfv-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── 13. CUSTOM CURSOR ─────────────────────────────────────── */
/* Only active on pointer:fine devices (desktop/trackpad) */
.hfv-custom-cursor,
.hfv-custom-cursor * {
  cursor: none !important;
}

.hfv-custom-cursor .hfv-cursor {
  display: block;
}

.hfv-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: none; /* shown only when JS adds .hfv-custom-cursor to body */
}

.hfv-cursor__dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
  transition: opacity 150ms ease;
  pointer-events: none;
}

.hfv-cursor__ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(224, 224, 224, 0.45);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
  transition: width 220ms ease, height 220ms ease,
              background 220ms ease, border-color 220ms ease,
              opacity 220ms ease;
  pointer-events: none;
}

/* Eye state — triggered on hover over images and cards */
.hfv-cursor--eye .hfv-cursor__dot {
  opacity: 0;
}

.hfv-cursor--eye .hfv-cursor__ring {
  width: 52px;
  height: 52px;
  background: var(--gold);
  border-color: var(--gold);
  opacity: 1;
}

.hfv-cursor--eye .hfv-cursor__ring::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C%2Fsvg%3E");
  background-size: 22px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ── 14. RESPONSIVE HEADER ─────────────────────────────────── */
@media (max-width: 768px) {
  .hfv-hamburger {
    display: flex;
  }

  .hfv-nav__links {
    display: none;
  }

  .hfv-nav > .hfv-btn {
    display: none;
  }
}
