/* ==========================================
   Shared components, despite the name: stats, feature rows, the capture
   loupe, FAQ, form fields, the mailing-list form. Loaded on top of
   styles.css; page.css comes after it.
   ========================================== */

/* --- Hero --- */

.tb-hero-try {
  margin-top: 18px;
  font-size: 0.9rem;
}

.tb-hero-try a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.tb-hero-try a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Icons come from the TesselBee set (views/partials/icon.ejs): 1.5 stroke,
   currentColor, only the size changes. */
.tb-icon {
  flex-shrink: 0;
  vertical-align: -0.15em;
}

/* --- Feature rows --- */

.tb-shot {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-frame);
  box-shadow: var(--shadow-lg);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.tb-shot:hover {
  border-color: var(--line-strong);
}

.tb-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Demo --- */
.tb-hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* --- Capture loupe --- */
img[data-zoom] {
  cursor: zoom-in;
  /* A finger on a capture belongs to the loupe: no scroll, no pinch,
     no iOS long-press callout, no selection wiggle, no image drag. */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.tb-loupe {
  position: fixed;
  width: 260px;
  height: 180px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  background-color: var(--surface-raised);
  background-repeat: no-repeat;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  z-index: 200;
}

/* --- FAQ --- */

.tb-faq-list {
  max-width: 760px;
}

.tb-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.tb-faq-item:hover {
  border-color: var(--line-strong);
}

.tb-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 48px 18px 22px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-bright);
  position: relative;
  transition: color var(--duration-fast) var(--ease-out);
}

.tb-faq-item summary::-webkit-details-marker {
  display: none;
}

/* The app's disclosure pair: chevron right when closed, down when open. */
.tb-faq-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  translate: 0 -50%;
  display: flex;
  color: var(--accent);
}

.tb-faq-icon .tb-icon + .tb-icon,
.tb-faq-item[open] .tb-faq-icon .tb-icon:first-child { display: none; }
.tb-faq-item[open] .tb-faq-icon .tb-icon + .tb-icon { display: block; }

.tb-faq-item summary:hover {
  color: var(--ink-strong);
}

.tb-faq-item p {
  padding: 0 22px 18px;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 660px;
}

/* --- Form pieces, shared with the home contact form --- */

.tb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* --- Mailing list (hero + #news) --- */
.tb-hero-subscribe {
  margin: 0 auto;
  max-width: 480px;
}

.tb-subscribe-form {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--surface-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

/* The field is a control: --line-strong at rest (3:1 and more), the
   charter's focus ring when the address is being typed. */
.tb-subscribe-form {
  border-color: var(--line-strong);
}

.tb-subscribe-form:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.tb-subscribe-field {
  flex: 1;
  min-width: 0;
  display: flex;
}

.tb-subscribe-field input {
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--ink-strong);
  font-family: var(--font);
  font-size: 1rem;
}

.tb-subscribe-field input::placeholder {
  color: var(--ink-faint);
}

.tb-subscribe-field input:focus {
  outline: none;
}

.tb-subscribe-form .btn {
  flex-shrink: 0;
  justify-content: center;
}

/* Danger is never colour alone: the message is a sentence. */
.tb-subscribe-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* A real commitment, so ink-soft rather than fine-print grey. */
.tb-subscribe-privacy {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.tb-subscribe-done {
  font-weight: 600;
  color: var(--ink-strong);
  padding: 14px 0;
}

/* .cta-box p sets a 36px gap meant for the last paragraph before buttons;
   the form's own lines sit tighter. */
.cta-box .tb-subscribe {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.cta-box .tb-subscribe p {
  margin-bottom: 0;
  font-size: inherit;
}

.cta-box .tb-subscribe .tb-subscribe-privacy {
  font-size: 0.78rem;
}

.cta-box .tb-subscribe-done {
  text-align: center;
}

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

/* --- Footer --- */
.tb-footer .footer-inner {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .tb-footer .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {

  .tb-footer .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .tb-subscribe-form {
    flex-direction: column;
  }
}
