:root {
  --primary: #ed2324;
  --secondary: #be2026;
  --accent: #650e10;
  --black: #0d0c0d;
  --white: #ffffff;
  --intro-bg: #f3dcb3;
}

.color-lines {
  visibility: hidden;
}
.intro-content {
  visibility: hidden;
}

/* Fallback fonts while loading */
body {
  font-family: Tahoma, sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: sans-serif;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Helvetica Neue", sans-serif;
}

body {
  font-family: "Tahoma", sans-serif;
  background-color: var(--white);
  color: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-trigger,
.nav-item,
.nav-logo,
.contact-form button {
  font-family: "Inria Sans", sans-serif;
}

h2 {
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
}

.section-trigger {
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea,
.contact-form button {
  font-family: "Tahoma", sans-serif;
}

.nav-item {
  font-family: "Inria Sans", sans-serif;
  font-weight: 400;
}

.project-title {
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
}

.project-category {
  font-family: "Inria Sans", sans-serif;
  font-weight: 400;
}

/* Floating Navigation */
.floating-nav {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submarket-logo {
  height: 25px;
  width: auto;
  transition: all 0.3s ease;
}

.nav-logo:hover .submarket-logo {
  opacity: 0.8;
  transform: scale(1.05);
}

.nav-item {
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  opacity: 0.7;
}

.nav-item:hover {
  opacity: 1;
  color: var(--primary);
}

.nav-item.active {
  opacity: 1;
  color: var(--primary);
  font-weight: 600;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-item.active::after {
  opacity: 1;
}

/* Intro Animation */
.intro {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.color-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.line {
  height: 33.33%;
  width: 100%;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-100%);
}

.line-primary {
  background: var(--primary);
  animation: fadeIn 0.1s ease-out forwards, slideInLeft 1.5s ease-out forwards;
}

.line-secondary {
  background: var(--secondary);
  animation: fadeIn 0.1s ease-out 0.3s forwards,
    slideInLeft 1.5s ease-out 0.3s forwards;
}

.line-accent {
  background: var(--accent);
  animation: fadeIn 0.1s ease-out 0.6s forwards,
    slideInLeft 1.5s ease-out 0.6s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: 50vw;
  max-width: 300px;
  height: auto;
}

/* Main Content */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 10;
}

.section {
  margin-bottom: 6rem;
  scroll-margin-top: 100px;
}

.section-trigger {
  font-size: 10vw;
  font-weight: 900;
  line-height: 0.85;
  margin: 2rem 0;
  position: relative;
  z-index: 1;
  color: rgba(237, 35, 36, 0.1);
  -webkit-text-stroke: 1px var(--primary);
  text-transform: uppercase;
  letter-spacing: -0.5vw;
  text-align: right;
  width: 100%;
  font-family: "Inter", sans-serif;
}

.section-content {
  padding: 2rem;
  border-left: 3px solid var(--primary);
  margin-bottom: 2rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

/* About Section with Landscape Headshot */
.about-container {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.about-content {
  flex: 1;
}

.headshot-container {
  flex: 1;
  min-width: 0;
}

.headshot {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  aspect-ratio: 16/9;
  object-fit: fill;
}

/* Process Grid */
.process-grid {
  flex: 1;
  min-width: 300px;
}

.process-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.process-item {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.process-item:hover {
  background: rgba(237, 35, 36, 0.05);
  border-left: 3px solid var(--primary);
  transform: translateY(-5px);
}

.process-icon {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 1rem;
}

.process-item h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.process-item p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(237, 35, 36, 0.1);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(246, 246, 246, 0.9) 75%,
    transparent 150%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.project-category {
  font-size: 1rem;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 2px;
  transform: translateY(20px);
  transition: transform 0.3s ease 0.1s;
}

.project-card:hover .project-title,
.project-card:hover .project-category {
  transform: translateY(0);
}

/* Project Modal */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 100;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  overflow-y: auto;
}

.project-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  width: 100%;
  padding: 2rem;
  order: 1;
}

.modal-gallery {
  width: 100%;
  order: 2;
}

/* Ownership line inside modal: smaller, italic, similar h3 format but subtler */
.modal-content .modal-ownership {
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  color: rgba(0,0,0,0.65);
  margin-top: 0.4rem;
}

.modal-close {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--black);
  z-index: 101;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
  background: var(--primary);
  color: var(--white);
}

/* Contact Form */
.contact-container {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.contact-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 300px;
}

.contact-form input,
.contact-form textarea {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-size: 1rem;
  background: var(--white);
  color: var(--black);
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-left: 3px solid var(--primary);
  background: var(--white);
}

.contact-form button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.contact-form button:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(237, 35, 36, 0.2);
}

/* Social Links */
.social-links {
  display: flex;
  margin-top: 2rem;
  gap: 1rem;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--black);
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-5px);
}

