/* ============================================
   Diridium Technologies - Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand colors */
  --primary: #c8102e;
  --primary-light: #e63946;
  --primary-dark: #8c0a1f;
  --navy: #0f172a;
  --navy-light: #1e293b;
  --slate: #334155;
  --slate-light: #64748b;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --white: #ffffff;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-width: 1200px;
  --container-padding: 0 1.5rem;

  /* Transitions */
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--slate);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Utility --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: var(--section-padding);
}

.section--gray {
  background: var(--gray-50);
}

.section--navy {
  background: var(--navy);
  color: var(--gray-200);
}

.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-header p {
  color: var(--slate-light);
  font-size: 1.125rem;
  margin-top: 1rem;
}

.section--navy .section-header p {
  color: var(--gray-300);
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn--primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn--white:hover {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.nav__logo:hover {
  color: var(--navy);
}

.nav__logo svg {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--navy);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--slate);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--navy);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__cta {
  margin-left: 0.5rem;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

.nav__toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 5rem;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__links a {
    display: block;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav__links a::after {
    display: none;
  }

  .nav__cta {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Hero --- */
.hero {
  padding: 10rem 0 6rem;
  background: url('../images/caribe.jpg') center center / cover no-repeat;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.82) 50%, rgba(15, 40, 71, 0.85) 100%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(to top, var(--white), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--primary-light);
}

.hero__sub {
  font-size: 1.25rem;
  color: var(--gray-300);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  position: relative;
}


.service-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--gray-100);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--navy);
}

.service-card__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.service-card h3 {
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--slate-light);
  font-size: 0.9375rem;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate);
}

.tag--lg {
  font-size: 0.9375rem;
  padding: 0.5rem 1rem;
}

.tag--filled {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

@media (max-width: 968px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* --- CTA Banner --- */
.cta-banner {
  text-align: center;
  padding: 5rem 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: 1.5rem;
  margin: 0 1.5rem;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 1rem;
  position: relative;
}

.cta-banner p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-banner .btn {
  position: relative;
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info__icon {
  width: 3rem;
  height: 3rem;
  background: var(--gray-100);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
}

.contact-info__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.contact-info__item h4 {
  margin-bottom: 0.25rem;
}

.contact-info__item p {
  color: var(--slate-light);
  font-size: 0.9375rem;
}

.contact-form-wrapper {
  background: var(--gray-50);
  border-radius: 1rem;
  padding: 2.5rem;
  border: 1px solid var(--gray-200);
}

.contact-form__honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__row {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.contact-form__row label {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact-form__turnstile {
  margin-bottom: 1.25rem;
}

.contact-form button[type="submit"] {
  margin-top: 0.5rem;
}

.contact-form__status {
  margin-top: 1rem;
  font-size: 0.9375rem;
  min-height: 1.25rem;
}

.contact-form__status--ok {
  color: var(--primary);
}

.contact-form__status--error {
  color: #b91c1c;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: var(--gray-300);
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  margin-top: 1rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--slate-light);
}

.footer h4 {
  color: var(--white);
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: 0.75rem;
}

.footer__links a {
  color: var(--slate-light);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--slate-light);
}

.footer__bottom a {
  color: var(--slate-light);
}

.footer__bottom a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  padding: 2rem;
  text-align: center;
}

.value-card__icon {
  width: 4rem;
  height: 4rem;
  background: var(--gray-100);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  margin: 0 auto 1.5rem;
}

.value-card__icon svg {
  width: 2rem;
  height: 2rem;
}

.value-card p {
  color: var(--slate-light);
  font-size: 0.9375rem;
}

@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Page Headers (inner pages) --- */
.page-header {
  padding: 10rem 0 4rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  color: var(--gray-300);
  max-width: 640px;
}

/* --- Prose Content (privacy, etc.) --- */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--slate);
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  color: var(--slate);
}

.prose strong {
  color: var(--navy);
}

/* --- Feature List --- */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--navy);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.two-col.two-col--principal {
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .two-col.two-col--principal {
    grid-template-columns: 1fr;
  }
}

/* --- EHR Grid --- */
.ehr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.ehr-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
}


.ehr-item svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--navy);
  flex-shrink: 0;
}

/* --- Capabilities (dark editorial rows) --- */
.capabilities {
  display: flex;
  flex-direction: column;
}

.capability {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding: 2.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.capability:first-child {
  border-top: none;
  padding-top: 0;
}

.capability:last-child {
  padding-bottom: 0;
}

.capability h3 {
  font-size: 1.375rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.capability__desc {
  color: var(--gray-300);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
}

.capability__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section--navy .tag {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--gray-200);
}

@media (max-width: 768px) {
  .capability {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.75rem 0;
  }
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children */
.stagger > .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-up:nth-child(2) { transition-delay: 0.1s; }
.stagger > .fade-up:nth-child(3) { transition-delay: 0.2s; }
.stagger > .fade-up:nth-child(4) { transition-delay: 0.3s; }
.stagger > .fade-up:nth-child(5) { transition-delay: 0.4s; }
.stagger > .fade-up:nth-child(6) { transition-delay: 0.5s; }

/* --- Responsive Hero --- */
@media (max-width: 768px) {
  .hero {
    padding: 8rem 0 4rem;
  }

  .hero__sub {
    font-size: 1.1rem;
  }

  .section {
    padding: 4rem 0;
  }
}

