/* ==============================================
   Safety Savvy Co. — warm editorial design system
   Palette: terracotta + clay on cream paper
============================================== */

:root {
  --cream:      #FBF6EF;
  --sand:       #F2E8DA;
  --terracotta: #BD5B3D;
  --clay:       #7C4A38;
  --ink:        #2C2521;
  --muted:      #6E635B;
}

html {
  scroll-behavior: smooth;
}

/* --- Atmospheric background -------------------------------------------- */
body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(60% 55% at 82% -5%, rgba(189, 91, 61, 0.18), transparent 60%),
    radial-gradient(55% 50% at -8% 8%, rgba(124, 74, 56, 0.14), transparent 60%),
    radial-gradient(70% 60% at 50% 115%, rgba(217, 142, 115, 0.16), transparent 60%),
    linear-gradient(180deg, #FCF8F2 0%, #F7EFE4 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

/* Fine paper grain laid over the gradient (fixed, non-interactive) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* --- Typography ------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  letter-spacing: -0.01em;
}

.font-display {
  font-family: "Fraunces", Georgia, serif;
}

/* The site-wide brand accent — lets existing text-terracotta classes glow */
.text-terracotta { color: var(--terracotta); }

/* Eyebrow / kicker label above headings */
.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
}

/* --- Navigation ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(251, 246, 239, 0.78);
  border-bottom: 1px solid rgba(124, 74, 56, 0.12);
}

nav a {
  position: relative;
  transition: color 0.2s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

nav a:hover::after,
nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

nav a[aria-current="page"] {
  color: var(--terracotta);
}

/* --- Cards & surfaces ------------------------------------------------- */
.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(124, 74, 56, 0.14);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(44, 37, 33, 0.04),
              0 18px 40px -28px rgba(124, 74, 56, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(44, 37, 33, 0.05),
              0 28px 55px -28px rgba(124, 74, 56, 0.55);
}

.surface-band {
  background: linear-gradient(180deg, rgba(242, 232, 218, 0.65), rgba(242, 232, 218, 0.35));
  border-top: 1px solid rgba(124, 74, 56, 0.1);
  border-bottom: 1px solid rgba(124, 74, 56, 0.1);
}

/* --- Buttons ---------------------------------------------------------- */
.btn-primary {
  display: inline-block;
  background: var(--terracotta);
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: 0.7rem;
  box-shadow: 0 12px 26px -12px rgba(189, 91, 61, 0.85);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: var(--clay);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -14px rgba(124, 74, 56, 0.85);
}

/* --- Gallery ---------------------------------------------------------- */
.gallery-img {
  border-radius: 0.85rem;
  box-shadow: 0 12px 30px -18px rgba(44, 37, 33, 0.6);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-img:hover {
  transform: scale(1.03);
  box-shadow: 0 22px 44px -20px rgba(44, 37, 33, 0.7);
}

/* --- Recognition video frame ------------------------------------------ */
.video-frame {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(124, 74, 56, 0.14);
  box-shadow: 0 1px 2px rgba(44, 37, 33, 0.05),
              0 28px 55px -28px rgba(124, 74, 56, 0.55);
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Monogram avatar (stands in for headshot) ------------------------- */
.monogram {
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: #fff;
  background:
    radial-gradient(120% 120% at 25% 15%, #D98E73 0%, var(--terracotta) 45%, var(--clay) 100%);
  box-shadow: 0 18px 40px -18px rgba(124, 74, 56, 0.7);
}

/* --- Entrance animation ----------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rise {
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.18s; }
.rise-3 { animation-delay: 0.31s; }
.rise-4 { animation-delay: 0.44s; }

footer {
  font-size: 0.95rem;
}

/* --- Legal documents (Terms / Privacy) -------------------------------- */
.legal-doc { line-height: 1.7; }
.legal-doc h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  color: var(--terracotta);
  margin: 2.2rem 0 0.6rem;
}
.legal-doc p { color: rgba(44, 37, 33, 0.85); margin-bottom: 1rem; }
.legal-doc ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; color: rgba(44, 37, 33, 0.85); }
.legal-doc li { margin-bottom: 0.4rem; }
.legal-doc a { color: var(--terracotta); font-weight: 600; }
.legal-doc a:hover { text-decoration: underline; }
.legal-doc blockquote {
  border-left: 3px solid var(--terracotta);
  background: rgba(242, 232, 218, 0.5);
  padding: 0.9rem 1.1rem;
  border-radius: 0 0.6rem 0.6rem 0;
  margin: 1.2rem 0 1.6rem;
  color: var(--clay);
  font-size: 0.95rem;
}
.legal-doc .legal-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
  color: var(--clay);
}
.legal-doc .legal-meta li { margin-bottom: 0.25rem; }
.legal-doc .legal-footnote {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(124, 74, 56, 0.18);
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- Site footer (contact, social, legal) ----------------------------- */
.site-footer a.footer-nav,
.site-footer .contact-email {
  transition: color 0.2s ease;
}

.site-footer a.footer-nav:hover {
  color: var(--terracotta);
}

.social-row .social-link {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--clay);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(124, 74, 56, 0.18);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.social-row .social-link svg {
  width: 1.15rem;
  height: 1.15rem;
}

.social-row .social-link:hover {
  color: #fff;
  background: var(--terracotta);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -14px rgba(189, 91, 61, 0.85);
}

/* --- Homepage logo ---------------------------------------------------- */
.brand-logo {
  display: block;
  margin: 0 auto 1.75rem;
  width: clamp(140px, 26vw, 210px);
  height: auto;
  filter: drop-shadow(0 18px 36px rgba(124, 74, 56, 0.28));
}

/* --- Subscriber thank-you card ---------------------------------------- */
.thankyou-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 1.5rem;
  background: rgba(44, 37, 33, 0.62);
  backdrop-filter: blur(4px);
}

.thankyou-overlay.is-open {
  display: grid;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.thankyou-dialog {
  position: relative;
  max-width: 30rem;
  width: 100%;
  background: var(--cream);
  border-radius: 1.25rem;
  border: 1px solid rgba(124, 74, 56, 0.18);
  box-shadow: 0 40px 80px -30px rgba(44, 37, 33, 0.7);
  padding: 1.75rem;
  text-align: center;
}

.thankyou-dialog img {
  width: 100%;
  height: auto;
  border-radius: 0.85rem;
  display: block;
}

.thankyou-close {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--clay);
  background: none;
  border: none;
  cursor: pointer;
}

.thankyou-close:hover {
  color: var(--terracotta);
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
  .card:hover, .gallery-img:hover, .btn-primary:hover { transform: none; }
}

@media (max-width: 640px) {
  .gallery-img:hover { transform: none; }
}
