/* ============================================================
   MAS-MX — styles.css
   Shared stylesheet for index.html and contacto.html
   ============================================================ */

/* 1. GOOGLE FONTS */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* 2. CSS CUSTOM PROPERTIES */
:root {
  /* Colors */
  --color-bg:          #F7F5F2;
  --color-bg-dark:     #0E0E0C;
  --color-surface:     #FFFFFF;
  --color-border:      #E0DDD9;
  --color-text:        #0E0E0C;
  --color-text-muted:  #6B6760;
  --color-accent:      #C8B89A;
  --color-accent-dark: #8C7B65;
  --color-white:       #FFFFFF;
  --color-overlay:     rgba(14, 14, 12, 0.45);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-1:   8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  48px;
  --space-6:  64px;
  --space-7:  96px;
  --space-8: 128px;

  /* Layout */
  --container-max:    1200px;
  --nav-height:        72px;
  --nav-height-mobile: 60px;

  /* Transitions */
  --transition-fast:  150ms ease;
  --transition-base:  300ms ease;
  --transition-slow:  600ms ease;
  --transition-xslow: 900ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-Index */
  --z-base:       1;
  --z-slideshow: 10;
  --z-nav:       100;
  --z-overlay:   200;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

button {
  cursor: pointer;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* Screen reader 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;
}

/* ============================================================
   4. NAVIGATION
   ============================================================ */

#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  z-index: var(--z-nav);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    backdrop-filter var(--transition-base);
}

#site-nav.nav-scrolled {
  background: rgba(247, 245, 242, 0.92);
  border-bottom-color: var(--color-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
  mix-blend-mode: screen;
  transition: mix-blend-mode var(--transition-base), filter var(--transition-base);
}

#site-nav.nav-scrolled .nav-logo img {
  mix-blend-mode: normal;
  filter: none;
}

/* Desktop links */
.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-white);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

#site-nav.nav-scrolled .nav-links a {
  color: var(--color-text);
}

/* Hamburger button */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 4px;
}

#hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-white);
  transition: transform var(--transition-base), opacity var(--transition-base), background var(--transition-base);
  transform-origin: center;
}

#site-nav.nav-scrolled #hamburger span {
  background: var(--color-text);
}

/* Hamburger → X animation when menu is open */
body.menu-open #hamburger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.menu-open #hamburger span:nth-child(2) {
  opacity: 0;
}
body.menu-open #hamburger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   5. FULLSCREEN MOBILE OVERLAY MENU
   ============================================================ */

#mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-bg-dark);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

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

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.mobile-menu-links a {
  font-family: var(--font-display);
  font-size: clamp(40px, 10vw, 72px);
  font-weight: 300;
  color: var(--color-white);
  letter-spacing: -0.02em;
  transition: color var(--transition-fast);
}

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

.mobile-menu-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.mobile-menu-social a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  transition: color var(--transition-fast);
}

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

/* ============================================================
   6. HERO
   ============================================================ */

.hero {
  height: 58vh;
  min-height: 420px;
  max-height: 620px;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + var(--space-4)) var(--space-5) var(--space-5);
  position: relative;
  overflow: hidden;
}

/* CSS grain texture overlay — no external image file */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 1;
}

/* Subtle gradient — top slightly lighter */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(30, 28, 25, 0.6) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  opacity: 0;
  animation: fadeUp 500ms 200ms ease-out forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--color-white);
  clip-path: inset(0 100% 0 0);
  animation: clipReveal 1100ms 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  max-width: 420px;
  line-height: 1.75;
  margin-top: var(--space-4);
  opacity: 0;
  animation: fadeUp 600ms 600ms ease-out forwards;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  opacity: 0;
  animation: fadeUp 600ms 900ms ease-out forwards;
}

.hero-scroll span {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.35), transparent);
}

/* ============================================================
   7. SLIDESHOW
   ============================================================ */

.slideshow {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  background: var(--color-bg-dark);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease-in-out;
}

