/* ==========================================================================
   GRI® UI LAYER — logo, video facade, social components
   Plain CSS (no framework dependency) so every block can be pasted into any
   CMS / theme. Mobile-first: base rules target phones, min-width queries
   scale up.
   ========================================================================== */

:root {
  --gri-red: #FE2700;          /* sampled from the official GRI® mark */
  --gri-red-dark: #C81E00;
  --gri-ink: #0F172A;
  --gri-ink-2: #1E293B;
  --gri-paper: #FFFFFF;
  --gri-wa: #25D366;
  --gri-radius: 14px;
  --gri-header-h: 64px;        /* mobile header height */
}
@media (min-width: 1024px) { :root { --gri-header-h: 82px; } }

/* --------------------------------------------------------------------------
   1. LOGO LOCKUP (mark + wordmark)
   The mark is a raster with a transparent background and knockout letters.
   Sizing is driven by HEIGHT so the aspect ratio (≈1.27:1) never distorts.
   -------------------------------------------------------------------------- */
.gri-logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;            /* touch-target minimum */
  padding: 4px 0;              /* optical breathing room in the bar */
  text-decoration: none;
  color: #000;
  line-height: 1;
  flex-shrink: 0;
}
.gri-logo:focus-visible { outline: 3px solid var(--gri-red); outline-offset: 4px; border-radius: 8px; }

