@import url("https://fonts.cdnfonts.com/css/thegoodmonolith");

@font-face {
  font-family: "PP Neue Montreal";
  src: url("https://fonts.cdnfonts.com/s/64587/PPNeueMontreal-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ===== CSS VARIABLES ===== */
:root {
  /* Colors */
  --color-bg: #111111;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.7);
  --color-text-dim: rgba(255, 255, 255, 0.6);
  --color-dot: #444;
  --color-star: rgba(209, 255, 255, 1);
  /* Typography */
  --font-body: "TheGoodMonolith", sans-serif;
  --font-title: "PP Neue Montreal", sans-serif;
  --font-size-base: 0.75rem;
  --font-size-h2: 2rem;
  --font-size-h1: 3rem;
  --letter-spacing-title: -0.03em;
  --line-height: 1.4;
  /* Spacing */
  --spacing-base: 1rem;
  --spacing-sm: 0.75rem;
  --spacing-xs: 0.25rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.8s ease;
  /* Effects */
  --blur-amount: 5px;
}

/* ===== RESET & BASE STYLES ===== */
*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: var(--line-height);
  margin: 0;
  font-size: var(--font-size-base);
  overflow-x: hidden;
}

/* --- Overlay Spinner Normalization (match fieldwork) --- */
.page-transition {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 9999;
}

.page-transition.active {
  opacity: 1;
  pointer-events: auto;
}

.page-transition .pt-backdrop {
  animation: backdrop-reveal 0.9s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  backdrop-filter: blur(14px) saturate(180%);
  background: rgba(5, 10, 20, 0.4);
  inset: 0;
  position: absolute;
}

@keyframes backdrop-reveal {
  0% {
    backdrop-filter: blur(0px) saturate(100%);
    background: rgba(5, 10, 20, 0);
  }

  100% {
    backdrop-filter: blur(14px) saturate(180%);
    background: rgba(5, 10, 20, 0.4);
  }
}

/* Dust/Scratches background effect for the entire site */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../../images/foggy-jungle.jpg");
  background-repeat: repeat;
  opacity: 0.05;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

h2,
h3 {
  font-weight: normal;
  margin-bottom: var(--spacing-sm);
}

h2 {
  font-family: var(--font-title);
  font-size: var(--font-size-h2);
  letter-spacing: var(--letter-spacing-title);
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
}

p {
  margin-bottom: var(--spacing-xs);
  opacity: 0.7;
}

ul {
  list-style: none;
}

/* ===== INTERACTIVE ELEMENTS ===== */
/* Global link style with hover effect */
/* Scoped page link styles (exclude overlay nav to avoid overriding its subtitle + line effects) */
.header-section a,
.additional-section a,
.bottom-bar a,
.site-credit a,
.contact-info a,
.credit-content a,
.links span {
  position: relative;
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
  display: inline-block;
  z-index: 1;
  text-decoration: none;
  font-size: inherit;
  opacity: 0.7;
  transition: color var(--transition-medium);
}

.header-section a::after,
.additional-section a::after,
.bottom-bar a::after,
.site-credit a::after,
.contact-info a::after,
.credit-content a::after,
.links span::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-text);
  z-index: -1;
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-section a:hover::after,
.additional-section a:hover::after,
.bottom-bar a:hover::after,
.site-credit a:hover::after,
.contact-info a:hover::after,
.credit-content a:hover::after,
.links span:hover::after {
  width: 100%;
}

.header-section a:hover,
.additional-section a:hover,
.bottom-bar a:hover,
.site-credit a:hover,
.contact-info a:hover,
.credit-content a:hover,
.links span:hover {
  color: black;
  mix-blend-mode: difference;
  opacity: 1;
}

/* Ensure overlay navigation pseudo-elements (subtitle + line) remain intact even after this stylesheet loads */
.fw-overlay-navigation nav li a {
  mix-blend-mode: normal;
  opacity: 1;
}

.fw-overlay-navigation nav li a::after {
  /* restore subtitle usage */
  content: attr(data-content);
  position: absolute;
  left: 0;
  right: 0;
  bottom: -50px;
  background: none;
  width: auto;
  height: auto;
  z-index: 100;
  opacity: 0;
  transition: all .2s linear;
}

.fw-overlay-navigation nav li a:hover::after {
  transform: translateY(15px);
  opacity: 1;
}

