/* site.css - Quinsy company site (x.ai-inspired layouts) */

/* Prevent horizontal scroll from positioned demo UI */
html {
  overflow-x: clip;
}

/* ===================== BRAND COLORS (product cards) ===================== */
:root {
  --color-clara-brand: #ff385c;
  --color-clara-brand-ink: #ffffff;
  --color-edith-brand: #f59e0b;
  --color-edith-brand-ink: #0a0a0a;

  /* x.ai accent palette (DESIGN.md) */
  --color-accent-sunset: #ff7a17;
  --color-accent-dusk: #7c3aed;
  --color-accent-breeze: #a0c3ec;
  --color-accent-midnight: #0d1726;
}

/* ===================== HERO ===================== */
.hero--quinsy {
  position: relative;
  overflow: hidden;
  background-color: var(--color-canvas);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-section);
}

.hero--quinsy .hero__container {
  position: relative;
  z-index: 1;
}

.hero--quinsy .hero__title {
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}

/* Animated blur orbs — merge, overlap, and drift through shared space */
.hero__glow {
  position: absolute;
  inset: -100px -8% 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  left: 50%;
  top: 44%;
  border-radius: 50%;
  filter: blur(100px);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}

.hero__orb--sunset {
  width: min(540px, 90vw);
  height: min(540px, 90vw);
  margin-left: calc(min(540px, 90vw) / -2);
  margin-top: calc(min(540px, 90vw) / -2);
  background: radial-gradient(circle, var(--color-accent-sunset) 0%, transparent 68%);
  opacity: 0.38;
  animation: hero-orb-merge-a 24s ease-in-out infinite;
}

.hero__orb--dusk {
  width: min(500px, 82vw);
  height: min(500px, 82vw);
  margin-left: calc(min(500px, 82vw) / -2);
  margin-top: calc(min(500px, 82vw) / -2);
  background: radial-gradient(circle, var(--color-accent-dusk) 0%, transparent 68%);
  opacity: 0.32;
  animation: hero-orb-merge-b 30s ease-in-out infinite;
}

.hero__orb--breeze {
  width: min(440px, 75vw);
  height: min(440px, 75vw);
  margin-left: calc(min(440px, 75vw) / -2);
  margin-top: calc(min(440px, 75vw) / -2);
  background: radial-gradient(circle, var(--color-accent-breeze) 0%, transparent 68%);
  opacity: 0.26;
  animation: hero-orb-merge-c 20s ease-in-out infinite;
}

.hero--quinsy::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 96px;
  background: linear-gradient(to bottom, transparent, var(--color-canvas));
  pointer-events: none;
  z-index: 1;
}

/* Paths converge at center so colors stack and shift */
@keyframes hero-orb-merge-a {
  0%   { transform: translate(-38%, -28%) scale(0.92); opacity: 0.28; }
  20%  { transform: translate(-8%, -6%) scale(1.14); opacity: 0.44; }
  40%  { transform: translate(22%, 12%) scale(1.02); opacity: 0.36; }
  60%  { transform: translate(6%, 26%) scale(1.18); opacity: 0.42; }
  80%  { transform: translate(-24%, 8%) scale(0.96); opacity: 0.32; }
  100% { transform: translate(-38%, -28%) scale(0.92); opacity: 0.28; }
}

@keyframes hero-orb-merge-b {
  0%   { transform: translate(32%, 22%) scale(1.06); opacity: 0.26; }
  20%  { transform: translate(4%, -4%) scale(1.2); opacity: 0.4; }
  40%  { transform: translate(-26%, -18%) scale(0.94); opacity: 0.3; }
  60%  { transform: translate(-10%, 8%) scale(1.16); opacity: 0.38; }
  80%  { transform: translate(18%, -22%) scale(1.04); opacity: 0.34; }
  100% { transform: translate(32%, 22%) scale(1.06); opacity: 0.26; }
}

@keyframes hero-orb-merge-c {
  0%   { transform: translate(8%, -32%) scale(1); opacity: 0.2; }
  25%  { transform: translate(-18%, 6%) scale(1.12); opacity: 0.34; }
  50%  { transform: translate(2%, 18%) scale(1.22); opacity: 0.38; }
  75%  { transform: translate(26%, -10%) scale(0.9); opacity: 0.24; }
  100% { transform: translate(8%, -32%) scale(1); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__orb {
    animation: none;
    transform: translate(-8%, -6%) scale(1);
    opacity: 0.3;
  }

  .hero__orb--dusk {
    transform: translate(6%, 10%) scale(1);
  }

  .hero__orb--breeze {
    transform: translate(-4%, 4%) scale(1);
  }
}

/* Frosted header over hero glow */
.site-header--quinsy {
  background-color: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ===================== EYEBROW ===================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 var(--space-md);
}

.section-head {
  margin-bottom: var(--space-xl);
}

.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
}

