/* shared.css — Stone Harbor Insurance Agency
   Common polish applied site-wide. Page <style> blocks override as needed. */

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Accessible focus ring — visible only for keyboard nav */
:focus-visible {
  outline: 2.5px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Hide focus ring for mouse users */
:focus:not(:focus-visible) { outline: none; }

::selection { background: rgba(212,130,26,0.22); color: #1A2840; }
:root {
  --navy: #0B2D5E; --navy-dark: #071D3E; --navy-light: #1A4080;
  --amber: #D4821A; --amber-light: #F5A63C; --amber-dim: rgba(212,130,26,0.12);
  --teal: #1D7A8C; --teal-light: #2A9BAF;
  --cream: #F8F6F1; --blue-light: #EFF4FB;
  --text-dark: #1A2840; --text-muted: #5A6B80;
  --white: #FFFFFF;
  --card-shadow: 0 4px 24px rgba(11,45,94,0.10);
  --card-shadow-hover: 0 16px 48px rgba(11,45,94,0.18);
  --glow-amber: 0 0 40px rgba(212,130,26,0.25);
  --transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--amber), var(--amber-light)); z-index: 9999; width: 0%; transition: width 0.1s linear; pointer-events: none; }

/* NAV */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(11,45,94,0.08);
  transition: box-shadow 0.3s, background 0.3s;
}
.site-nav.scrolled { box-shadow: 0 4px 24px rgba(11,45,94,0.10); background: rgba(255,255,255,0.98); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; gap: 2rem; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.95rem; color: var(--navy); white-space: nowrap; transition: opacity 0.2s; text-decoration: none; }
.nav-logo:hover { opacity: 0.85; }
.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a { font-family: 'Inter', sans-serif; font-weight: 500; color: var(--text-dark); font-size: 0.95rem; position: relative; padding-bottom: 2px; transition: color 0.2s; text-decoration: none; }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--amber); border-radius: 2px; transition: width 0.25s ease; }
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--amber); }
.nav-links a.active::after { width: 100%; background: var(--amber); }
.btn-nav-cta {
  background: var(--navy); color: #fff; padding: 0.6rem 1.4rem;
  border-radius: 8px; font-family: 'Outfit', sans-serif; font-weight: 600;
  font-size: 0.9rem; cursor: pointer; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: background 0.25s, transform 0.18s, box-shadow 0.25s;
  box-shadow: 0 2px 8px rgba(11,45,94,0.20); text-decoration: none; display: inline-block;
}
.btn-nav-cta::before { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent); transition: left 0.5s ease; }
.btn-nav-cta:hover { background: var(--amber); box-shadow: var(--glow-amber); transform: translateY(-1px); color: #fff; }
.btn-nav-cta:hover::before { left: 150%; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: rgba(255,255,255,0.98); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(11,45,94,0.1); padding: 1rem 2rem; z-index: 99; gap: 0.25rem; box-shadow: 0 8px 24px rgba(11,45,94,0.12); }
.mobile-menu a { font-family: 'Outfit', sans-serif; font-weight: 600; color: var(--text-dark); padding: 0.65rem 0; border-bottom: 1px solid rgba(11,45,94,0.06); transition: color 0.2s; text-decoration: none; }
.mobile-menu a:hover { color: var(--amber); }
.mobile-menu.active { display: flex; }

/* BUTTONS */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--navy); color: #fff; padding: 0.9rem 2rem; border-radius: 8px; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; position: relative; overflow: hidden; transition: background 0.25s, transform 0.18s, box-shadow 0.25s; box-shadow: 0 4px 16px rgba(11,45,94,0.25); text-decoration: none; }
.btn-primary::before { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.13), transparent); transition: left 0.55s ease; }
.btn-primary:hover { background: var(--navy-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(11,45,94,0.30); color: #fff; }
.btn-primary:hover::before { left: 150%; }
.btn-amber { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--amber); color: #fff; padding: 0.9rem 2rem; border-radius: 8px; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; position: relative; overflow: hidden; transition: background 0.25s, transform 0.18s, box-shadow 0.25s; box-shadow: 0 4px 16px rgba(212,130,26,0.30); text-decoration: none; }
.btn-amber::before { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent); transition: left 0.55s ease; }
.btn-amber:hover { background: var(--amber-light); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212,130,26,0.38); }
.btn-amber:hover::before { left: 150%; }
.btn-outline { display: inline-flex; align-items: center; gap: 0.5rem; background: transparent; color: var(--navy); padding: 0.85rem 2rem; border-radius: 8px; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1rem; border: 2px solid var(--navy); cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.18s, box-shadow 0.25s; text-decoration: none; }
.btn-outline:hover { background: var(--navy); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(11,45,94,0.20); }