/* ===== LAYOUT COMPONENTS ===== */
.header-section {
  padding: var(--spacing-lg);
  width: 100%;
  position: relative;
  background-color: var(--color-bg);
  z-index: 5;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .header-section {
    font-size: var(--font-size-base);
  }
}

.footer {
  width: 100%;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  /* No padding - let sections handle their own */
}

.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  -moz-column-gap: var(--spacing-base);
  column-gap: var(--spacing-base);
  width: 100%;
  padding: 0;
  /* Remove padding from container since header-section handles it */
}

/* Grid column assignments */
.nav {
  grid-column: 1 / span 3;
}

.contact-info {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--spacing-lg);
  justify-content: flex-start;
  align-items: baseline;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.label {
  font-weight: normal;
  font-size: inherit;
  white-space: nowrap;
  opacity: 1;
}

.detail {
  font-size: inherit;
  opacity: 0.7;
  margin-right: var(--spacing-xs);
}

/* Phone number copy tooltip */
.phone-copied-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.phone-copied-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.detail:last-child {
  margin-right: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .contact-info {
    grid-column: 1 / -1;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: flex-start;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  .detail {
    margin-right: 0;
  }
}

.values {
  display: none;
}

.social {
  display: none;
}

/* Bottom bar */
.bottom-bar {
  margin-top: auto;
  margin-left: var(--spacing-lg);
  /* Add left margin to match dot-grid */
  margin-right: var(--spacing-lg);
  /* Add right margin to match dot-grid */
  padding-top: var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  -moz-column-gap: var(--spacing-base);
  column-gap: var(--spacing-base);
  align-items: flex-end;
  width: calc(100% - 4rem);
  /* Subtract left and right margins (2rem each) */
  position: relative;
  z-index: 5;
}

.coordinates {
  grid-column: 1 / span 3;
  opacity: var(--color-text-dim);
}

.links {
  grid-column: 5 / span 4;
  text-align: center;
}

.info {
  grid-column: 9 / span 4;
  text-align: right;
  opacity: var(--color-text-dim);
}

.links span {
  margin: 0 var(--spacing-base);
}

/* ===== LOGO COMPONENT ===== */
.logo-container {
  margin-bottom: var(--spacing-md);
  display: block;
  width: 3rem;
  height: 1.5rem;
  position: relative;
}

/* ===== DOT GRID ===== */
.dot-grid {
  width: 100%;
  height: 150px;
  position: relative;
  margin: var(--spacing-base) var(--spacing-lg) var(--spacing-lg);
  /* top, left/right, bottom margins */
  overflow: hidden;
  z-index: 1;
}

.dot {
  position: absolute;
  font-size: 10px;
  color: var(--color-dot);
  transition: all var(--transition-fast);
  will-change: transform, color;
}

/* ===== SITE CREDIT ===== */
.site-credit {
  margin: var(--spacing-base) var(--spacing-lg) var(--spacing-lg);
  width: calc(100% - 4rem);
  position: relative;
  z-index: 5;
}

.credit-content {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: var(--spacing-sm);
  font-size: var(--font-size-base);
  opacity: 0.6;
  flex-wrap: wrap;
}

.credit-content span {
  white-space: nowrap;
}

.credit-content a {
  color: var(--color-text);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.credit-content a:hover {
  opacity: 1;
}

/* Mobile responsive for credit */
@media (max-width: 768px) {
  .credit-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
  }
}

/* ===== WEBGL SECTION ===== */
.sticky-container {
  position: relative;
  height: 500vh;
  width: 100%;
  margin: 0;
}

.webgl-section {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  overflow: hidden;
  will-change: transform, opacity, filter;
}

.canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
  will-change: transform, opacity, filter;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas#space {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== ANIMATED TEXT ===== */
.animated-text {
  position: absolute;
  top: auto;
  left: 50%;
  transform: translate(-50%, calc(-50% + 40px));
  color: var(--color-text);
  font-family: var(--font-title);
  font-size: var(--font-size-h1);
  text-align: center;
  opacity: 0;
  z-index: 20;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-title);
  pointer-events: none;
  width: 80%;
  max-width: 800px;
  will-change: opacity, transform, filter;
  filter: blur(8px);
  transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== ADDITIONAL SECTION ===== */
.additional-section {
  width: 100%;
  min-height: 60vh;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) var(--spacing-lg);
  position: relative;
  z-index: 20;
  overflow: hidden;
}

