/* ============================================
   THREADLINE — components.css
   All section-specific component styles
   ============================================ */

/* ============================================
   CHAT DEMO (hero)
   ============================================ */
.chat-demo {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 14px;
  width: 100%;
  max-width: 448px;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(14, 14, 13, .09);
}

.chat-demo__header {
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-demo__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--thread);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.chat-demo__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

.chat-demo__sub {
  font-size: 11px;
  color: var(--ink-3);
}

.chat-demo__phase {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--thread-light);
  color: var(--thread);
  white-space: nowrap;
}

.chat-demo__messages {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-msg--user { flex-direction: row-reverse; }

.chat-msg__av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.chat-msg__av--ai {
  background: var(--thread-light);
  color: var(--thread);
}

.chat-msg__av--user {
  background: var(--paper-2);
  color: var(--ink-2);
}

.chat-msg__bubble {
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 82%;
}

.chat-msg__bubble--ai {
  background: var(--paper-2);
  border-top-left-radius: 3px;
  color: var(--ink);
}

.chat-msg__bubble--user {
  background: var(--thread);
  color: #fff;
  border-top-right-radius: 3px;
}

.chat-extracted {
  background: #f0faf5;
  border: 1px solid #b7e4cc;
  border-radius: 6px;
  padding: 7px 10px;
  margin-top: 7px;
}

.chat-extracted__label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--thread);
  margin-bottom: 3px;
}

.chat-extracted__text {
  font-size: 11px;
  color: var(--thread);
  line-height: 1.45;
}

.chat-demo__input {
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.chat-demo__placeholder {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--sans);
}

.chat-demo__send {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--thread);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: background var(--duration);
}

.chat-demo__send:hover { background: #1f4d38; }

.chat-demo__send svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Typing dots */
.typing-dots { display: flex; gap: 3px; align-items: center; padding: 2px 0; }

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: typingBlink 1.3s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%            { opacity: 1;   transform: scale(1); }
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.how-cell {
  background: var(--paper);
  padding: 40px 36px;
  transition: background var(--duration) var(--ease-out);
  position: relative;
}

.how-cell:hover { background: var(--paper-2); }

.how-cell__num {
  font-family: var(--serif);
  font-size: 52px;
  color: var(--paper-3);
  line-height: 1;
  margin-bottom: 20px;
  transition: color var(--duration);
}

.how-cell:hover .how-cell__num { color: var(--thread-light); }

.how-cell__title {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--ink);
}

.how-cell__desc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 20px;
}

/* ============================================
   WHO IT'S FOR
   ============================================ */
.who-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.who-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.15s;
}

.who-item:first-child { border-top: 1px solid var(--rule); }

.who-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--paper-2);
  transition: border-color var(--duration), background var(--duration);
  flex-shrink: 0;
}

.who-item:hover .who-item__icon {
  border-color: var(--thread);
  background: var(--thread-light);
}

.who-item__title {
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.who-item__arrow {
  color: var(--thread);
  transition: transform var(--duration) var(--ease-out);
  opacity: 0;
}

.who-item:hover .who-item__arrow { opacity: 1; transform: translateX(4px); }

.who-item__desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* Preview card */
.who-preview {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
  position: sticky;
  top: 80px;
}

.who-preview__label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.who-preview__title {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 14px;
  color: var(--ink);
  transition: opacity 0.3s;
}

.who-preview__body {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 20px;
  transition: opacity 0.3s;
}

.who-preview__format {
  background: var(--amber-light);
  border: 1px solid rgba(199, 123, 46, .2);
  border-radius: 8px;
  padding: 14px 16px;
}

.who-preview__format-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--amber);
  margin-bottom: 6px;
}

.who-preview__format-text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ============================================
   DIFF SECTION
   ============================================ */
.diff-preview {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--rule-dark);
  border-radius: 12px;
  overflow: hidden;
}

.diff-preview__header {
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid var(--rule-dark);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.diff-preview__header-title {
  font-size: 13px;
  color: rgba(245, 242, 236, .55);
  flex: 1;
  min-width: 200px;
}

.diff-pill {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 3px;
}

.diff-pill--before { background: rgba(227,74,74,.15); color: #f09595; }
.diff-pill--after  { background: rgba(82,183,136,.15); color: var(--thread-mid); }

.diff-vs { color: rgba(245,242,236,.25); font-size: 12px; }

.diff-preview__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.diff-col {
  padding: 24px 26px;
}

.diff-col:first-child {
  border-right: 1px solid var(--rule-dark);
}

.diff-col__label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(245,242,236,.35);
  margin-bottom: 16px;
}

.diff-line {
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 10px;
  padding: 6px 9px;
  border-radius: 4px;
}

.diff-line--removed {
  background: rgba(227,74,74,.1);
  color: #f09595;
  text-decoration: line-through;
}

.diff-line--added {
  background: rgba(82,183,136,.1);
  color: var(--thread-mid);
}

.diff-line--neutral { color: rgba(245,242,236,.45); }

.diff-preview__explain {
  border-top: 1px solid var(--rule-dark);
  padding: 16px 26px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.diff-explain__icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--thread);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.diff-explain__icon svg { width: 10px; height: 10px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; }

.diff-explain__text {
  font-size: 12px;
  color: rgba(245, 242, 236, .5);
  line-height: 1.6;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testi-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 28px;
  transition: border-color var(--duration), transform var(--duration) var(--ease-out);
}

.testi-card:hover {
  border-color: var(--thread);
  transform: translateY(-2px);
}

.testi-card__quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 22px;
  color: var(--ink);
}