/* FORMS */
input:focus, textarea:focus, select:focus { border-color: var(--amber) !important; box-shadow: 0 0 0 3px rgba(212,130,26,0.12) !important; outline: none; }

/* FOOTER */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 4.5rem 2rem 0; border-top: 3px solid var(--amber); }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; padding-bottom: 3rem; }
.footer-logo { display: flex; align-items: center; gap: 0.75rem; font-family: 'Outfit', sans-serif; font-weight: 700; color: #fff; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-tagline { font-size: 0.9rem; color: rgba(255,255,255,0.45); font-style: italic; }
.footer-col h4 { font-family: 'Outfit', sans-serif; font-weight: 700; color: #fff; margin-bottom: 1.25rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { color: rgba(255,255,255,0.55); font-size: 0.9rem; transition: color 0.2s, transform 0.2s; display: inline-block; text-decoration: none; }
.footer-col ul li a:hover { color: var(--amber-light); transform: translateX(4px); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { color: rgba(255,255,255,0.35); transition: color 0.2s; text-decoration: none; }
.footer-bottom-links a:hover { color: var(--amber-light); }

/* SCROLL REVEAL */
.reveal { }
.reveal-active { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); will-change: opacity, transform; }
.reveal-active.revealed { opacity: 1; transform: translateY(0); will-change: auto; }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }

/* EYEBROW + HEADING */
.eyebrow { font-family: 'Outfit', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; color: var(--teal); text-transform: uppercase; }
.section-heading { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 2.2rem; color: var(--text-dark); margin-bottom: 1rem; }
.section-heading span { background: linear-gradient(135deg, var(--amber), var(--amber-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: block; }

/* IMAGE PHOTO-FRAME TREATMENT — refined white-border photo print style */
.scene-card { position: relative; }
.scene-card img {
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  border-radius: 14px;
  border: 5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08), 0 14px 48px rgba(11,45,94,0.20), 0 0 0 1px rgba(11,45,94,0.06);
  display: block; width: 100%;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.scene-card:hover img {
  transform: scale(1.02);
  box-shadow: 0 4px 10px rgba(0,0,0,0.10), 0 24px 64px rgba(11,45,94,0.26), 0 0 0 1px rgba(11,45,94,0.08);
}
/* Agent portrait cards (circular) — keep their own border style */
.agent-card-img {
  border: 3px solid rgba(212,130,26,0.5) !important;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.1), 0 8px 32px rgba(11,45,94,0.18) !important;
}

/* FLOAT ANIMATION */
/* Rotate removed — subpixel rendering from rotate() causes compositor shimmer */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floating-quote, .floating-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 32px rgba(11,45,94,0.18), 0 2px 8px rgba(11,45,94,0.08);
  border-radius: 14px; animation: float 5s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* MARQUEE */
.marquee-track {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.marquee-track:hover { animation-play-state: paused; }
.carrier-logo { height: 38px; width: auto; filter: grayscale(100%) opacity(0.45); transition: filter 0.35s; flex-shrink: 0; }
.carrier-logo:hover { filter: grayscale(0%) opacity(1); }

/* GLOBAL IMAGE SAFETY — prevent any image from overflowing its container */
img { max-width: 100%; height: auto; }

/* RESPONSIVE */
/* Floating overlay cards are desktop-only — hide when layout goes single-column */
@media (max-width: 900px) {
  .floating-quote, .floating-card { display: none !important; }
}
@media (max-width: 768px) {
  .nav-links, .btn-nav-cta { display: none; }
  .hamburger { display: flex; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  /* Step connectors are between-card decorations — irrelevant in single-column */
  .step-connector { display: none; }
}
@media (max-width: 480px) { .footer-container { grid-template-columns: 1fr; } }
