/* ============================================================
   components.css — Remidiy
   Nav, buttons, cards, forms, FAQ.
   ============================================================ */

/* ----- Top nav (fixed, blurred only when scrolled) ----- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(26, 26, 26, 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #ffffff;
}
.logo-img {
  height: 86px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 19px;
  color: var(--text-2);
}
.nav-links a {
  padding: 8px 12px;
  border-radius: var(--r-s);
  white-space: nowrap;   /* keep multi-word links (e.g. "How it works") on one line */
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-links a:hover {
  color: var(--text-0);
  background: var(--bg-2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-phone {
  font-size: 19px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-s);
  transition: color 0.18s var(--ease);
}
.nav-phone:hover { color: var(--text-0); }
.nav .btn { font-size: 17px; }   /* nav CTA tracks the +20% nav text bump */

/* With the larger nav text the links+email need more room — collapse them to
   just logo + CTA a bit earlier than the layout breakpoint (980px). */
@media (max-width: 1080px) {
  .nav-links, .nav-phone { display: none; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 11px 18px;
  background: var(--accent);
  color: var(--bg-0);
  border: 1px solid var(--accent);
  border-radius: var(--r-s);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.btn:active { transform: translateY(1px); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.22s var(--ease);
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-lg { padding: 14px 22px; font-size: 17px; }

.btn-ghost {
  background: transparent;
  color: var(--text-0);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--border-3);
  color: var(--text-0);
}

.btn-mute {
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--border-2);
}
.btn-mute:hover {
  background: var(--bg-3);
  border-color: var(--border-3);
}

/* ----- Card — the default raised surface ----- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 28px;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.card:hover {
  border-color: var(--border-2);
  background: var(--bg-2);
}

/* ----- Icon tile ----- */
.icon-tile {
  width: 36px; height: 36px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--accent);
  border-radius: var(--r-s);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 20px;
}

/* ----- Form ----- */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
}
.form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.form input,
.form select,
.form textarea {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-s);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--text-0);
  outline: none;
  width: 100%;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.form input::placeholder, .form textarea::placeholder { color: var(--text-3); }
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(141, 181, 128, 0.12);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form .btn { margin-top: 6px; align-self: stretch; justify-content: center; }

/* Select arrow */
.form select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 12px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* ----- FAQ ----- */
.faq-item {
  border-bottom: 1px solid var(--border);
  transition: border-color 0.22s var(--ease);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;              /* whole header row is now the click target */
  cursor: pointer;
  user-select: none;           /* clicks/taps don't select the text */
  -webkit-tap-highlight-color: transparent;
  font-size: 17.5px;
  font-weight: 500;
  color: var(--text-0);
  transition: color 0.18s var(--ease);
}
.faq-item:hover .faq-q { color: var(--accent-2); }
.faq-icon {
  width: 20px; height: 20px;
  position: relative;
  flex-shrink: 0;
  color: var(--text-2);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-icon::before { width: 12px; height: 1.5px; }
.faq-icon::after  { width: 1.5px; height: 12px; transition: transform 0.3s var(--ease); }
.faq-item.open .faq-icon { color: var(--accent); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) scaleY(0); }

/* Smooth expand: js/ui.js animates height to the answer's exact pixel height,
   so it eases cleanly (a max-height guess overshoots and snaps). */
.faq-a {
  height: 0;
  overflow: hidden;
  transition: height 0.35s var(--ease);
}
.faq-a p {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.6;
  max-width: 60ch;
  padding-bottom: 22px;        /* space below the answer before the divider */
}
@media (prefers-reduced-motion: reduce) {
  .faq-a { transition: none; }
}

/* ----- Draw-on underline for text links ----- */
.link-underline,
.footer-col a {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: background-size 0.3s var(--ease), color 0.18s var(--ease);
}
.link-underline:hover,
.footer-col a:hover { background-size: 100% 1.5px; color: var(--text-0); }

/* ----- Typing caret for the hero heading ----- */
.type-caret {
  display: inline-block;
  width: 0.07em;
  height: 0.92em;
  margin-left: 0.04em;
  vertical-align: -0.1em;
  background: var(--accent);
  border-radius: 1px;
  animation: caret-blink 0.9s steps(1) infinite;
}
@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
#hero-heading.typing { white-space: pre-wrap; } /* keep typed spaces from collapsing */
@media (prefers-reduced-motion: reduce) {
  .type-caret { display: none; }
}

/* ----- Pill (small inline tag) ----- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-mute);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
