/* Greg components — the reference's construction, our content.
   Everything here is reusable on the public site: no vault-only styling lives in this file. */

/* ─── Page furniture ───────────────────────────────────────────────────── */
.page { width: min(100% - 1rem, var(--page-w)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--s-10); }
.section--cream { background: var(--cream); }
.container { width: min(100% - 2.5rem, 1040px); margin-inline: auto; }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }

/* Floating pill nav, as measured: outlined wordmark left, pill actions right */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  background: linear-gradient(var(--paper) 55%, transparent);
}
.wordmark {
  font-weight: 600; font-size: var(--t-sm); letter-spacing: -0.02em;
  border: 1px solid var(--ink); border-radius: var(--r-pill);
  padding: var(--s-2) var(--s-4); text-decoration: none;
}
.nav__links { display: flex; gap: var(--s-1); background: var(--tint-10); border-radius: var(--r-pill); padding: var(--s-1); }
.nav__links a { font-size: var(--t-sm); text-decoration: none; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); }
.nav__links a:hover { background: var(--paper); }
@media (max-width: 720px) { .nav__links { display: none; } }

/* ─── The signature element: full-bleed photographic panel, inset with white margin ──── */
.panel {
  position: relative; overflow: hidden;
  border-radius: var(--r-panel);
  margin-bottom: var(--panel-gap);
  min-height: min(86vh, 760px);
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: clamp(var(--s-6), 5vw, var(--s-10));
  color: var(--paper);
  background: var(--ink-deep);
  isolation: isolate;
}
.panel__media { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* Scrim: keeps type legible over any photograph without dulling the whole image */
.panel::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(41, 18, 16, 0.45) 0%, rgba(41, 18, 16, 0.12) 38%, rgba(41, 18, 16, 0) 60%);
}
.panel--light { color: var(--ink); background: var(--cream); }
.panel--light::after { background: none; }
.panel__title { max-width: 16ch; }
.panel__body { max-width: 42ch; font-size: var(--t-base); opacity: 0.92; margin-top: var(--s-4); }
.panel__actions { margin-top: var(--s-5); display: flex; gap: var(--s-3); flex-wrap: wrap; }

/* Mono eyebrow with a square bullet — the reference's one label device */
.eyebrow {
  font-family: var(--font-doc); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; background: currentColor; }

/* One peach clause per page, in the hero headline only. Bright peach only over dark photography. */
.accent { color: var(--peach-ink); }
.panel .accent, .bubble--greg .accent { color: var(--peach); }

/* ─── Actions ──────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font: 500 var(--t-sm)/1 var(--font-ui);
  padding: var(--s-3) var(--s-5); min-height: 44px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.pill--primary { background: var(--ink); color: var(--paper); }
.pill--primary:hover { background: var(--ink-deep); }
.pill--quiet { background: var(--tint-10); color: var(--ink); }
.pill--quiet:hover { background: var(--tint-20); }
.pill--on-photo { background: var(--on-dark-20); color: var(--paper); backdrop-filter: blur(8px); }
.pill--on-photo:hover { background: rgba(255, 255, 255, 0.32); }

/* ─── Chat: Greg's answers ─────────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; gap: var(--s-3); max-width: var(--chat-w); }
.bubble { padding: var(--s-4) var(--s-5); font-size: var(--t-base); line-height: 1.35; max-width: 88%; }
.bubble p { margin: 0 0 var(--s-2); max-width: none; }
.bubble p:last-child { margin: 0; }
.bubble--greg { align-self: flex-start; background: var(--ink); color: var(--paper); border-radius: var(--r-bubble-greg); }
.bubble--user { align-self: flex-end; background: var(--cream); color: var(--ink); border-radius: var(--r-bubble-user); }
.bubble--thinking { align-self: flex-start; background: var(--tint-10); border-radius: var(--r-bubble-greg); display: flex; gap: 5px; padding: var(--s-5); }
.bubble--thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: dot 1.1s infinite ease-in-out; }
.bubble--thinking span:nth-child(2) { animation-delay: 0.15s; }
.bubble--thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.quick-replies { display: flex; flex-wrap: wrap; gap: var(--s-2); max-width: var(--chat-w); }
.quick-reply {
  font: 400 var(--t-sm)/1 var(--font-ui); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  background: transparent; color: inherit; cursor: pointer;
}
.quick-reply:hover { border-color: currentColor; }

/* ─── Policy document pieces ───────────────────────────────────────────── */
.doc-chip {
  display: inline-flex; width: fit-content; align-self: start; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); background: var(--cream);
  border-radius: var(--r-card); font-size: var(--t-sm);
}
.doc-chip__name { font-family: var(--font-doc); }
.doc-chip__meta { color: var(--ink-50); }

