/* =============================================
   Plinth — Base Styles
   ============================================= */

/* --- Fonts & Root --- */
body {
  font-family: 'Inter', sans-serif;
  background: #F5F5F0;
}

.font-display {
  font-family: 'Instrument Serif', serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* --- Alpine.js --- */
[x-cloak] {
  display: none !important;
}

/* --- HTMX Loading Indicator --- */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease;
}

.htmx-request .htmx-indicator {
  opacity: 1;
}

.htmx-request.htmx-indicator {
  opacity: 1;
}

/* --- Suppress Browser Password Icons --- */

/* Hide the "eye" toggle in Edge / IE */
input::-ms-reveal {
  display: none !important;
}

/* Hide the "×" clear button in Edge / IE */
input::-ms-clear {
  display: none !important;
}

/* Hide Safari's auto-fill, credentials, and caps-lock icons */
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button,
input::-webkit-caps-lock-indicator {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* --- Utilities --- */

.truncate-text {
  display: block;           /* Necessary for truncation */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  /* Optional: Set a responsive max-width so it doesn't 
     stretch too far on giant monitors */
  max-width: 80vw; 
}

/* On mobile, you might want it even tighter */
@media (max-width: 640px) {
  .truncate-text {
    max-width: 250px;
  }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #D1D1CB;
  border-radius: 2px;
}

/* When the button has the loading class, show the spinner */
.btn-loading .spinner {
  display: block !important;
}

/* Optional: Fade the text slightly when loading */
.btn-loading .btn-text {
  opacity: 0.7;
}

/* Optional: Prevent clicks while loading */
.btn-loading {
  pointer-events: none;
}

/* Reveal animations */
.lp-reveal {
  opacity: 0;
  animation: reveal 0.8s ease forwards;
}
.lp-reveal-1 { animation-delay: 0.1s; }
.lp-reveal-2 { animation-delay: 0.2s; }
.lp-reveal-3 { animation-delay: 0.3s; }
.lp-reveal-4 { animation-delay: 0.4s; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(10px); }
}

/* Hero visual container - gives it floating space */
.portal-visual-wrap {
  position: relative;
  perspective: 1000px;
}

/* Hero visual - mock portal preview with floating effect */
.portal-frame {
  background: white;
  border: 1px solid #e5e1da;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 0 0 1px rgba(0,0,0,0.02),
    0 10px 30px rgba(0,0,0,0.06),
    0 30px 70px rgba(0,0,0,0.08),
    0 50px 100px rgba(0,0,0,0.05);
  transform: translateY(0) rotateX(1deg) rotateY(-2deg);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portal-frame:hover {
  transform: translateY(-8px) rotateX(0deg) rotateY(0deg);
  box-shadow: 
    0 0 0 1px rgba(0,0,0,0.02),
    0 15px 40px rgba(0,0,0,0.08),
    0 40px 90px rgba(0,0,0,0.1),
    0 60px 120px rgba(0,0,0,0.06);
}

.portal-header {
  background: #fafaf8;
  border-bottom: 1px solid #e5e1da;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e1da;
}

.portal-dot:nth-child(1) { background: #ff6b5a; }
.portal-dot:nth-child(2) { background: #ffbd2e; }
.portal-dot:nth-child(3) { background: #28ca42; }

.portal-title {
  margin-left: auto;
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  color: #d97841;
}

.portal-body {
  padding: 32px 24px;
  background: white;
}

.report-item {
  background: #fafaf8;
  border: 1px solid #e5e1da;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.report-item:hover {
  border-color: #d97841;
  transform: translateX(2px);
}

.report-icon {
  width: 40px;
  height: 40px;
  background: #d97841;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.report-meta {
  flex: 1;
}

.report-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1410;
  margin-bottom: 2px;
}

.report-date {
  font-size: 12px;
  color: #1a1410;
  opacity: 0.4;
}

.floating-badge-plinth {
  position: absolute;
  bottom: 24px;
  right: -12px;
  background: white;
  border: 1px solid #e5e1da;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: #1a1410;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.floating-badge-plinth .check {
  width: 16px;
  height: 16px;
  background: #d97841;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
}

/* Strip */
.feature-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  background: white;
  border-top: 1px solid #e5e1da;
  border-bottom: 1px solid #e5e1da;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1a1410;
  opacity: 0.6;
}

.strip-item svg {
  color: #d97841;
  opacity: 0.7;
}

/* Step cards enhancement */
.step-card {
  position: relative;
}

.step-card::after {
  content: '→';
  position: absolute;
  top: 40px;
  right: -20px;
  color: #d97841;
  opacity: 0.2;
  font-size: 24px;
}

.step-card:last-child::after {
  display: none;
}

@media (max-width: 768px) {
  .step-card::after {
    display: none;
  }
}

/* --- Footer --- */
.site-footer {
  background: #F5F5F0;
  color: #1a1410;
  border-top: 1px solid #D1D1CB;
  margin-top: auto;
}

.site-footer-landing {
  background: #fff;
  border-top-color: #e5e1da;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  font-weight: 600;
  color: #d97841;
}

.footer-blurb {
  font-size: 13px;
  color: #1a1410;
  opacity: 0.7;
  line-height: 1.6;
  margin: 0;
}

.footer-col-heading {
  font-size: 12px;
  font-weight: 600;
  color: #1a1410;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.footer-link {
  font-size: 13px;
  color: #1a1410;
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-link:hover {
  opacity: 1;
  color: #d97841;
}

.footer-bar {
  border-top: 1px solid #D1D1CB;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer-landing .footer-bar {
  border-top-color: #e5e1da;
}

.footer-copy {
  font-size: 12px;
  color: #1a1410;
  opacity: 0.5;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal-link {
  font-size: 12px;
  color: #1a1410;
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-legal-link:hover {
  opacity: 1;
  color: #d97841;
}

.footer-slim {
  background: #F5F5F0;
  color: #1a1410;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal {
    width: 100%;
  }
}
