/* Huddle landing page, extends the shared site styles.css.
   Reuses the site's existing tokens (--bg, --text, --accent, etc.)
   defined in ../../styles.css; no new colors are introduced here. */

.page--huddle {
  max-width: 1320px;
}

/* Top nav: small placeholder Huddle logo (swap huddle-logo-mark for a real
   mark/SVG later; replaces the site's usual full Raleko wordmark header) */

.huddle-nav {
  margin: 8px 0 48px;
}

.huddle-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.huddle-logo-mark {
  display: block;
  width: 28px;
  height: 28px;
}

@media (prefers-color-scheme: dark) {
  .huddle-logo-mark {
    filter: invert(1);
  }
}

.huddle-logo-text {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.huddle-logo-text-muted {
  color: var(--text-muted);
}

/* Hero (section 1) */

.huddle-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.5fr);
  gap: 48px;
  margin: 0 0 88px;
}

.huddle-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.huddle-headline {
  margin: 0 0 40px;
  max-width: 22ch;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.005em;
}

.huddle-hero-visual {
  position: relative;
  margin: 0;
  aspect-ratio: 1720 / 1468;
  overflow: hidden;
}

.huddle-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 35%);
  pointer-events: none;
}

.huddle-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* CTA block: identical markup/styling wherever it appears */

.huddle-cta {
  max-width: 480px;
}

.huddle-cta-heading {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.huddle-cta-sub {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 46ch;
}

.huddle-cta-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.huddle-cta-row {
  display: flex;
  gap: 10px;
}

.huddle-cta-input {
  flex: 1;
  /* An <input> carries the UA's default size=20 intrinsic width (~224px).
     That is a *min-content* contribution, so a min-width floor never caps
     it; only min-width:0 lets the field shrink. Without this the row's
     min-content forces the hero's 1fr grid track open and the whole page
     overflows the viewport. */
  min-width: 0;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
}

.huddle-cta-input::placeholder {
  color: var(--text-muted);
}

.huddle-cta-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.huddle-cta-input:disabled {
  opacity: 0.6;
}

.huddle-cta-button {
  flex: none;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.huddle-cta-button:hover {
  opacity: 0.85;
}

.huddle-cta-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.huddle-cta-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.huddle-cta-status {
  margin: 12px 0 0;
  min-height: 1.4em;
  font-size: 14px;
  color: var(--text-muted);
}

.huddle-cta-status[data-state="success"] {
  color: var(--accent);
}

.huddle-cta-status[data-state="error"] {
  color: var(--error);
}

/* Problem (section 2) */

.huddle-problem {
  margin: 0 0 88px;
}

.huddle-problem-text {
  margin: 0;
  max-width: 42ch;
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 300;
  line-height: 1.45;
}

/* Proof, by outcome (section 3): zig-zag rows, media alternating sides.
   Markup order is always media-then-content; row-reverse on even rows
   flips the visual side without touching reading order. */

.huddle-outcomes {
  display: flex;
  flex-direction: column;
  gap: 72px;
  margin: 0 0 96px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.huddle-outcome {
  display: flex;
  align-items: center;
  gap: 56px;
}

.huddle-outcome:nth-child(even) {
  flex-direction: row-reverse;
}

.huddle-outcome-media-wrap {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 11 / 6;
}

.huddle-outcome-media-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
}

.huddle-outcome-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--accent-tint);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.huddle-outcome-media-wrap:hover .huddle-outcome-media {
  transform: translate(-10px, -10px);
  box-shadow: 0 16px 28px rgba(26, 26, 26, 0.16);
}

/* Right-hand images (even rows, row-reverse) pop toward the top
   right instead, so the accent backdrop peeks from the bottom left -
   each card leans toward its own outer edge. */
.huddle-outcome:nth-child(even) .huddle-outcome-media-wrap:hover .huddle-outcome-media {
  transform: translate(10px, -10px);
}

.huddle-outcome-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.huddle-outcome-content {
  flex: 1 1 0;
}

.huddle-outcome-heading {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.005em;
}

.huddle-outcome-heading::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--accent);
}

.huddle-outcome-body {
  margin: 0;
  max-width: 40ch;
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
}

/* CTA (section 4) */

.huddle-cta-section {
  padding: 64px 0 8px;
  border-top: 1px solid var(--border);
}

/* Responsive */

@media (max-width: 860px) {
  .huddle-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .huddle-hero-visual {
    order: -1;
    aspect-ratio: 1720 / 587;
  }

  .huddle-hero-visual img {
    object-position: 50% 20%;
  }

  .huddle-outcomes {
    gap: 48px;
  }

  .huddle-outcome,
  .huddle-outcome:nth-child(even) {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .huddle-outcome-media-wrap,
  .huddle-outcome-content {
    flex: none;
    width: 100%;
  }

}

@media (max-width: 560px) {
  .huddle-headline {
    max-width: none;
  }

  /* Stack the CTA: a full-width field over a full-width button, matching
     the phone-first treatment on /kbos. Side by side, the button's nowrap
     label leaves the field unusably narrow. */
  .huddle-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
}