.additional-content {
  max-width: 800px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.additional-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced width for paragraphs */
.additional-content p {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: var(--spacing-base);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-transition {
  position: relative;
  overflow: hidden;
}

/* ===== TOOL TICKER (from services) ===== */
.tool-ticker-section {
  width: 100%;
  padding: clamp(40px, 6vh, 80px) 0;
  background: var(--color-bg);
  position: relative;
  z-index: 20;
}

.tool-ticker {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  overflow: hidden;
}

.tool-ticker__label {
  font-family: monospace;
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
  text-align: center;
}

.tool-ticker__marquee {
  display: flex;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.tool-ticker__track {
  display: flex;
  gap: 48px;
  padding-right: 48px;
  animation: tool-ticker-scroll 40s linear infinite;
  flex-shrink: 0;
}

.tool-ticker__marquee:hover .tool-ticker__track {
  animation-play-state: paused;
}

@keyframes tool-ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.tool-ticker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.45;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.tool-ticker__item:hover {
  opacity: 1;
}

.tool-ticker__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.tool-ticker__icon--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 20px;
  color: #fff;
  line-height: 1;
}

.tool-ticker__name {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== FOOTER CONTACT INFO ===== */
.footer-contact-info {
  width: 100%;
  padding: var(--spacing-lg) var(--spacing-lg);
  background: var(--color-bg);
  position: relative;
  z-index: 20;
  font-size: 0.95rem;
}

.footer-contact-info .contact-info {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .footer-contact-info .contact-info {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .footer-contact-info .info-item {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
  }

  .footer-contact-info {
    font-size: var(--font-size-base);
  }
}

/* Portal + loader styles removed to use shared global styles.css */

/* Loader overrides removed; using unified global loader styles */

/* ===== WARP CONTACT FORM OVERLAY ===== */

/* Trigger button in #additionalContent */
.warp-trigger-btn {
  display: inline-block;
  margin-top: var(--spacing-md);
  padding: 0 0 2px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-medium), border-color var(--transition-medium);
}

.warp-trigger-btn:hover {
  opacity: 1;
  border-color: var(--color-text);
}

/* Full-screen fixed overlay — independent of scroll position (gap #1 addressed) */
.warp-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  background: #111;
}

.warp-overlay.is-open {
  pointer-events: auto;
}

/* Overlay's own starfield canvas */
#warpOverlayCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Content centered above the canvas */
.warp-overlay__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  z-index: 1;
}

/* Close button */
.warp-overlay__close {
  position: absolute;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 1.1rem;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0.25rem 0.5rem;
  transition: color var(--transition-fast);
  line-height: 1;
}

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

/* Terminal form container */
.warp-form__terminal {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Prompt rows */
.warp-form__line {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: var(--spacing-sm);
}

.warp-form__line--submit {
  border-bottom: none;
  padding-bottom: 0;
  margin-top: var(--spacing-xs);
}

.warp-form__prompt {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(209, 255, 255, 0.65);
  letter-spacing: 0.1em;
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

/* Inputs & textarea */
.warp-form__terminal input,
.warp-form__terminal textarea {
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  width: 100%;
  caret-color: rgba(209, 255, 255, 0.9);
  padding: 0;
}

.warp-form__terminal input::placeholder,
.warp-form__terminal textarea::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.warp-form__line--tall textarea {
  resize: none;
  height: 80px;
  line-height: 1.5;
}

/* Submit button */
.warp-form__send {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.warp-form__send:hover:not(:disabled) {
  background: var(--color-text);
  color: #111;
  border-color: var(--color-text);
}

.warp-form__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Error message */
.warp-form__error {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255, 110, 110, 0.9);
  letter-spacing: 0.06em;
  padding: var(--spacing-xs) 0;
}

/* Success state */
.warp-form__success[hidden] { display: none; }

.warp-form__success {
  width: 100%;
  max-width: 560px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.warp-form__success .warp-form__prompt {
  font-size: 1rem;
  color: rgba(209, 255, 255, 0.9);
  letter-spacing: 0.14em;
}

.warp-form__success p {
  opacity: 0.55;
  font-size: 0.85rem;
}

/* Mobile: stack prompt above input (gap #5 addressed) */
@media (max-width: 768px) {
  .warp-form__line {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .warp-overlay__content {
    padding: 4rem var(--spacing-base) var(--spacing-base);
  }

  .warp-overlay__close {
    top: var(--spacing-base);
    right: var(--spacing-base);
  }
}