.gri-logo__mark {
  display: block;
  height: 40px;                /* mobile */
  width: auto;
  aspect-ratio: 1550 / 1225;
  object-fit: contain;
}
.gri-logo__text { display: flex; flex-direction: column; justify-content: center; }
.gri-logo__name {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.gri-logo__tag {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: lowercase;
  margin-top: 3px;
}
/* Very small phones: keep the mark and the name, drop the tagline */
@media (max-width: 359px) {
  .gri-logo__tag { display: none; }
  .gri-logo__name { font-size: 16px; }
}
@media (min-width: 640px) {
  .gri-logo__mark { height: 48px; }
  .gri-logo__name { font-size: 22px; }
  .gri-logo__tag  { font-size: 13px; }
}
@media (min-width: 1024px) {
  .gri-logo { gap: .8rem; }
  .gri-logo__mark { height: 58px; }
  .gri-logo__name { font-size: 26px; }
  .gri-logo__tag  { font-size: 15px; }
}

/* On dark surfaces: white wordmark, and the mark sits on a white chip so
   the knockout letters stay white, as they are in the original artwork. */
.gri-logo--on-dark { color: #fff; }
.gri-logo--on-dark .gri-logo__mark {
  background: #fff;
  padding: 5px 7px;
  border-radius: 10px;
  box-sizing: content-box;
}

/* --------------------------------------------------------------------------
   2. LITE VIDEO FACADE (YouTube loads only on click)
   -------------------------------------------------------------------------- */
.gri-video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--gri-radius);
  overflow: hidden;
  background: var(--gri-ink) center / cover no-repeat;
  box-shadow: 0 20px 45px -15px rgba(2, 6, 23, .55);
  isolation: isolate;
}
.gri-video__btn {
  all: unset;
  position: absolute; inset: 0;
  display: grid; place-items: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(15,23,42,.10) 0%, rgba(15,23,42,.72) 100%);
}
.gri-video__btn:focus-visible { outline: 3px solid #FBBF24; outline-offset: -6px; }
.gri-video__play {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--gri-red);
  display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(254, 39, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gri-video__btn:hover .gri-video__play { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(254,39,0,.22); }
.gri-video__play svg { width: 28px; height: 28px; margin-left: 4px; fill: #fff; }
.gri-video__label {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  color: #fff; font: 600 14px/1.3 Inter, system-ui, sans-serif; text-align: left;
}
.gri-video__label small { display: block; font-weight: 500; opacity: .75; font-size: 12px; margin-top: 2px; }
.gri-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 768px) {
  .gri-video__play { width: 84px; height: 84px; }
  .gri-video__label { left: 24px; bottom: 20px; font-size: 16px; }
}

/* --------------------------------------------------------------------------
   3. COMPONENT A — FLOATING CONTACT / SOCIAL TRIGGER
   -------------------------------------------------------------------------- */
.gri-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  font-family: Inter, system-ui, sans-serif;
}
.gri-fab__toggle {
  width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--gri-wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 25px -6px rgba(0,0,0,.4);
  transition: transform .2s ease, background .2s ease;
}
.gri-fab__toggle:hover { transform: scale(1.05); }
.gri-fab__toggle:focus-visible { outline: 3px solid var(--gri-ink); outline-offset: 3px; }
.gri-fab__toggle svg { width: 28px; height: 28px; }
.gri-fab__toggle .gri-fab__icon-close { display: none; }
.gri-fab.is-open .gri-fab__toggle { background: var(--gri-ink); }
.gri-fab.is-open .gri-fab__icon-open { display: none; }
.gri-fab.is-open .gri-fab__icon-close { display: block; }

.gri-fab__panel {
  width: min(320px, calc(100vw - 32px));
  background: #fff; color: var(--gri-ink);
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(2,6,23,.45);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(.92) translateY(8px);
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.gri-fab.is-open .gri-fab__panel {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .18s ease, transform .18s ease;
}
.gri-fab__head { background: var(--gri-ink); color: #fff; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.gri-fab__head img { height: 30px; width: auto; background: #fff; border-radius: 8px; padding: 4px 6px; }
.gri-fab__head strong { display: block; font-size: 14px; }
.gri-fab__head span { font-size: 12px; color: #94A3B8; display: flex; align-items: center; gap: 6px; }
.gri-fab__dot { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; display: inline-block; }
.gri-fab__dot.is-off { background: #F59E0B; }
.gri-fab__list { list-style: none; margin: 0; padding: 8px; }
.gri-fab__list a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 12px;
  color: inherit; text-decoration: none; font-size: 14px; font-weight: 600;
}
.gri-fab__list a:hover, .gri-fab__list a:focus-visible { background: #F1F5F9; outline: none; }
.gri-fab__list small { display: block; font-weight: 500; color: #64748B; font-size: 12px; }
.gri-fab__ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.gri-fab__ico svg { width: 18px; height: 18px; }
.gri-fab__socials { display: flex; gap: 8px; padding: 4px 18px 16px; }
.gri-fab__socials a { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.gri-fab__socials svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   4. COMPONENT B — SOCIAL PROOF TICKER
   -------------------------------------------------------------------------- */
.gri-ticker {
  background: var(--gri-ink);
  color: #E2E8F0;
  border-block: 1px solid #1E293B;
  overflow: hidden;
  font: 500 13px/1 Inter, system-ui, sans-serif;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.gri-ticker__track {
  display: flex; width: max-content;
  animation: gri-marquee 38s linear infinite;
}
.gri-ticker:hover .gri-ticker__track,
.gri-ticker:focus-within .gri-ticker__track { animation-play-state: paused; }
.gri-ticker__list { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.gri-ticker__item { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; white-space: nowrap; }
.gri-ticker__item::after { content: "•"; color: var(--gri-red); margin-left: 26px; }
.gri-ticker__item b { color: #FBBF24; font-weight: 700; }
.gri-ticker__item a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@keyframes gri-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .gri-ticker__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .gri-ticker__list[aria-hidden="true"] { display: none; }
  .gri-ticker { -webkit-mask-image: none; mask-image: none; }
}

/* --------------------------------------------------------------------------
   5. COMPONENT C — "SHARE THIS PAGE" HOOK
   -------------------------------------------------------------------------- */
.gri-share {
  background: #fff; color: var(--gri-ink);
  border: 1px solid #E2E8F0; border-radius: 18px;
  padding: 20px;
  display: grid; gap: 14px;
  font-family: Inter, system-ui, sans-serif;
  text-align: left;
}
.gri-share h3 { margin: 0; font: 700 18px/1.25 "Space Grotesk", system-ui, sans-serif; }
.gri-share p { margin: 0; color: #475569; font-size: 14px; }
.gri-share__row { display: flex; flex-wrap: wrap; gap: 8px; }
.gri-share__btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border-radius: 12px; border: 0; cursor: pointer;
  font: 600 14px/1 Inter, system-ui, sans-serif; color: #fff; text-decoration: none;
}
.gri-share__btn svg { width: 16px; height: 16px; }
.gri-share__btn:focus-visible { outline: 3px solid var(--gri-ink); outline-offset: 2px; }
.gri-share__btn--native { background: var(--gri-red); }
.gri-share__btn--wa { background: var(--gri-wa); color: #052E16; }
.gri-share__btn--fb { background: #1877F2; }
.gri-share__btn--x  { background: #000; }
.gri-share__btn--li { background: #0A66C2; }
.gri-share__btn--copy { background: #F1F5F9; color: var(--gri-ink); }
@media (min-width: 768px) { .gri-share { padding: 26px 28px; grid-template-columns: 1fr auto; align-items: center; } }

/* Keep the toast clear of the floating button */
#toast { bottom: 88px !important; }
