/* ══════════════════════════════════════════════════════
   SECTION 03 — "Your AI magnetic brand companions"

   Page canvas: 1440px wide
   Container node 181:4787 — x=156, y=2276, w=1128, h=998
   Gold-bordered box: border-radius 37px, gold glow shadow
   Inner content width: 986px (centred via items-center)

   Sub-components:
     .s3__top          — eyebrow + headline (left) + desc (right)
     .s3__legend       — two dot + label + text legend rows
     .s3__cards        — 2-col grid, 986px, gap 27px
     .s3__card-wrap    — glow border wrapper
     .s3__card         — dark bg card, flex-col
   ══════════════════════════════════════════════════════ */


/* ── Section shell ── */
.s3 {
  position: relative;
  width: 100%;
  background: #150d00;
  padding: 80px 0 100px;
}

/* Background star/grain texture — same treatment as hero + s2 */
.s3__texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  opacity: 0.6;
  overflow: hidden;
}
.s3__texture img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.s3__glow { display: none; }

/* ── Animated border wrapper ──
   1px padding reveals the ::before conic-gradient as the "border".
   overflow:hidden clips the spinning gradient to just that 1px ring. */
.s3__box-wrap {
  position: relative;
  z-index: 1;
  width: 1128px;
  margin: 0 auto;
  border-radius: 38px;
  padding: 1px;
  overflow: hidden;
  box-shadow: 0px 4px 22.8px 0px #d5993e;
}

/* Spinning conic-gradient — a subtle bright spot travels around the border.
   Paused by default, starts when .s3--active is added via JS. */
.s3__box-wrap::before {
  content: '';
  position: absolute;
  aspect-ratio: 1;
  width: 200%;
  top: 50%;
  left: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(213, 153, 62, 0.25) 0deg,
    rgba(213, 153, 62, 0.25) 340deg,
    rgba(255, 220, 120, 0.90) 350deg,
    rgba(255, 240, 160, 1.00) 355deg,
    rgba(255, 220, 120, 0.90) 360deg
  );
  transform: translate(-50%, -50%) rotate(0deg);
  animation: s3BorderSpin 4s linear infinite;
  animation-play-state: paused;
}
.s3__box-wrap.s3--active::before {
  animation-play-state: running;
}

@keyframes s3BorderSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Gold-bordered outer box ── */
.s3__box {
  position: relative;
  z-index: 1;
  width: 100%;
  background: linear-gradient(to bottom, rgba(213, 153, 62, 0.05) 0%, #150d00 100%);
  background-color: #150d00;
  border-radius: 37px;
  padding: 80px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  box-sizing: border-box;
}


/* ════════════════════════════════════════
   TOP: eyebrow + headline (left) + desc (right)
   Total inner width: 986px
   ════════════════════════════════════════ */

.s3__top {
  width: 986px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left: title column w=549px */
.s3__title-col {
  width: 549px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Eyebrow: Inter SemiBold 12px, gold, uppercase, tracking 3.264px */
.s3__eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3.264px;
  line-height: 16.32px;
  color: var(--color-gold);
  margin: 0;
}

/* Headline: Excon Regular 64px, gradient, line-height 78px (tighter than other sections) */
.s3__headline {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 400;
  line-height: 78px;
  letter-spacing: -4px;
  margin: 0;
  background: linear-gradient(to bottom, #ffffff 19.478%, #c0c0c0 93.976%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.s3__hl-gold {
  -webkit-text-fill-color: var(--color-gold);
  color: var(--color-gold);
}

/* Right: desc paragraph w=414px */
.s3__desc {
  width: 414px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.70);
  margin: 0;
}


/* ════════════════════════════════════════
   LEGEND — two companion type indicators
   ════════════════════════════════════════ */

.s3__legend {
  width: 978px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.s3__legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
}

/* Dot indicators */
.s3__legend-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
}
.s3__legend-dot--gold {
  background: #d5993e;
  box-shadow: 0 0 10px rgba(213, 153, 62, 0.50);
}
.s3__legend-dot--bronze {
  background: #8892f2;
  box-shadow: 0 0 10px rgba(136, 146, 242, 0.50);
}

/* Label — Excon Medium 16px */
.s3__legend-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 24.419px;
  white-space: nowrap;
}
.s3__legend-label--gold   { color: #d5993e; }
.s3__legend-label--bronze { color: #8892f2; }

/* Value text — Inter Regular 16px */
.s3__legend-text {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.80);
  white-space: nowrap;
}


/* ════════════════════════════════════════
   CARDS GRID — 2 columns, 986px, gap 27px
   Each card ≈ 479.5px wide, 542px tall
   ════════════════════════════════════════ */

.s3__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 27px;
  width: 986px;
}

/* ── Card glow wrapper ── */
.s3__card-wrap {
  border-radius: 24px;
  position: relative;
}
.s3__card-wrap--gold {
  box-shadow:
    0 0 0 1px rgba(213, 153, 62, 0.60),
    0 0 15px 2px rgba(213, 153, 62, 0.25);
}
.s3__card-wrap--bronze {
  box-shadow:
    0 0 0 1px rgba(193, 122, 80, 0.60),
    0 0 15px 2px rgba(193, 122, 80, 0.25);
}

/* ── Inner card ── */
.s3__card {
  background: #0d0901;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 542px;
}


/* ════════════════════════════════════════
   CARD TYPE LABEL (top strip, ~37px)
   ════════════════════════════════════════ */

