/* ============================================================================
   Meridian Cayman Partners — stylesheet
   Palette: deep navy (trust/premium) + teal accent (Caribbean, professional)
   ============================================================================ */

:root {
  --color-navy: #0b2f4d;
  --color-navy-dark: #071f34;
  --color-teal: #14a897;
  --color-teal-dark: #0e8577;
  --color-bg: #fbfcfd;
  --color-surface: #ffffff;
  --color-border: #e6eaee;
  --color-text: #1b2733;
  --color-text-muted: #5b6b7a;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1140px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(11, 47, 77, 0.06);
  --shadow-md: 0 8px 30px rgba(11, 47, 77, 0.08);
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
[hidden] { display: none !important; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Reveal-on-scroll animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-primary {
  background: var(--color-teal);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(20, 168, 151, 0.35);
}
.btn-primary:hover {
  background: var(--color-teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(20, 168, 151, 0.4);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 252, 253, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}
.site-nav ul {
  display: flex;
  gap: 8px;
}
.site-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}
.site-nav a:hover,
.site-nav a.active {
  background: rgba(20, 168, 151, 0.1);
  color: var(--color-teal-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 140px 0 180px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7f8 100%);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  text-align: left;
}
.eyebrow {
  color: var(--color-teal-dark);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin-bottom: 20px;
  line-height: 1.1;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  color: var(--color-navy);
  opacity: 0.85;
  margin-bottom: 16px;
}
.hero-subtext {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  color: rgba(20, 168, 151, 0.08);
  pointer-events: none;
}
.hero-backdrop svg { width: 100%; height: 100%; }

/* ---------- Section shared ---------- */
.section { padding: 110px 0; }
.section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin-bottom: 16px;
}
.section-subheading {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin-bottom: 56px;
}

/* ---------- About ---------- */
.about { background: var(--color-surface); }
.about-text {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 56px;
}
.about-text p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  border-top: 1px solid var(--color-border);
  padding-top: 40px;
}
.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-teal-dark);
  letter-spacing: -0.02em;
}
.stat-label {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-top: 6px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 168, 151, 0.35);
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(20, 168, 151, 0.1);
  color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 22px; height: 22px; }
.service-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
}
.service-description {
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

/* ---------- Contact ---------- */
.contact { background: var(--color-surface); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-navy);
}
.form-row input,
.form-row textarea {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.96rem;
  background: #ffffff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(20, 168, 151, 0.15);
}
.form-status {
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.success { color: var(--color-teal-dark); }
.form-status.error { color: #c0392b; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-item { display: flex; flex-direction: column; gap: 6px; }
.contact-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-teal-dark);
}
address { font-style: normal; color: var(--color-text-muted); }
.contact-item a {
  color: var(--color-text);
  transition: color var(--transition);
}
.contact-item a:hover { color: var(--color-teal-dark); }
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 4 / 3;
}
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffffff;
}
.footer-tagline {
  font-size: 0.9rem;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}
.footer-contact a:hover { color: #ffffff; }
.footer-copyright {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  width: 100%;
  text-align: center;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .site-nav.open { max-height: 400px; }
  .site-nav ul {
    flex-direction: column;
    padding: 12px 24px 20px;
    gap: 4px;
  }
  .site-nav a { padding: 12px 16px; }
  .hero { padding: 110px 0 120px; text-align: center; }
  .hero-inner { margin: 0 auto; }
  .hero-subtext { margin-left: auto; margin-right: auto; }
  .eyebrow { text-align: center; }
  .section { padding: 80px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-contact { align-items: center; }
}

@media (max-width: 480px) {
  .contact-form { padding: 24px; }
}
