/* Custom styles for Volary marketing site */

/* Critical styles loaded first to prevent FOUC */
html,
body {
  margin: 0;
  padding: 0;
  background: #fefefe;
  color: #374151;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* CSS Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition:
    background-color 200ms ease-in-out,
    border-color 200ms ease-in-out,
    color 200ms ease-in-out,
    transform 200ms ease-in-out;
}

/* Background overlay for main content - only on homepage */
body.homepage main {
  position: relative;
}

body.homepage main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("background.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top center;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Ensure content appears above background on homepage */
body.homepage main > section {
  position: relative;
  z-index: 1;
}

/* Typography and base styles */
body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.7;
  letter-spacing: -0.025em;
  background: #fefefe; /* Slightly warmer than pure white */
  color: #374151; /* Softer than black */
  min-height: 100vh;
}

h1,
h2,
h3 {
  letter-spacing: -0.05em;
  font-weight: 300;
}

h1 {
  font-size: 4rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

/* Layout utilities */
.max-w-7xl {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-16 {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.py-24 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* Color utilities - Softer palette */
.text-racing-green {
  color: #1d5019; /* Match logo green RGB(29,80,25) */
}

.text-racing-green-light {
  color: #2d6b28;
}

.bg-racing-green {
  background-color: #1d5019; /* Match logo green RGB(29,80,25) */
}

.bg-racing-green-light {
  background-color: #2d6b28;
}

.bg-racing-green-dark {
  background-color: #0f3a0c; /* Darker logo green */
}

.text-gray-600 {
  color: #6b7280; /* Warmer gray */
}

.text-gray-500 {
  color: #9ca3af;
}

.text-gray-900 {
  color: #374151; /* Softer than pure black */
}

.text-white {
  color: white;
}

.bg-white {
  background-color: #fefefe; /* Slightly warmer than pure white */
}

/* Border utilities - Softer borders */
.border-b {
  border-bottom: 1px solid #f3f4f6; /* Much lighter border */
}

.border-l {
  border-left: 1px solid #f3f4f6;
}

.border-t {
  border-top: 1px solid #f3f4f6;
}

.border-gray-200 {
  border-color: #f3f4f6; /* Softer border color */
}

.border-racing-green {
  border-color: #1d5019; /* Match logo green RGB(29,80,25) */
}

/* Layout utilities */
.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

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

.grid {
  display: grid;
}

.md\\:grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-16 {
  gap: 4rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-x-6 > * + * {
  margin-left: 1.5rem;
}

.space-x-8 > * + * {
  margin-left: 2rem;
}

/* Text utilities */
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-7xl {
  font-size: 4.5rem;
  line-height: 1;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.font-bold {
  font-weight: 700;
}

.font-light {
  font-weight: 300;
}

.leading-tight {
  line-height: 1.25;
}

.leading-relaxed {
  line-height: 1.625;
}

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

/* Spacing utilities */
.mb-8 {
  margin-bottom: 2rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.pb-16 {
  padding-bottom: 4rem;
}

.pl-8 {
  padding-left: 2rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Display utilities */
.hidden {
  display: none;
}

.inline-block {
  display: inline-block;
}

.min-h-screen {
  min-height: 100vh;
}

/* Sizing utilities */
.w-12 {
  width: 3rem;
}

.h-px {
  height: 1px;
}

/* Button and link styles */
.inline-block {
  padding: 0.75rem 2rem;
  text-decoration: none;
  display: inline-block;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

button {
  transition: all 0.2s ease;
}

a {
  text-decoration: none;
}

nav a {
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  line-height: 1;
}

nav a:hover {
  color: #1d5019; /* Match logo green RGB(29,80,25) */
}

/* Enhanced hover states */
.inline-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 80, 25, 0.2);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 80, 25, 0.2);
}

/* Specific button hover states to override any conflicts */
a.inline-block.border.border-racing-green:hover {
  background-color: #1d5019 !important;
  color: white !important;
}

/* Media queries */
@media (min-width: 768px) {
  .md\\:flex {
    display: flex;
  }

  .md\\:text-7xl {
    font-size: 4.5rem;
    line-height: 1;
  }

  .md\\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hidden {
    display: none !important;
  }

  .border-l {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    padding-left: 0;
    padding-top: 2rem;
    margin-top: 2rem;
  }

  /* Ensure all feature articles have consistent spacing on mobile */
  .grid article:not(:first-child) {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    padding-left: 0;
    padding-top: 2rem;
    margin-top: 2rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  .grid {
    gap: 2rem;
  }

  /* Mobile header adjustments */
  nav.flex {
    font-size: 0.875rem;
  }

  nav .space-x-8 > * + * {
    margin-left: 1rem;
  }
}

/* Accessibility utilities */
.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;
}

.focus\\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip navigation styling */
.focus\\:absolute:focus {
  position: absolute;
}

.focus\\:top-4:focus {
  top: 1rem;
}

.focus\\:left-4:focus {
  left: 1rem;
}

.focus\\:z-50:focus {
  z-index: 50;
}

.z-50 {
  z-index: 50;
}

/* Focus states for accessibility */
a:focus,
button:focus,
.inline-block:focus {
  outline: 2px solid #1b4d3e;
  outline-offset: 2px;
}

/* Enhanced focus states for better visibility */
input:focus,
textarea:focus {
  outline: 2px solid #1b4d3e;
  outline-offset: 2px;
}

/* Ensure interactive elements have minimum touch target size */
button,
a,
input[type="submit"] {
  min-height: 44px;
  min-width: 44px;
}

/* Footer logo button styling */
#scroll-to-top {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  min-height: auto;
  min-width: auto;
}

#scroll-to-top:hover {
  transform: none;
  box-shadow: none;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-content {
  background: #fefefe;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-overlay.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 2rem 2rem 1rem 2rem;
  position: relative;
}

.modal-body {
  padding: 0 2rem 2rem 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #6b7280;
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #0f3a0c;
}

/* Form styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

input[type="email"],
input[type="text"] {
  border-radius: 0;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
}

input[type="email"]:focus,
input[type="text"]:focus {
  box-shadow: 0 0 0 3px rgba(29, 80, 25, 0.1);
  border-color: #1d5019;
}

/* Utility classes for modal */
.w-full {
  width: 100%;
}

.block {
  display: block;
}

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

.font-medium {
  font-weight: 500;
}

.w-16 {
  width: 4rem;
}

.h-16 {
  height: 4rem;
}

.disabled\\:opacity-50:disabled {
  opacity: 0.5;
}

.disabled\\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}