.s3__card-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 17px 0 0 20px;
  flex-shrink: 0;
}

.s3__label-icon {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

/* Inter Bold 8.85px, uppercase, tracking 1.062px */
.s3__label-text {
  font-family: var(--font-body);
  font-size: 8.85px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.062px;
  line-height: 13.275px;
  white-space: nowrap;
}
.s3__label-text--gold   { color: #5c6def; }
.s3__label-text--bronze { color: #8892f2; }


/* ════════════════════════════════════════
   CARD AI NAME (icon + name/subtitle row)
   border-bottom, h≈72px
   ════════════════════════════════════════ */

.s3__card-name {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px;
  flex-shrink: 0;
}
.s3__card-name--gold   { border-bottom: 1px solid rgba(213, 153, 62, 0.20); }
.s3__card-name--bronze { border-bottom: 1px solid rgba(193, 122, 80, 0.20); }

/* AI avatar icon — 41×41px rounded square */
.s3__ai-icon {
  width: 41px;
  height: 41px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.s3__ai-icon--gold {
  background: linear-gradient(135deg, rgba(136, 146, 242, 0.30) 0%, rgba(136, 146, 242, 0.10) 100%);
  border: 1px solid rgba(136, 146, 242, 0.30);
}
.s3__ai-icon--bronze {
  background: linear-gradient(135deg, rgba(136, 146, 242, 0.30) 0%, rgba(136, 146, 242, 0.10) 100%);
  border: 1px solid rgba(136, 146, 242, 0.30);
}
.s3__ai-icon img {
  width: 20px;
  height: 20px;
  display: block;
}

/* AI name text */
.s3__ai-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* AI title: Excon Medium 18px, white */
.s3__ai-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 28.2px;
  color: #ffffff;
  white-space: nowrap;
  margin: 0;
}

/* AI subtitle: Inter Medium 12px */
.s3__ai-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  line-height: 19.617px;
  white-space: nowrap;
  margin: 0;
}
.s3__ai-subtitle--gold   { color: #8892f2; }
.s3__ai-subtitle--bronze { color: #8892f2; }


/* ════════════════════════════════════════
   CARD DESCRIPTION + TAGS
   ════════════════════════════════════════ */

.s3__card-desc {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 17px 20px 0;
  flex-shrink: 0;
}

/* Description text: Inter Regular 12px, rgba(255,255,255,0.7) */
.s3__desc-text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.70);
  margin: 0;
}
.s3__desc-bold--gold   { font-weight: 600; color: #5c6def; font-style: normal; }
.s3__desc-bold--bronze { font-weight: 600; color: #8892f2; font-style: normal; }

/* Tags row */
.s3__tags {
  display: flex;
  gap: 7px;
  flex-wrap: nowrap;
}

/* Individual tag pill */
.s3__tag {
  font-family: var(--font-body);
  font-size: 9.531px;
  font-weight: 500;
  line-height: 14.296px;
  white-space: nowrap;
  padding: 4px 8.5px;
  border-radius: 7px;
  border: 1px solid;
}
.s3__tag--gold {
  color: #5c6def;
  background: rgba(213, 153, 62, 0.08);
  border-color: rgba(213, 153, 62, 0.15);
}
.s3__tag--bronze {
  color: #8892f2;
  background: rgba(193, 122, 80, 0.08);
  border-color: rgba(193, 122, 80, 0.15);
}


/* ════════════════════════════════════════
   CHAT AREA (takes remaining height)
   border-top #1a1a1a separates from desc
   ════════════════════════════════════════ */

.s3__chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #1a1a1a;
  margin-top: 14px;
  overflow: hidden;
}

/* Live preview bar */
.s3__preview-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 37px;
  padding: 0 20px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.s3__preview-icon {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

/* "Live preview" label */
.s3__preview-label {
  font-family: var(--font-body);
  font-size: 12.261px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.54);
  flex: 1;
}

/* Active status — green dot + text */
.s3__status {
  display: flex;
  align-items: center;
  gap: 5px;
}
.s3__status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}
.s3__status-text {
  font-family: var(--font-body);
  font-size: 12.261px;
  font-weight: 400;
  color: #4ade80;
  white-space: nowrap;
}

/* Messages container */
.s3__messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 22px 14px 14px;
  overflow: hidden;
}

/* Base message bubble */
.s3__msg {
  max-width: 375px;
  padding: 9px 13px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 18.517px;
}
.s3__msg p { margin: 0; }

/* User message — right-aligned, lighter blue bg, white text */
.s3__msg--user {
  align-self: flex-end;
  border-radius: 14px 14px 5px 14px;
  font-weight: 500;
  color: #ffffff;
}
.s3__msg--gold   { background: #8892f2; }
.s3__msg--bronze { background: #8892f2; }

/* AI message — left-aligned, translucent bg */
.s3__msg--ai {
  align-self: flex-start;
  border-radius: 14px 14px 14px 5px;
  font-weight: 400;
  color: #e0e0e0;
  font-size: 11.573px;
}
.s3__msg--ai-gold {
  background: rgba(136, 146, 242, 0.08);
  border: 1px solid rgba(213, 153, 62, 0.19);
}
.s3__msg--ai-bronze {
  background: rgba(136, 146, 242, 0.08);
  border: 1px solid rgba(193, 122, 80, 0.19);
}