.testi-card__person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testi-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.testi-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.testi-card__role {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ============================================
   PRICING
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.price-cell {
  background: var(--paper);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
}

.price-cell--featured {
  background: var(--ink);
  color: var(--paper);
}

.price-cell__name {
  font-family: var(--serif);
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--ink);
}

.price-cell--featured .price-cell__name { color: var(--paper); }

.price-cell__amount {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--ink);
}

.price-cell--featured .price-cell__amount { color: var(--paper); }

.price-cell__period {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 28px;
  font-family: var(--mono);
}

.price-cell--featured .price-cell__period { color: rgba(245, 242, 236, .45); }

.price-cell__feats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 32px;
}

.price-cell__feats li {
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
}

.price-cell--featured .price-cell__feats li { color: rgba(245, 242, 236, .7); }

.price-cell__feats li::before {
  content: '—';
  color: var(--thread);
  flex-shrink: 0;
  font-weight: 500;
}

.price-cell--featured .price-cell__feats li::before { color: var(--thread-mid); }

.pricing-note {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 20px;
}

/* ============================================
   APP BANNER
   ============================================ */
.app-banner {
  background: var(--thread);
  border-bottom: none;
}

.app-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.app-banner__kicker { color: var(--thread-light); }
.app-banner__kicker::before { background: var(--thread-light); }

.app-banner__h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin-bottom: 14px;
  color: #fff;
  letter-spacing: -0.02em;
}

.app-banner__sub {
  font-size: 17px;
  color: rgba(255, 255, 255, .7);
  font-weight: 300;
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.65;
}

.app-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.app-store-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  padding: 11px 20px;
  color: #fff;
  text-decoration: none;
  transition: background var(--duration);
}

.app-store-btn:hover { background: rgba(255, 255, 255, .2); }

.app-store-btn svg { width: 26px; height: 26px; fill: #fff; flex-shrink: 0; }

.app-store-btn__small { font-size: 10px; opacity: .7; line-height: 1; margin-bottom: 2px; }
.app-store-btn__big   { font-size: 15px; font-weight: 500; line-height: 1; }

/* Phone mockups */
.app-phones {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-shrink: 0;
}

.phone-mockup {
  width: 136px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-mockup--short { height: 244px; }
.phone-mockup--tall  { height: 284px; }

.phone-mockup__bar {
  height: 32px;
  background: rgba(255, 255, 255, .07);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 4px;
  flex-shrink: 0;
}

.phone-mockup__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
}

.phone-mockup__content {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}

.phone-msg {
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 9px;
  line-height: 1.45;
}

.phone-msg--ai {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .8);
}

.phone-msg--user {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  align-self: flex-end;
  max-width: 82%;
}

.phone-tag {
  background: rgba(45, 106, 79, .4);
  border: 1px solid rgba(82, 183, 136, .3);
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 8px;
  color: var(--thread-mid);
  font-family: var(--mono);
}

.phone-resume-block {
  background: rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: 8px;
}

.phone-resume-block__title {
  font-size: 8px;
  color: rgba(255, 255, 255, .9);
  font-weight: 600;
  margin-bottom: 3px;
}

.phone-resume-block__text {
  font-size: 7px;
  color: rgba(255, 255, 255, .5);
  line-height: 1.45;
}

.phone-ats {
  background: rgba(82, 183, 136, .15);
  border: 1px solid rgba(82, 183, 136, .25);
  border-radius: 6px;
  padding: 8px;
}

.phone-ats__score {
  font-size: 8px;
  font-weight: 600;
  color: var(--thread-mid);
  margin-bottom: 2px;
  font-family: var(--mono);
}

.phone-ats__label {
  font-size: 7px;
  color: rgba(255, 255, 255, .45);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .who-layout { gap: 40px; }
  .who-preview { padding: 24px; }
}

@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; }
  .who-layout { grid-template-columns: 1fr; }
  .who-preview { position: static; }
  .testi-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .diff-preview__body { grid-template-columns: 1fr; }
  .diff-col:first-child { border-right: none; border-bottom: 1px solid var(--rule-dark); }
  .app-phones { display: none; }
  .how-cell { padding: 28px 24px; }
  .price-cell { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .chat-demo { max-width: 100%; }
  .section-title { font-size: clamp(30px, 8vw, 40px); }
}