.figure-row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-4);
  align-items: baseline; padding: var(--s-3) 0; border-bottom: 1px solid var(--hairline);
}
.figure-row__label { font-size: var(--t-sm); color: var(--ink-50); }
.figure-row__value { font-family: var(--font-doc); font-variant-numeric: tabular-nums; font-size: var(--t-sm); }
.figure-row__value del { color: var(--ink-50); text-decoration-thickness: 1px; margin-right: var(--s-2); }
.figure-row__value ins { text-decoration: none; }
.figure-row--changed .figure-row__value ins { color: var(--peach); background: var(--ink); padding: 2px 6px; border-radius: 6px; }

.finding { border-radius: var(--r-card); background: var(--cream); padding: var(--s-5); max-width: var(--chat-w); }
.finding h3 { margin-bottom: var(--s-2); }
.finding p { font-size: var(--t-sm); color: var(--ink-60); margin: 0; }

.dropzone {
  display: grid; place-items: center; gap: var(--s-2);
  padding: var(--s-8) var(--s-5); text-align: center; cursor: pointer;
  border: 1.5px dashed var(--mauve); border-radius: var(--r-card);
  background: var(--paper); max-width: var(--chat-w);
  transition: border-color 160ms ease, background 160ms ease;
}
.dropzone:hover, .dropzone[data-over='true'] { border-color: var(--ink); background: var(--cream); }
.dropzone__hint { font-size: var(--t-sm); color: var(--ink-50); }

/* ─── Proof, FAQ, closing ──────────────────────────────────────────────── */
.quote-card {
  background: var(--cream); border-radius: var(--r-card); padding: var(--s-5);
  box-shadow: var(--shadow-card); font-size: var(--t-sm);
}
.quote-card footer { margin-top: var(--s-3); color: var(--ink-50); font-size: var(--t-xs); }
.quote-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-4); }

.faq-item { border-top: 1px solid var(--hairline); padding-block: var(--s-5); }
.faq-item h3 { margin-bottom: var(--s-3); font-weight: 400; }
.faq-item p { font-size: var(--t-sm); color: var(--ink-60); }

.disclosure { font-size: var(--t-xs); color: var(--ink-50); max-width: var(--read-w); }
.disclosure strong { font-weight: 500; color: var(--ink); }

.footer { padding: var(--s-10) var(--s-5) var(--s-6); display: grid; gap: var(--s-5); }
.footer__legal { font-size: var(--t-xs); color: var(--ink-50); max-width: var(--read-w); }

/* ─── Product imagery: the interface IS the illustration ───────────────────
   Glass cards carrying real policy content, floated and tilted over out-of-focus photography.
   Same components render in the product, on the site, and as social stills. */
.stage {
  position: relative; overflow: hidden; border-radius: var(--r-panel);
  display: grid; place-items: center; padding: clamp(var(--s-6), 6vw, var(--s-10));
  min-height: 420px; isolation: isolate;
}
.stage__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.stage--tilt .ui-card { transform: perspective(1400px) rotateY(-14deg) rotateX(6deg) rotate(-2deg); }
.stage--tilt-right .ui-card { transform: perspective(1400px) rotateY(12deg) rotateX(5deg) rotate(1.5deg); }

.ui-card {
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-float);
  padding: var(--s-5);
  color: var(--ink);
}
.ui-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.ui-card__title { font-size: var(--t-md); font-weight: 500; }
.ui-card__meta { font-family: var(--font-doc); font-size: var(--t-xs); color: var(--ink-50); }

