/* ==========================================================================
   Components — shared, reusable UI pieces
   Import order: variables -> base -> components -> (page-specific, if any)
   ========================================================================== */

@import './variables.css';

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.01em;
  transition: background var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}
.btn-outline:hover { background: var(--color-ink); color: var(--color-white); }

.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--color-white);
}
.btn-outline-light:hover {
  background: var(--color-white);
  color: var(--color-ink);
  border-color: var(--color-white);
}

/* ---------- Site header / nav ---------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  transition: background var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.site-header.is-scrolled,
.site-header.is-solid {
  position: sticky;
  background: var(--color-ink);
}

.logo-mark {
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--color-white);
  font-weight: 600;
  font-size: 1rem;
}
.logo-wrap { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.logo-sub {
  margin-top: 3px;
  font-size: 6px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  text-transform: uppercase;
}

.btn-text-light {
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--fs-small);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-block: 0.85rem;
  transition: color var(--dur-fast) var(--ease-standard);
}
.btn-text-light:hover { color: var(--color-rust); }

.nav-link-dark {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.85);
  position: relative;
  padding-block: 0.25rem;
}
.nav-link-dark::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-rust);
  transition: width var(--dur-base) var(--ease-standard);
}
.nav-link-dark:hover, .nav-link-dark[aria-current="page"] { color: var(--color-rust); }
.nav-link-dark:hover::after, .nav-link-dark[aria-current="page"]::after { width: 100%; }

.nav-link {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-ink);
  padding-block: 0.25rem;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: width var(--dur-base) var(--ease-standard);
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { width: 100%; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-ink);
  transition: transform var(--dur-base) var(--ease-standard), opacity var(--dur-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

/* ---------- Stat ---------- */
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 600;
  color: var(--color-white);
}
.stat-label {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.75);
}

/* ---------- Process step ---------- */
.step-index {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-accent);
  line-height: 1;
}

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-ink);
}

.faq-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 0;
  color: var(--color-rust);
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq-icon::before { content: "+"; }
.faq-trigger[aria-expanded="true"] .faq-icon::before { content: "\2212"; } /* minus sign */
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
.faq-icon::after   { top: 0; left: 50%; width: 2px; height: 100%; transform: translateX(-50%); }
.faq-trigger[aria-expanded="true"] .faq-icon::after { transform: translateX(-50%) scaleY(0); }

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-standard);
}
.faq-panel > p { padding-bottom: var(--space-3); }

.faq-item-pill {
  background: var(--color-paperdim);
  border: none;
  border-radius: 28px;
  box-shadow: 0 2px 6px rgba(46,42,36,0.05);
  overflow: hidden;
  transition: background var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.faq-item-pill.is-open {
  background: var(--color-white);
  box-shadow: 0 18px 36px rgba(46,42,36,0.10);
}
.faq-item-pill .faq-trigger { padding: 1.5rem 1.75rem; font-size: 1.1rem; font-weight: 500; gap: 1rem; line-height: 1.2; }
.faq-item-pill .faq-panel > p { padding: 0 1.75rem 1.75rem; color: var(--color-ink-soft); }

/* ---------- Torn-paper section dividers ---------- */
/* A jagged-edge strip placed between sections. Set --torn-color to the
   color of the section that should appear "torn" (the one on top). */
.torn-divider {
  --torn-color: var(--color-paper);
  position: relative;
  height: 48px;
  margin-top: -1px;
  background: var(--torn-color);
  clip-path: polygon(
    0% 0%, 3% 62%, 6% 20%, 9% 78%, 12% 35%, 15% 90%, 18% 15%, 21% 68%,
    24% 25%, 27% 82%, 30% 40%, 33% 95%, 36% 10%, 39% 70%, 42% 30%, 45% 85%,
    48% 45%, 51% 100%, 54% 20%, 57% 75%, 60% 35%, 63% 88%, 66% 15%, 69% 65%,
    72% 28%, 75% 80%, 78% 40%, 81% 92%, 84% 18%, 87% 72%, 90% 32%, 93% 86%,
    96% 22%, 100% 60%, 100% 0%
  );
}

/* ---------- Decorative dot texture ---------- */
.dot-texture {
  background-image: radial-gradient(var(--color-rust) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.35;
}

/* ---------- Icon badge (why choose us) ---------- */
.icon-badge {
  width: 56px;
  height: 56px;
  /* border-radius: 999px;
  border: 1.5px solid var(--color-rust); */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rust);
}

/* ---------- Process timeline (numbered, dotted connector) ---------- */
.process-number {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  line-height: 1;
}
.process-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--color-rust);
  margin-block: 0.85rem;
}
.process-connector {
  position: absolute;
  top: 2.2rem;
  left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.35) 0 6px, transparent 6px 12px);
  z-index: 0;
}

/* ---------- FAQ pill style ---------- */
.faq-item-pill {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(27,26,23,0.04);
  overflow: hidden;
  transition: border-radius var(--dur-base) var(--ease-standard);
}


/* ---------- Social icon circle ---------- */
.social-circle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.social-circle:hover { background: var(--color-rust); border-color: var(--color-rust); color: var(--color-white); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-standard), transform 700ms var(--ease-standard);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Mobile nav panel ---------- */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-standard);
  border-top: 1px solid var(--color-border);
}
.mobile-nav.is-open { max-height: 400px; }

@media (max-width: 768px), (hover: none) {
  .bg-fixed-parallax {
    background-attachment: scroll !important;
  }
}

/* ---------- Underline-style form fields (contact page) ---------- */
.field-line { margin-bottom: 1.6rem; }
.field-line label {
  display: block;
  font-size: 0.92rem;
  color: var(--color-ink-soft);
  margin-bottom: 0.6rem;
}
.field-line input,
.field-line select,
.field-line textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-line);
  background: transparent;
  padding: 0.4rem 0.1rem 0.6rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--color-ink);
  border-radius: 0;
  appearance: none;
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.field-line select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B6559'%3E%3Cpath d='M5.25 7.5L10 12.25l4.75-4.75' stroke='%236B6559' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.1rem center;
  background-size: 1rem;
  padding-right: 1.5rem;
}
.field-line textarea { resize: vertical; min-height: 130px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; }
.field-line input:focus,
.field-line select:focus,
.field-line textarea:focus {
  outline: none;
  border-color: var(--color-rust);
}
.field-line input[type="file"] {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
}