/* Import Bricolage Grotesque font */
@font-face {
  font-family: "American Grotesk";
  src: url("../fonts/AmericanGrotesk-NormalHeavy.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Variables */
:root {
  --dark-bg: #0f0f0f;
  --dark-bg-alt: #151515;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-905: rgba(15, 15, 15, 0.8);
  --accent: #0084ff;
  --container-width: 1400px;
  --container-padding: 3rem;
  --text-spacing: 0.015em;
  --header-height: 180px;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: var(--gray-300);
  background: var(--dark-bg);
  font-weight: 400;
  overflow-x: hidden;
  letter-spacing: var(--text-spacing);
  min-height: 100%;
}

.scroll-container {
  position: relative;
}

.container {
  width: min(var(--container-width), 100% - (var(--container-padding) * 2));
  margin: 0 auto;
  position: relative;
}

section {
  padding: 160px 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  color: var(--gray-100);
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--gray-100);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Navbar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  transition: height 0.3s ease;
  display: flex;
  align-items: center;
}

nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background-color: rgba(15, 15, 15, 0.8);
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 15%,
    rgba(0, 0, 0, 0.9) 30%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.3) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 15%,
    rgba(0, 0, 0, 0.9) 30%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.3) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
  opacity: 0;
  z-index: -1;
}

nav.scrolled {
  height: 100px;
}

nav.scrolled::before {
  opacity: 1;
}

nav .container {
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  align-items: center;
  width: min(var(--container-width), 100% - (var(--container-padding) * 2));
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.wordmark {
  font-family: "American Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  /* text-transform: uppercase; */
  /* letter-spacing: 0.05em; */
  color: var(--gray-100);
}

/* Hero Section */
.hero {
  min-height: 95vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 8rem;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.wave-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 100px);
  z-index: -1;
  pointer-events: none;
}

.hero .container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
  z-index: 10;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  text-wrap: pretty;
  line-height: 1.1;
  margin: 0;
  padding: 0;
  max-width: 25ch;

  /* font-weight: 700; */
}

.cta-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.cta {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--gray-100);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cta:hover {
  background: #0072e2;
  color: white;
  transform: translateY(-2px);
}

.cta-secondary {
  color: var(--gray-400);
  font-size: 1rem;
  text-decoration: none;
}

/* Body Text Section */
.body-text {
  min-height: 100vh;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  color: var(--gray-400);
  position: relative;
  padding-top: 160px;
  z-index: 1;
}

.body-text::before {
  display: none;
}

.text-content {
  position: relative;
  z-index: 2;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.4;
  max-width: 48ch;
}

.text-content p {
  margin-bottom: 2.5rem;
  text-wrap: pretty;
  font-weight: 200;
}

/* Bio Section */
.bio {
  padding: 160px 0;
  background: var(--dark-bg);
}

.bio h2 {
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.05em;
  margin-bottom: 6rem;
  /* font-weight: 600; */
  color: var(--gray-400);
}

.team-members {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8rem;
}

.member-photo {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  margin-bottom: 3rem;
  overflow: hidden;
  border-radius: 8px;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.member p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-400);
  margin-bottom: 2rem;
}

/* Floating photos styles */
.floating-photo {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 2px solid var(--gray-800);
}

/* Contact Section */
.contact {
  padding: 160px 0;
  background: var(--dark-bg);
}

.contact h2 {
  font-size: 2rem;
  font-optical-sizing: auto;
  font-weight: 200;
  margin-bottom: 4rem;
  /* font-weight: 600; */
  color: var(--gray-400);
}

.contact form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-300);
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--gray-700);
  background: var(--gray-905);
  color: var(--gray-200);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--gray-700);
  background: var(--gray-905);
  color: var(--gray-200);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  resize: vertical;
  min-height: 150px;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact .cta {
  margin-top: 1rem;
  cursor: pointer;
}

/* Footer */
footer {
  background: var(--dark-bg);
  padding: 8rem 0 0 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}

