/* ============================================================
   СТРОЙ ТУН — Shared Stylesheet
   Apple-inspired dark construction company design
   ============================================================ */


/* ------------------------------------------------------------
   1. RESET & CUSTOM PROPERTIES
   ------------------------------------------------------------ */

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

:root {
  /* Colors */
  --color-black:       #000000;
  --color-white:       #ffffff;
  --color-accent:      #FF6B00;
  --color-accent-hover:#e55f00;
  --color-bg-dark:     #000000;
  --color-bg-light:    #f5f5f7;
  --color-surface:     #1d1d1f;
  --color-surface-alt: #161617;
  --color-text-primary:#f5f5f7;
  --color-text-secondary: rgba(245, 245, 247, 0.7);
  --color-text-tertiary:  rgba(245, 245, 247, 0.5);
  --color-text-dark:   #1d1d1f;
  --color-text-dark-secondary: #6e6e73;
  --color-border:      rgba(255, 255, 255, 0.08);
  --color-border-light:rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body:    'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --text-hero:    96px;
  --text-title:   64px;
  --text-section: 48px;
  --text-subhead: 28px;
  --text-body:    17px;
  --text-caption: 14px;
  --text-small:   12px;

  --line-height-tight:  1.05;
  --line-height-heading:1.1;
  --line-height-body:   1.47;

  /* Spacing */
  --gap-tile:      12px;
  --space-xs:      8px;
  --space-sm:      16px;
  --space-md:      24px;
  --space-lg:      40px;
  --space-xl:      64px;
  --space-2xl:     80px;
  --space-3xl:     120px;

  /* Layout */
  --max-width-text:  980px;
  --max-width-wide:  1440px;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-pill:100px;

  /* Transitions */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:  0.2s;
  --duration-base:  0.4s;
  --duration-slow:  0.8s;

  /* Nav */
  --nav-height: 48px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg-dark);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}


/* ------------------------------------------------------------
   15. NOISE OVERLAY
   ------------------------------------------------------------ */

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


/* ------------------------------------------------------------
   2. TYPOGRAPHY
   ------------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--line-height-heading);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 {
  font-size: var(--text-hero);
  line-height: var(--line-height-tight);
}

h2 {
  font-size: var(--text-title);
}

h3 {
  font-size: var(--text-section);
}

h4 {
  font-size: var(--text-subhead);
}

h5 {
  font-size: 22px;
}

h6 {
  font-size: 18px;
}

p {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
}

.text-hero {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.text-title {
  font-family: var(--font-display);
  font-size: var(--text-title);
  line-height: var(--line-height-heading);
  text-transform: uppercase;
}

.text-section {
  font-family: var(--font-display);
  font-size: var(--text-section);
  line-height: var(--line-height-heading);
  text-transform: uppercase;
}

.text-subhead {
  font-size: var(--text-subhead);
  line-height: 1.3;
  font-weight: 500;
}

.text-body {
  font-size: var(--text-body);
  line-height: var(--line-height-body);
}

.text-caption {
  font-size: var(--text-caption);
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.text-accent {
  color: var(--color-accent);
}


/* ------------------------------------------------------------
   3. NAVIGATION
   ------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background-color var(--duration-fast) ease,
              backdrop-filter var(--duration-fast) ease;
}

.nav-dark {
  background-color: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--color-text-primary);
}

.nav-light {
  background-color: rgba(245, 245, 247, 0.7);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--color-text-dark);
}

.nav.scrolled.nav-dark {
  background-color: rgba(0, 0, 0, 0.92);
}

.nav.scrolled.nav-light {
  background-color: rgba(245, 245, 247, 0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-small);
  letter-spacing: 0.01em;
  opacity: 0.85;
  transition: opacity var(--duration-fast) ease;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a.active {
  opacity: 1;
  color: var(--color-accent);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 20px;
  height: var(--nav-height);
  cursor: pointer;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: currentColor;
  transition: transform var(--duration-fast) ease,
              opacity var(--duration-fast) ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  padding-top: var(--nav-height);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  background-color: rgba(0, 0, 0, 0.96);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out-quart);
}

.nav-mobile.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile a {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  transition: color var(--duration-fast) ease;
}

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


/* ------------------------------------------------------------
   4. HERO SECTIONS
   ------------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width-text);
}

.hero-content h1 {
  margin-bottom: var(--space-md);
}

.hero-content p {
  font-size: 21px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto var(--space-lg);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  opacity: 0.5;
  animation: hero-bounce 2s infinite;
}

.hero-scroll-hint span {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-scroll-hint::after {
  content: '';
  width: 1px;
  height: 24px;
  background-color: currentColor;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}


/* ------------------------------------------------------------
   5. SECTION TILES (Apple-style 2-column grid)
   ------------------------------------------------------------ */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-tile);
  padding: 0 var(--gap-tile);
  max-width: calc(var(--max-width-wide) + var(--gap-tile) * 2);
  margin: 0 auto;
}

