/* Guisera — the homepage hero.
 *
 * LIGHT. The previous hero was near-black edge to edge, which read as a security
 * product rather than a creative one. This is white and airy, with blue doing the
 * work and colour used as accent rather than atmosphere.
 *
 * It has to look finished in four states, because the admin controls the media:
 *   no media          -> a clean typographic hero on white with a soft blue wash
 *   one image         -> the same layout with the picture in the frame
 *   one video         -> ditto, playing muted and looping
 *   several           -> the frame becomes a slideshow
 * Nothing here assumes media exists.
 *
 * Loaded after home.css, and deliberately overrides the dark `.h-hero` rules that
 * remain there for anything still using them.
 */

.hero {
  position: relative;
  background: #fff;
  padding: 76px 0 84px;
  overflow: hidden;
}

/* Soft colour, not a dark field. Two low-opacity pools well away from the text so
   the headline always sits on near-white. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  width: 560px; height: 560px;
  top: -280px; left: -180px;
  background: #cfe0ff;
  opacity: .75;
}
.hero::after {
  width: 520px; height: 520px;
  bottom: -300px; right: -160px;
  background: var(--brand-soft);
  opacity: .8;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
}

/* ---- copy ---- */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #d9e6ff;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .02em;
}
.hero-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18);
}

.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(37px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.032em;
  color: var(--dark);
}
.hero h1 .accent {
  /* This was a violet-to-cyan sweep clipped to the text. On white a three-stop
     gradient reads as decoration rather than emphasis, so it became one colour
     -- at which point `background-clip: text` and `color: transparent` were an
     elaborate way of writing `color`. Plain now, and it survives a browser that
     does not do background-clip, which the old version did not: there it was
     transparent text on a transparent background. */
  color: var(--brand);
}

.hero-lead {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #475569;
  max-width: 30em;
}

/* Two scannable rows under the lead instead of a second paragraph. */
.hero-points {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--dark);
  font-weight: 550;
}
.hero-points li > i {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(var(--brand-rgb), .1);
  color: var(--brand);
  font-size: 13px;
}
.hero-points-link { color: var(--brand); font-weight: 700; }
.hero-points-link:hover { text-decoration: underline; }

/* All phrases share one grid cell, so the line is as wide as the longest and
   never reflows as they change. Only `.is-on` is visible. */
.hero-rotator {
  display: inline-grid;
  vertical-align: bottom;
  font-weight: 700;
  color: var(--dark);
}
.hero-rotator > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}
.hero-rotator > span.is-on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-rotator > span { transition: none; transform: none; }
}
.hero-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.hero-btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(var(--brand-rgb), .7);
}
.hero-btn-primary:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 16px 34px -12px rgba(var(--brand-rgb), .85);
}
.hero-btn-quiet {
  background: #fff;
  color: var(--dark);
  border-color: #dbe2ee;
}
.hero-btn-quiet:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

.hero-note { margin-top: 18px; font-size: 13.4px; color: #64748b; }
.hero-note strong { color: var(--dark); font-weight: 650; }
.hero-note-link { color: #64748b; font-weight: 650; }
.hero-note-link i { font-size: 10px; }
.hero-note-link:hover { color: var(--brand); }

/* ---- the frame ---- */
.hero-frame {
  position: relative;
  aspect-ratio: 4 / 3.15;
  border-radius: 22px;
  overflow: hidden;
  background: var(--brand);
  border: 1px solid #e2e9f5;
  box-shadow: 0 30px 70px -34px rgba(15, 34, 78, .35);
}

/* Media state: slides stack and cross-fade. Only one is visible at a time, so a
   single slide simply never changes. */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero-slide.is-on { opacity: 1; }
.hero-slide img,
.hero-slide video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Scrim, so a caption stays readable over a picture nobody vetted. Its strength
   is set per slide by the admin. */
.hero-slide .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 15, 32, .05), rgba(8, 15, 32, .55));
}
.hero-caption {
  position: absolute;
  left: 22px; right: 22px; bottom: 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .45);
}