footer .wordmark {
  -webkit-text-stroke: .4rem var(--gray-300); /* width and color */
  paint-order: stroke; /* <-- add this for ticker text stroke  */
  color: var(--dark-bg);
  opacity: 0.6;
  font-size: 12vw;
  line-height: 0.9;
  text-align: center;
  white-space: nowrap;
  font-weight: 900;
  /* letter-spacing: -0.02em; */
  transition: all 0.3s ease;
  user-select: none;
}

footer .wordmark:hover {
  -webkit-text-stroke: .4rem var(--gray-300); /* width and color */
  paint-order: stroke; /* <-- add this for ticker text stroke  */
  color: var(--gray-300);
  opacity: 0.6;
  font-size: 12vw;
  line-height: 0.9;
  text-align: center;
  white-space: nowrap;
  font-weight: 900;
}

/* Media Queries */
@media (max-width: 1024px) {
  .team-members {
    gap: 6rem;
  }

  section {
    padding: 120px 0;
  }
}

@media (max-width: 768px) {
  .bio {
    padding: 120px 0;
  }

  .bio h2 {
    margin-bottom: 4rem;
  }

  .team-members {
    grid-template-columns: 1fr;
    gap: 6rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 6vw, 3rem);
    line-height: 1.2;
  }

  .cta-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .text-content {
    font-size: clamp(1rem, 3vw, 1.25rem);
  }

  section {
    padding: 100px 0;
  }
}

@media (max-width: 480px) {
  .bio {
    padding: 100px 0;
  }

  .hero {
    padding-top: 6rem;
  }

  .bio h2,
  .contact h2 {
    margin-bottom: 3rem;
  }

  .team-members {
    gap: 4rem;
  }

  .member-photo {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
  }

  section {
    padding: 80px 0;
  }

  :root {
    --container-padding: 1.5rem;
  }
}

/* Character color transitions for scrolling text */
.char {
  transition: color 0.5s ease;
}

/* Underline Animation */
/* Removed .underline-animation and #price-word-anchor rules */

#price-svg-underline .stroke {
  stroke: var(--accent);
  stroke-width: 10; /* Thin line */
  stroke-dasharray: 487; /* Correct Path Length */
  stroke-dashoffset: 487; /* Start fully dashed */
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Keyframes remain the same, but animation call removed */
@keyframes underlineAnimation {
  from {
    stroke-dashoffset: 487;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Form Interaction Styling */
.form-interaction-area {
  position: relative; /* Context for absolute positioning */
  margin-top: 1rem;
  min-height: 48px; /* Match button height to prevent layout shift */
}

.form-interaction-area .cta {
  width: 100%;
  position: relative; /* Needed for spinner positioning */
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* Spinner styles */
.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none; /* Ensure hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Success Message styles */
.success-message {
  position: absolute; /* Take up same space as button */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #28a745; /* Success green */
  color: white;
  border-radius: 4px;
  font-weight: 500;
  display: none; /* Ensure hidden by default */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Loading State */
.form-interaction-area.loading .cta .button-text {
  opacity: 0;
  transition: opacity 0.3s ease; /* Add transition */
}

.form-interaction-area.loading .cta .spinner {
  display: block; /* Show spinner */
  opacity: 1;
}

.contact form.loading input,
.contact form.loading textarea,
.contact form.loading button {
  pointer-events: none;
  opacity: 0.7;
}

/* Success State */
.form-interaction-area.success .cta {
  opacity: 0;
  pointer-events: none;
}

.form-interaction-area.success .success-message {
  display: flex; /* Show success message */
  opacity: 1;
  pointer-events: auto;
}

/* Spinner Animation */
@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Form Status (for errors) */
#form-status {
  margin-top: 1rem;
  /* Add other styles as needed, e.g., font-size, text-align */
}

/* Old approach - kept for compatibility but hidden */
.section-transition-gradient {
  display: none;
}

/* New transition approach */
.section-transition {
  position: relative;
  height: 200px; /* Explicit height for transition area */
  width: 100%;
  margin-top: -50px; /* Pull up to overlap with hero */
  margin-bottom: -50px; /* Push down to overlap with body-text */
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 15, 0) 0%,
    rgba(15, 15, 15, 0.8) 40%,
    var(--dark-bg) 80%
  );
  z-index: 5;
  pointer-events: none;
}