.tiles .tile-full {
  grid-column: 1 / -1;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 580px;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  overflow: hidden;
  border-radius: 0;
}

.tile.theme-dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
}

.tile.theme-light {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

.tile-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.tile-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

.tile-content h3 {
  margin-bottom: var(--space-xs);
}

.tile-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.tile.theme-light .tile-content p {
  color: var(--color-text-dark-secondary);
}

.tile-image {
  position: relative;
  z-index: 1;
  margin-top: var(--space-md);
  max-width: 100%;
}


/* ------------------------------------------------------------
   6. CARDS
   ------------------------------------------------------------ */

/* Service card */
.card {
  position: relative;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-out-quart),
              box-shadow var(--duration-base) var(--ease-out-quart);
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: var(--space-md);
}

.card-body h4 {
  margin-bottom: var(--space-xs);
  font-family: var(--font-display);
}

.card-body p {
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
}

.card-tag {
  display: inline-block;
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

/* Card grid layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Project card */
.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out-quart);
}

.project-card:hover {
  transform: scale(1.02);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}

.project-card:hover img {
  transform: scale(1.06);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
}

.project-card-overlay h4 {
  font-family: var(--font-display);
  font-size: var(--text-subhead);
  margin-bottom: 4px;
}

.project-card-overlay p {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
}

/* Equipment card */
.equip-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: transform var(--duration-base) var(--ease-out-quart),
              box-shadow var(--duration-base) var(--ease-out-quart);
}

.equip-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.equip-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-sm);
}

.equip-card h5 {
  font-family: var(--font-display);
  margin-bottom: var(--space-xs);
}

.equip-card p {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
}


/* ------------------------------------------------------------
   7. BUTTONS
   ------------------------------------------------------------ */

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  border-radius: var(--radius-pill);
  background-color: var(--color-white);
  color: var(--color-text-dark);
  transition: background-color var(--duration-fast) ease,
              transform var(--duration-fast) ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-pill:hover {
  background-color: #e8e8ed;
  transform: scale(1.02);
}

.btn-pill:active {
  transform: scale(0.98);
}

.btn-pill-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  transition: background-color var(--duration-fast) ease,
              transform var(--duration-fast) ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-pill-dark:hover {
  background-color: #2d2d2f;
  transform: scale(1.02);
}

.btn-pill-dark:active {
  transform: scale(0.98);
}

.btn-pill-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
  color: var(--color-white);
  transition: background-color var(--duration-fast) ease,
              transform var(--duration-fast) ease;
  white-space: nowrap;
  cursor: pointer;
}

.btn-pill-accent:hover {
  background-color: var(--color-accent-hover);
  transform: scale(1.02);
}

.btn-pill-accent:active {
  transform: scale(0.98);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-body);
  color: var(--color-accent);
  transition: gap var(--duration-fast) ease;
  cursor: pointer;
}

.btn-link::after {
  content: '\203A';
  font-size: 1.3em;
  line-height: 1;
  transition: transform var(--duration-fast) ease;
}

.btn-link:hover {
  gap: 10px;
}

.btn-link:hover::after {
  transform: translateX(2px);
}


/* ------------------------------------------------------------
   8. STATS / COUNTERS
   ------------------------------------------------------------ */

.stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
  padding: var(--space-xl) var(--space-md);
}

.stat {
  text-align: center;
  min-width: 140px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--color-accent);
}