.hero-dots {
  position: absolute;
  bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px;
  z-index: 3;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .5);
  transition: background .2s ease, width .2s ease;
}
.hero-dot.is-on { background: #fff; width: 20px; border-radius: 999px; }

/* No-media state: a calm illustrative panel rather than an empty box. */
.hero-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.hero-rings { position: relative; width: 58%; aspect-ratio: 1; }
.hero-rings span {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(var(--brand-rgb), .28);
  animation: hero-breathe 4s ease-in-out infinite;
}
.hero-rings span:nth-child(2) { inset: 15%; border-color: rgba(var(--brand-rgb), .3); animation-delay: .6s; }
.hero-rings span:nth-child(3) { inset: 30%; border-color: rgba(var(--brand-rgb), .34); animation-delay: 1.2s; }
.hero-rings span:nth-child(4) {
  inset: 43%;
  border: none;
  background: var(--brand);
  opacity: .92;
  animation-delay: 1.8s;
}
@keyframes hero-breathe {
  0%, 100% { transform: scale(1); opacity: .6; }
  50%      { transform: scale(1.05); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-rings span { animation: none; }
  .hero-slide { transition: none; }
}

.hero-tag {
  position: absolute;
  padding: 8px 13px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e4eaf5;
  box-shadow: 0 8px 22px -12px rgba(15, 34, 78, .4);
  font-size: 12.4px;
  font-weight: 650;
  color: var(--dark);
  white-space: nowrap;
  z-index: 2;
}

/* ---- trust row, light ---- */
.hero-trust {
  position: relative;
  z-index: 1;
  border-top: 1px solid #eef1f7;
  background: #fbfcfe;
}
.hero-trust-inner {
  max-width: 1180px; margin: 0 auto; padding: 24px;
  /* ONE COLUMN PER CELL, whatever the count.
     The first cell is dropped when no AI tool is enabled, so a fixed
     `repeat(4, 1fr)` left an empty quarter of the row. `auto-fit` with
     `minmax(0, 1fr)` fixed the look but generated sixty-one tracks, fifty-eight
     of them zero-width, because a zero minimum gives the browser no reason to
     stop. Column flow says the actual intent: as many equal columns as there
     are children, and no more. */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 18px;
  text-align: center;
}
.hero-trust .val {
  font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--dark);
}
.hero-trust .lab { font-size: 12.6px; color: #64748b; margin-top: 3px; }

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 42px; }
}
@media (max-width: 720px) {
  .hero { padding: 54px 0 62px; }
  /* Back to row flow, or column flow would keep every cell on one line and
     squeeze four of them into 375px. */
  .hero-trust-inner {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .hero-actions .hero-btn { flex: 1 1 auto; justify-content: center; }
  .hero-tag { display: none; }

  /* Phone: headline, one line of lead, two rows, buttons -- all above the
     fold on a 390x844 screen. */
  .hero { padding: 36px 0 48px; }
  .hero h1 { margin-top: 16px; font-size: clamp(34px, 9.4vw, 40px); }
  .hero-lead { margin-top: 14px; font-size: 16px; line-height: 1.55; }
  .hero-points { margin-top: 18px; gap: 8px; }
  .hero-points li { font-size: 14px; align-items: flex-start; }
  .hero-points li > i { flex-basis: 26px; width: 26px; height: 26px; border-radius: 8px; font-size: 11.5px; }
  .hero-points li > span { padding-top: 3px; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .hero-btn { padding: 13px 20px; }
  .hero-note { margin-top: 14px; font-size: 12.8px; }
}

/* ---------------- hero frame with real media ---------------- */

/*
 * `.has-media` is added by the template once an admin has uploaded something.
 *
 * WHY THE FRAME CHANGES SHAPE. Empty, the frame is a decorated panel: a tinted
 * gradient, a border, a fixed 4:3.15 box holding an illustration. That is right
 * for an illustration and wrong for a photograph of the product -- a screenshot
 * inside a tinted bordered box reads as a screenshot of a website, and a fixed
 * aspect ratio crops whatever the admin uploaded to fit it.
 *
 * With media the frame becomes a mount: no tint, no border, no forced ratio,
 * and the picture keeps its own proportions.
 */
.hero-frame.has-media {
  aspect-ratio: auto;
  background: none;
  border: 0;
  /* Ambient rather than a drop shadow. The uploaded image is dark and sits on a
     pale page; a hard shadow under it reads as a sticker, while a soft coloured
     bloom reads as light coming off a screen. */
  box-shadow:
    0 40px 90px -40px rgba(var(--brand-rgb), 0.42),
    0 18px 40px -24px rgba(15, 23, 42, 0.35);
}

.hero-frame.has-media .hero-slide {
  position: relative;   /* not absolute: the frame takes its height from the image */
  inset: auto;
}
/* Only the visible slide occupies space; the rest stack behind it. Without
   this, several uploads would set the frame's height to the sum of them. */
.hero-frame.has-media .hero-slide:not(.is-on) {
  position: absolute;
  inset: 0;
}

.hero-frame.has-media .hero-slide img,
.hero-frame.has-media .hero-slide video {
  height: auto;
  /* `contain`, not `cover`. Cover crops, and cropping a screenshot cuts off the
     edges of an interface -- the part that makes it recognisable as software. */
  object-fit: contain;
  border-radius: 18px;
}

/* ---------------- showcase ---------------- */

.h-showcase {
  padding: 92px 0 96px;
  background: linear-gradient(170deg, var(--dark) 0%, #131a30 55%, var(--dark) 100%);
  color: #cbd5e1;
  position: relative;
  overflow: hidden;
}

/* A single soft light behind the image, so the band has a centre. */
.h-showcase::before {
  content: "";
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(900px, 92vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(var(--brand-rgb), 0.16) 0%,
    rgba(var(--brand-rgb), 0.08) 42%,
    transparent 68%
  );
  pointer-events: none;
}

.h-showcase .h-wrap { position: relative; }

.h-showcase .h-kicker { color: var(--brand); }
.h-showcase .h-head h2 { color: #f1f5f9; }
.h-showcase .h-head p { color: var(--dark-ink-muted); }

.showcase-figure {
  margin: 44px auto 0;
  max-width: 1020px;
  border-radius: 16px;
  overflow: hidden;
  /* A hairline edge picks the image out of the dark band it sits on; without it
     a dark screenshot on a dark background loses its boundary entirely. */
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 50px 110px -50px rgba(0, 0, 0, 0.85);
  line-height: 0;
}
.showcase-figure img,
.showcase-figure video {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-caption {
  margin: 20px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: #8b95a9;
}

@media (max-width: 767px) {
  .h-showcase { padding: 60px 0 64px; }
  .showcase-figure { margin-top: 30px; border-radius: 12px; }
}