/* Form Status Styles */
.form-status {
  margin: 1rem 0 0;
  padding: 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 20px;
}

.form-status.pending {
  color: #0066cc;
  background-color: rgba(0, 102, 204, 0.1);
}

.form-status.success {
  color: #008000;
  background-color: rgba(0, 128, 0, 0.1);
}

.form-status.error {
  color: #cc0000;
  background-color: rgba(204, 0, 0, 0.1);
}

button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Footer Styles */
footer {
  position: relative;
  padding: 4rem 0 2rem;
  text-align: center;
  background: var(--white);
}

.footer-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  display: flex;
  flex-direction: column;
}

.footer-line {
  height: 4px;
  width: 100%;
}

.footer-line-primary {
  background: var(--primary);
}
.footer-line-secondary {
  background: var(--secondary);
}
.footer-line-accent {
  background: var(--accent);
}

.footer-content p {
  color: rgba(0, 0, 0, 0.35);
  font-size: 0.9rem;
  margin: 0 auto;
  max-width: none;
}

/* Desktop Styles */
@media (min-width: 769px) {
  .project-modal {
    flex-direction: row;
  }

  .modal-content {
    width: 40%;
    padding: 4rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .modal-gallery {
    width: 60%;
    height: 100vh;
    overflow-y: auto;
  }

  .modal-close {
    top: 2rem;
    right: 2rem;
    bottom: auto;
    left: auto;
    transform: none;
    width: 50px;
    height: 50px;
  }

  h2 {
    font-size: 3rem;
  }

  p {
    font-size: 1.1rem;
  }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .floating-nav {
    padding: 0.8rem 1.2rem;
    gap: 1.2rem;
  }

  .submarket-logo {
    height: 26px;
  }

  .nav-item {
    font-size: 0.9rem;
  }

  .hero-logo {
    width: 90vw;
    max-width: 400px;
  }

  .section-trigger {
    font-size: 15vw;
    letter-spacing: -0.2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    height: 300px;
  }

  .about-container {
    flex-direction: column;
  }

  .headshot-container {
    margin-top: 2rem;
  }

  .process-items {
    grid-template-columns: 1fr;
  }

  /* Fix for modal title being blocked by navbar */
  .project-modal .modal-content {
    padding-top: 80px;
  }

  .modal-close {
    top: 1rem;
    bottom: auto;
    background: var(--primary);
    color: white;
  }
}

/* reCAPTCHA Styling */
.g-recaptcha {
  margin: 1.5rem 0;
  transform: scale(0.9);
  transform-origin: left;
}

@media (max-width: 768px) {
  .g-recaptcha {
    transform: scale(0.8);
    margin: 1.2rem 0;
  }

  .form-status {
    font-size: 0.85rem;
  }
}

.section-content {
  padding: 2rem;
  border-left: 3px solid var(--primary); /* Restored border */
  margin-bottom: 2rem;
}

.about-container {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.headshot-container {
  flex: 0 0 40%; /* Reduced width */
  max-width: 500px; /* Added max-width */
}

.headshot {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  aspect-ratio: 5/4; /* Landscape ratio */
  object-fit: cover;
}

/* Process Grid Corrections */
.process-item {
  background: rgba(0, 0, 0, 0.03); /* Lighter background */
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.process-item:hover {
  background: rgba(237, 35, 36, 0.03); /* More subtle hover */
  border-left: 3px solid var(--primary);
}

/* Remove GSAP opacity animation */
.process-item {
  opacity: 1 !important;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
  }

  .headshot-container {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin-top: 2rem;
  }
}

/* Show default pointer cursor for clickable elements */
a,
button,
[onclick],
[role="button"],
.clickable,
.project-card,
.nav-item {
  cursor: pointer !important;
}

.modal-active .floating-nav {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Add to your existing CSS */
body.modal-active #intro-section {
  display: none !important;
}

/* Ensure intro is visible by default when not in modal */
#intro-section {
  display: flex !important;
}

/* Share Button Styles */
.modal-share {
  position: relative;
  margin: 1rem 0 2rem;
}

.share-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 35, 36, 0.2);
}