.slide.is-active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Counter */
.slideshow-counter {
  position: absolute;
  top: calc(var(--nav-height) + var(--space-3));
  right: var(--space-4);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  z-index: var(--z-slideshow);
  font-variant-numeric: tabular-nums;
  background: rgba(14, 14, 12, 0.4);
  padding: 6px 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Arrow controls */
.slideshow-arrows {
  position: absolute;
  bottom: var(--space-5);
  right: var(--space-5);
  display: flex;
  gap: var(--space-2);
  z-index: var(--z-slideshow);
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(14, 14, 12, 0.4);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 13px;
}

.arrow-btn:hover {
  border-color: var(--color-accent);
  background: rgba(200, 184, 154, 0.2);
}

.arrow-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Progress bar */
.slideshow-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  z-index: var(--z-slideshow);
  width: 0%;
  transition: width 4000ms linear;
}

.slideshow-progress.reset {
  transition: none;
  width: 0%;
}

/* Pause indicator */
.slideshow-paused-label {
  position: absolute;
  bottom: var(--space-5);
  left: var(--space-5);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  z-index: var(--z-slideshow);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.slideshow.is-paused .slideshow-paused-label {
  opacity: 1;
}

/* ============================================================
   8. ABOUT SECTION
   ============================================================ */

.about {
  background: var(--color-bg);
  padding: var(--space-8) var(--space-5);
}

.about-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-7);
  align-items: start;
}

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  padding-top: var(--space-1);
}

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

.about-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

.about-body {
  max-width: 560px;
}

.about-body p {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--color-text-muted);
}

.about-stat {
  display: flex;
  gap: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ============================================================
   9. SERVICES SECTION
   ============================================================ */

.services {
  background: var(--color-bg-dark);
  padding: var(--space-8) 0 0;
}

.services-header {
  padding: 0 var(--space-5) var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
}

.services-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.service-item {
  padding: var(--space-6) var(--space-5);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: background var(--transition-base);
}

.service-item:last-child {
  border-right: none;
}

.service-item:hover {
  background: rgba(200, 184, 154, 0.04);
}

/* Accent line reveal on hover */
.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-slow);
}

.service-item:hover::before {
  width: 100%;
}

.service-number {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: var(--space-5);
  opacity: 0.7;
}

.service-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 300;
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.service-desc {
  margin-top: var(--space-3);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   10. FOOTER
   ============================================================ */

#site-footer {
  background: var(--color-bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-6) var(--space-5);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand img {
  height: 28px;
  width: auto;
  mix-blend-mode: screen;
  opacity: 0.7;
  margin-bottom: var(--space-2);
}

.footer-tagline {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
}

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

.footer-contact a {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-fast);
}

.footer-contact a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: flex-end;
}

.footer-social a {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.3);
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  max-width: var(--container-max);
  margin: var(--space-4) auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.2);
}

.footer-bottom a {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  transition: color var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

/* ============================================================
   11. CONTACT HERO
   ============================================================ */

.contact-hero {
  min-height: 55vh;
  background: var(--color-bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-height) + var(--space-7)) var(--space-5) var(--space-7);
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.contact-hero-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.contact-hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-white);
}

.contact-hero-sub {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  margin-top: var(--space-4);
  max-width: 400px;
  line-height: 1.7;
}

/* ============================================================
   12. CONTACT LAYOUT
   ============================================================ */

.contact-section {
  background: var(--color-bg);
  padding: var(--space-8) var(--space-5);
}

.contact-layout {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-7);
  align-items: start;
}

/* ============================================================
   13. CONTACT FORM
   ============================================================ */

.form-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-field label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  padding: var(--space-2) 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--color-text);
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--transition-base);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-bottom-color: var(--color-text);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(107, 103, 96, 0.4);
  font-weight: 300;
}

/* Select arrow */
.form-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B6760'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--color-text);
  background: transparent;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: var(--space-4);
  transition:
    background var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base);
  height: 52px;
}