.stat-label {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-suffix {
  font-size: 0.5em;
  vertical-align: super;
  margin-left: 2px;
}

/* Light theme stats */
.section-light .stat-number {
  color: var(--color-accent);
}

.section-light .stat-label {
  color: var(--color-text-dark-secondary);
}


/* ------------------------------------------------------------
   9. FORMS
   ------------------------------------------------------------ */

.form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-label {
  display: block;
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 16px 20px;
  font-size: var(--text-body);
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-tertiary);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

/* Light theme form */
.section-light .form-input,
.section-light .form-textarea,
.section-light .form-select {
  background-color: var(--color-white);
  color: var(--color-text-dark);
  border-color: var(--color-border-light);
}

.section-light .form-input::placeholder,
.section-light .form-textarea::placeholder {
  color: var(--color-text-dark-secondary);
}

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

.form-submit {
  margin-top: var(--space-md);
}


/* ------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------ */

.footer {
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
  padding: var(--space-xl) var(--space-md) var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.footer-col h6 {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.footer-col a {
  display: block;
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  padding: 3px 0;
  transition: color var(--duration-fast) ease;
}

.footer-col a:hover {
  color: var(--color-text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width-wide);
  margin: var(--space-md) auto 0;
  font-size: var(--text-small);
  color: var(--color-text-tertiary);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-legal {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.footer-legal a {
  transition: color var(--duration-fast) ease;
}

.footer-legal a:hover {
  color: var(--color-text-secondary);
}


/* ------------------------------------------------------------
   11. ANIMATIONS
   ------------------------------------------------------------ */

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out-quart),
              transform var(--duration-slow) var(--ease-out-quart);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out-quart);
}

.fade-in.visible {
  opacity: 1;
}

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--duration-slow) var(--ease-out-quart),
              transform var(--duration-slow) var(--ease-out-quart);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }


/* ------------------------------------------------------------
   12. CUSTOM CURSOR
   ------------------------------------------------------------ */

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 107, 0, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out-quart),
              height 0.25s var(--ease-out-quart),
              border-color 0.25s ease;
  mix-blend-mode: difference;
}

.cursor-ring.active {
  width: 24px;
  height: 24px;
  border-color: var(--color-accent);
}

.cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  background-color: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
}

.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: rgba(255, 107, 0, 0.15);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor-ring,
  .cursor-dot,
  .cursor-trail {
    display: none !important;
  }
}


/* ------------------------------------------------------------
   14. UTILITY CLASSES
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--max-width-text);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-primary);
}

.section-light {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

.section-padding {
  padding: var(--space-3xl) 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

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


/* ------------------------------------------------------------
   13. RESPONSIVE
   ------------------------------------------------------------ */

/* <= 1440px */
@media (max-width: 1440px) {
  :root {
    --text-hero: 80px;
    --text-title: 56px;
  }
}

/* <= 1068px */
@media (max-width: 1068px) {
  :root {
    --text-hero: 64px;
    --text-title: 48px;
    --text-section: 40px;
    --text-subhead: 24px;
  }

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

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .stat-number {
    font-size: 56px;
  }
}

/* <= 734px */
@media (max-width: 734px) {
  :root {
    --text-hero: 48px;
    --text-title: 36px;
    --text-section: 32px;
    --text-subhead: 21px;
    --text-body: 15px;
    --space-3xl: 80px;
    --space-2xl: 56px;
    --space-xl: 44px;
  }

  /* Nav mobile */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Tiles single column */
  .tiles {
    grid-template-columns: 1fr;
  }

  .tile {
    min-height: 480px;
  }

  /* Cards single column */
  .card-grid {
    grid-template-columns: 1fr;
  }

  /* Stats */
  .stats {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: 48px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

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

  /* Hero */
  .hero {
    padding: var(--space-2xl) var(--space-sm);
  }

  .hero-content p {
    font-size: var(--text-body);
  }
}


/* ------------------------------------------------------------
   16. REDUCED MOTION
   ------------------------------------------------------------ */

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

  .fade-in-up,
  .fade-in,
  .scale-in {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .project-card:hover,
  .equip-card:hover {
    transform: none;
  }

  .card:hover .card-image img,
  .project-card:hover img {
    transform: none;
  }
}