.share-button:active {
  transform: translateY(0);
}

.share-confirmation {
  position: absolute;
  left: 0;
  top: 100%;
  color: var(--primary);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0.5rem 0;
}

/* Icon adjustment */
.share-button i {
  font-size: 0.9em;
}

.video-container {
  height: 0;
  overflow: hidden;
}

.video-container video {
  border-radius: 8px;
  object-fit: cover; /* optional but recommended */
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Add to your CSS */
.figma-button {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-left: 0.5rem;
}

.figma-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 35, 36, 0.2);
}

.figma-button:active {
  transform: translateY(0);
}

/* Font Awesome Figma icon */
.fab.fa-figma {
  font-size: 1.1em;
}

.modal-share {
  margin: 1rem 0 2rem;
  position: relative;
}

.button-group {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.figma-button {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

/* Hover and active states */
.figma-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 35, 36, 0.2);
}

.figma-button:active {
  transform: translateY(0);
}

/* Size matching */
.share-button,
.figma-button {
  height: 44px;
  box-sizing: border-box;
}

/* Update your CSS */
.modal-share {
  margin: 1rem 0 2rem;
  position: relative;
}

.button-group {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.figma-button {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
  font-size: 0.9rem; /* Match share button size */
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  text-align: center;
}

.figma-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 35, 36, 0.2);
}

.figma-button:active {
  transform: translateY(0);
}

/* Ensure share button and Figma button have same height */
.share-button,
.figma-button {
  height: 44px; /* Adjust as needed */
  box-sizing: border-box;
}

/* Adjust share confirmation position */
.share-confirmation {
  position: absolute;
  left: 0;
  top: calc(100% + 0.5rem);
  color: var(--primary);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0.5rem 0;
}

/* Share Button - Red by default, white on hover */
.share-button {
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
  /* rest of your existing button styles */
}

.share-button:hover {
  background: white;
  color: var(--primary);
  /* keep the other hover effects */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 35, 36, 0.2);
}

/* Figma Button - White by default, red on hover */
.figma-button {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  /* rest of your existing button styles */
}

.figma-button:hover {
  background: var(--primary);
  color: white;
  /* keep the other hover effects */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237, 35, 36, 0.2);
}

/* Shared button styles */
.share-button,
.figma-button {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-family: "Inria Sans", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  height: 44px;
  box-sizing: border-box;
}

.modal-share {
  margin: 1rem 0 2rem;
}
  
.button-group {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
  
.share-wrapper {
  position: relative;
  display: inline-block;
}
  
.share-confirmation {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
  z-index: 10;
}
  
.share-confirmation.visible {
  opacity: 1;
  visibility: visible;
  bottom: -35px;
}

/* ===== Unified Modal Image Loading ===== */
.modal-gallery img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.modal-gallery video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #f4f4f4;
}

.modal-gallery img.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Shimmer effect for unloaded images */
.modal-gallery img[data-src] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  min-height: 300px; /* Reserves space to prevent layout shift */
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}