/* ===================== PRODUCT NEWS GRID (x.ai Latest) ===================== */
.product-news {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .product-news {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

.product-news-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-height: 320px;
  padding: var(--space-xl);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

a.product-news-card:hover {
  transform: translateY(-2px);
}

.product-news-card--clara {
  background-color: var(--color-clara-brand);
  color: var(--color-clara-brand-ink);
}

.product-news-card--edith {
  background-color: var(--color-edith-brand);
  color: var(--color-edith-brand-ink);
}

.product-news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.product-news-card__status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.product-news-card__platform {
  font-size: var(--text-sm);
  opacity: 0.8;
}

.product-news-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex-grow: 1;
}

.product-news-card__title {
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

.product-news-card__text {
  font-size: var(--text-body);
  line-height: 1.6;
  margin: 0;
  max-width: 42ch;
  opacity: 0.92;
}

.product-news-card__cta {
  font-size: var(--text-sm);
  font-weight: 500;
  margin-top: auto;
}

.product-news-card__cta::after {
  content: " →";
}

.product-news-card--edith .product-news-card__cta {
  opacity: 1;
}

/* ===================== EDITH TOOL PREVIEW (featured highlight) ===================== */
.featured-split__tools {
  min-width: 0;
}

.tool-preview-grid {
  display: grid;
  gap: var(--space-md);
}

.tool-preview {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.tool-preview__title {
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-ink);
  margin: 0;
}

.tool-preview__desc {
  flex-grow: 1;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-body);
  margin: 0;
}

.tool-preview__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-edith-brand);
  margin-top: var(--space-xs);
}

.tool-preview:hover .tool-preview__link {
  color: var(--color-ink);
}

.tool-preview:hover .tool-preview__title {
  color: var(--color-edith-brand);
}

.wordmark--edith .wordmark__sans {
  color: var(--color-edith-brand);
}

/* Wordmarks on brand cards */
.product-news-card .wordmark__serif,
.product-news-card .wordmark__sans {
  color: inherit;
}

.product-news-card--clara .wordmark__serif {
  font-size: clamp(28px, 4vw, 36px);
}

.product-news-card--clara .wordmark__sans {
  font-size: clamp(28px, 4vw, 36px);
}

.product-news-card--edith .wordmark--edith .wordmark__sans {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
}

.wordmark--edith .wordmark__serif {
  display: none;
}

.wordmark--edith .wordmark__sans {
  margin-left: 0;
}

/* ===================== ABOUT SPLIT (x.ai /company) ===================== */
.about-split {
  display: grid;
  gap: var(--space-xxl);
  margin-top: var(--space-xl);
}

@media (min-width: 960px) {
  .about-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-section);
    align-items: start;
  }
}

.about-split__main {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about-split__lead {
  font-size: clamp(24px, 3.5vw, var(--text-display));
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin: 0;
}

.about-split__text {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--color-body);
  margin: 0;
}

.about-split__callouts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.callout {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

.callout:last-child {
  padding-bottom: 0;
}

.callout__number {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.callout__title {
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-ink);
  margin: 0 0 var(--space-sm);
}

.callout__text {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-muted);
  margin: 0;
}

/* ===================== FEATURED (Clara demo) ===================== */
.featured-split {
  display: grid;
  gap: var(--space-xxl);
  align-items: center;
  margin-top: var(--space-xl);
}

.featured-split__copy,
.featured-split__demo {
  min-width: 0;
}

@media (min-width: 960px) {
  .featured-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-section);
  }
}

.featured-split__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.featured-split__title {
  font-size: clamp(28px, 4vw, var(--text-h1));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin: 0;
}

.featured-split__text {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-body);
  margin: 0;
}

.featured-split__demo {
  display: flex;
  justify-content: center;
  overflow-x: clip;
}

.featured-split__demo .hero__demo {
  margin: 0;
  width: 100%;
}

.featured-split__demo .automation-demo-stage {
  width: 100%;
  overflow-x: clip;
}

.featured-split__demo .automation-demo {
  max-width: 100%;
}

/* Keep dropdown inside the demo card (shared CSS uses right: -100px for full-width hero) */
.featured-split__demo .automation-demo__dropdown {
  top: var(--space-md);
  right: var(--space-md);
  left: auto;
  width: min(300px, calc(100% - 2 * var(--space-xl)));
  transform: none;
}

@media (max-width: 720px) {
  .featured-split__demo .automation-demo__dropdown {
    right: auto;
    left: 50%;
    width: min(300px, calc(100% - 2 * var(--space-base)));
    transform: translateX(-50%);
  }
}

.featured-split__note {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0;
}

/* ===================== FAQ ===================== */
.faq-section .faq-list {
  max-width: none;
  margin-top: var(--space-xl);
}

/* ===================== FOOTER / UTILS ===================== */
.site-footer__attribution--quinsy {
  justify-content: center;
}

.section-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