.btn-submit:hover:not(:disabled) {
  background: var(--color-text);
  color: var(--color-white);
}

.btn-submit:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-feedback {
  display: none;
  padding: var(--space-3) 0;
  margin-top: var(--space-3);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  border-top: 1px solid transparent;
}

.form-feedback.success {
  border-top-color: #10B981;
  color: #059669;
  display: block;
}

.form-feedback.error {
  border-top-color: #EF4444;
  color: #DC2626;
  display: block;
}

/* ============================================================
   14. CONTACT INFO PANEL
   ============================================================ */

.contact-info-panel {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-5));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.info-block:last-of-type {
  border-bottom: none;
}

.info-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.info-value {
  font-size: 15px;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.6;
}

.info-value a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.info-value a:hover {
  color: var(--color-accent-dark);
}

.info-social {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

.info-social a {
  font-size: 17px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

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

/* ============================================================
   15. ANIMATIONS & REVEAL SYSTEM
   ============================================================ */

@keyframes clipReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spinLoader {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* IntersectionObserver reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

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

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.reveal-stagger.is-revealed > *:nth-child(1) { transition-delay: 0ms;    opacity: 1; transform: none; }
.reveal-stagger.is-revealed > *:nth-child(2) { transition-delay: 100ms;  opacity: 1; transform: none; }
.reveal-stagger.is-revealed > *:nth-child(3) { transition-delay: 200ms;  opacity: 1; transform: none; }
.reveal-stagger.is-revealed > *:nth-child(4) { transition-delay: 300ms;  opacity: 1; transform: none; }

/* ============================================================
   16. MEDIA QUERIES
   ============================================================ */

@media (max-width: 1024px) {
  #site-nav {
    padding: 0 var(--space-4);
  }

  .about-inner {
    grid-template-columns: 160px 1fr;
    gap: var(--space-5);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-item:nth-child(2) {
    border-right: none;
  }

  .service-item:nth-child(3) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .service-item:nth-child(4) {
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .contact-layout {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: var(--nav-height-mobile);
  }

  #site-nav {
    padding: 0 var(--space-3);
  }

  .nav-links {
    display: none;
  }

  #hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    height: 52vh;
    padding: calc(var(--nav-height) + var(--space-3)) var(--space-3) var(--space-4);
    align-items: center;
  }

  .hero-scroll {
    display: none;
  }

  /* About */
  .about {
    padding: var(--space-6) var(--space-3);
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .about-stat {
    gap: var(--space-4);
    flex-wrap: wrap;
  }

  /* Services */
  .services {
    padding: var(--space-6) 0 0;
  }

  .services-header {
    padding: 0 var(--space-3) var(--space-4);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-item {
    padding: var(--space-4) var(--space-3);
  }

  /* Footer */
  #site-footer {
    padding: var(--space-5) var(--space-3);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .footer-social {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
  }

  /* Contact */
  .contact-hero {
    padding: calc(var(--nav-height) + var(--space-5)) var(--space-3) var(--space-5);
  }

  .contact-section {
    padding: var(--space-5) var(--space-3);
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .contact-info-panel {
    position: static;
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-5);
  }

  /* Slideshow */
  .slideshow-counter {
    top: calc(var(--nav-height) + var(--space-2));
    right: var(--space-3);
  }

  .slideshow-arrows {
    bottom: var(--space-4);
    right: var(--space-3);
  }

  .arrow-btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-bottom: var(--space-5);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-item {
    border-right: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .service-item:first-child {
    border-top: none;
  }

  .about-stat {
    flex-direction: column;
    gap: var(--space-3);
  }
}

/* ============================================================
   17. PREFERS-REDUCED-MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-title {
    clip-path: none;
  }

  .hero-eyebrow,
  .hero-subtitle,
  .hero-scroll {
    opacity: 1;
    animation: none;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }

  .slideshow-progress {
    transition: none;
  }

  .slide {
    transition: none;
  }
}