/* Coverage bars: how much of the insured value each cover actually protects */
.ui-bar { margin-bottom: var(--s-4); }
.ui-bar:last-child { margin-bottom: 0; }
.ui-bar__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: var(--t-sm); font-weight: 500; }
.ui-bar__row span:last-child { font-family: var(--font-doc); font-variant-numeric: tabular-nums; }
.ui-bar__track { height: 7px; border-radius: 4px; background: rgba(41, 18, 16, 0.12); overflow: hidden; }
.ui-bar__fill { display: block; height: 100%; border-radius: 4px; background: var(--ink); }
.ui-bar--warn .ui-bar__fill { background: var(--peach-ink); }

/* Gauge: the renewal premium against last year */
.ui-gauge { display: grid; place-items: center; text-align: center; gap: var(--s-2); }
.ui-gauge__value { font-family: var(--font-doc); font-size: 2.6rem; font-variant-numeric: tabular-nums; line-height: 1; }
.ui-gauge__label { font-size: var(--t-sm); color: var(--ink-60); }
.ui-tag { display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 500; background: var(--peach-pale); color: var(--ink); }

/* Notification: Greg speaking from the lock screen */
.ui-notif {
  display: flex; align-items: flex-start; gap: var(--s-3);
  width: min(100%, 460px); padding: var(--s-4);
  background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(24px);
  border-radius: 18px; box-shadow: var(--shadow-card);
}
.ui-notif__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: var(--peach); display: grid; place-items: center; font-weight: 600; flex: none; }
.ui-notif__text { font-size: var(--t-sm); }
.ui-notif__text b { display: block; font-weight: 600; margin-bottom: 2px; }
.ui-notif__time { margin-left: auto; font-size: var(--t-xs); color: var(--ink-50); }

/* Phone frame for store shots and social stills */
.ui-phone { width: 300px; border-radius: 42px; padding: 10px; background: var(--ink-deep); box-shadow: var(--shadow-float); }
.ui-phone__screen { border-radius: 33px; overflow: hidden; background: linear-gradient(180deg, #E9E2DA, #FFF); padding: var(--s-5) var(--s-4); }
.ui-phone__notch { width: 92px; height: 22px; border-radius: 12px; background: var(--ink-deep); margin: 0 auto 10px; }


/* ─── The mark, animated. States are set with .st-<state> on #greg (see docs/brand/RIVE-RIG.md).
   This is the shippable stand-in until the .riv exists; same part names, same timings. ─── */
.greg-mark { display: block; }
#greg g { transform-box: fill-box; transform-origin: center; }
#brow-l, #brow-r { transition: transform 260ms cubic-bezier(.2, .8, .3, 1); }
#eye-l, #eye-r { transition: transform 180ms ease; }
#mouth { transition: transform 260ms ease; }

.st-idle #eye-l, .st-idle #eye-r { animation: greg-blink 5.2s infinite; }
@keyframes greg-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.st-ler #eye-l, .st-ler #eye-r { transform: translateY(3px) scaleY(.8); }
.st-ler #brow-l { transform: translateY(2px) rotate(2deg); }
.st-ler #brow-r { transform: translateY(2px) rotate(-2deg); }

.st-pensar #eye-l, .st-pensar #eye-r { transform: scaleY(.12); }
.st-pensar #brow-l, .st-pensar #brow-r { transform: translateY(-3px); }
.st-pensar #mouth { animation: greg-hum 1.6s infinite ease-in-out; }
@keyframes greg-hum { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }

.st-desconfiado #brow-l { transform: translateY(-7px) rotate(-14deg); }
.st-desconfiado #brow-r { transform: translateY(2px) rotate(-2deg); }
.st-desconfiado #eye-l { transform: scaleY(1.1); }
.st-desconfiado #eye-r { transform: scaleY(.75); }

.st-calmo #brow-l { transform: translateY(-2px) rotate(3deg); }
.st-calmo #brow-r { transform: translateY(-2px) rotate(-3deg); }
.st-calmo #mouth { transform: scale(1.12); }

.st-falar #mouth { animation: greg-talk .42s infinite ease-in-out; }
@keyframes greg-talk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.5) translateY(1px); } }

@media (prefers-reduced-motion: reduce) { #greg g { animation: none !important; } }
