/* SDCEA — San Diego County Escrow Association
   Self-contained styles for the reels/feed page.
   Palette: warm paper, navy ink, coral accent · Fraunces display / Inter body */

:root {
  --paper: #f7fcff;
  --ink: #1a1f29;
  --navy: #143d63;
  --navy-soft: #51748f;
  --coral: #e8b75a;
  --coral-soft: #fff3d6;
  --rule: #e2e8ee;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(20, 61, 99, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
p { margin: 0 0 1rem; }
a { color: var(--navy); }
img, video { display: block; max-width: 100%; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; padding: .6rem 1rem; z-index: 20; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: rgba(247, 252, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.brand img { width: 52px; height: auto; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.04em; color: var(--navy);
}
.brand-text small { font-size: 0.7rem; color: var(--navy-soft); }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--navy-soft); }
.site-nav a:hover { color: var(--navy); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.2rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s;
}
.btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #0f2f4d; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.btn-row.center { justify-content: center; }

/* Hero with looping reel background */
.hero-reel {
  position: relative; min-height: 85svh;
  display: grid; place-items: center; text-align: center;
  overflow: hidden; color: #fff; padding: 6rem 1.5rem;
  background: #0b1722;
}
.hero-reel > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero-wash {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(8,30,51,.45), rgba(8,30,51,.78)),
    radial-gradient(circle at 50% 18%, rgba(232,183,90,.22), transparent 38%);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero-reel h1 { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero-reel p { color: rgba(255,255,255,.92); font-size: clamp(1.05rem, 2vw, 1.25rem); margin: 0 auto; max-width: 36ch; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700;
  font-size: 0.74rem; color: #ffdf9e; margin: 0 0 1rem;
}

/* Sections */
.section { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem 1.5rem; }
.section h2 { text-align: center; }
.section-intro {
  text-align: center; max-width: 56ch; margin: 0 auto 2.5rem; color: var(--navy-soft); font-size: 1.05rem;
}

/* Reels grid */
.reels-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
  max-width: 920px; margin: 0 auto;
}
.reel {
  position: relative; display: block; aspect-ratio: 4 / 5;
  border-radius: 1rem; overflow: hidden; background: #0b1722;
  border: 1px solid var(--rule); box-shadow: var(--shadow);
}
.reel img, .reel video {
  width: 100%; height: 100%; object-fit: cover; background: #0b1722;
}
.reel-play {
  position: absolute; inset: 0; margin: auto;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(20, 61, 99, 0.55);
  display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.reel-play::after {
  content: ""; width: 0; height: 0; margin-left: 4px;
  border-style: solid; border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}
.reel:hover .reel-play { background: var(--navy); transform: scale(1.07); }
.reel.is-playing .reel-play { display: none; }

/* Feed grid */
.posts-grid {
  display: grid; gap: 0.85rem;
  grid-template-columns: repeat(4, 1fr);
}
.posts-grid a {
  display: block; border-radius: 0.85rem; overflow: hidden; border: 1px solid var(--rule);
  box-shadow: 0 8px 24px rgba(20,61,99,.08);
}
.posts-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .35s ease; }
.posts-grid a:hover img { transform: scale(1.04); }
.ig-cta { text-align: center; margin-top: 2.5rem; }

#about { text-align: center; }
#about .section-intro { margin-bottom: 0.5rem; }

/* Footer */
.foot {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding: 2.5rem 1.5rem; border-top: 1px solid var(--rule);
  color: var(--navy-soft); font-size: 0.9rem;
}
.foot strong { color: var(--navy); }

@media (max-width: 640px) {
  .site-nav { display: none; }
  .hero-reel { min-height: 80svh; padding: 5rem 1.25rem; }
  .section { padding: 3.5rem 1.25rem; }
  .reels-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 38px; padding: 9px; background: none; border: 0; cursor: pointer; margin-left: auto;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-header { flex-wrap: wrap; row-gap: 0; }
  .site-header.open .site-nav {
    display: flex; flex-direction: column; gap: 0.15rem; flex-basis: 100%; order: 3;
    margin-top: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--rule);
  }
  .site-header.open .site-nav a { padding: 0.6rem 0.3rem; font-size: 1rem; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Contact form */
.contact-form { max-width: 520px; margin: 0 auto; text-align: left; }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; font-size: 0.95rem; padding: 0.7rem 0.85rem; margin-bottom: 0.7rem; background: #fff; border: 1px solid var(--rule); border-radius: 0.6rem; color: var(--navy); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #8aa0b3; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--navy); }
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form .cf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-form button { width: 100%; cursor: pointer; }
.cf-status { font-size: 0.85rem; margin: 0.7rem 0 0; text-align: center; color: var(--navy-soft); min-height: 1.1em; }
.cf-status.ok { color: #2f7a3f; } .cf-status.err { color: #b3402a; }
.cf-alt { text-align: center; font-size: 0.9rem; color: var(--navy-soft); margin-top: 1.1rem; }
@media (max-width: 560px) { .contact-form .cf-row { grid-template-columns: 1fr; } }
