/* =========================================
   Unfurl — unfurl.bot
   Color palette derived from pangolin logo:
   - Dark teal:    #1B4B47
   - Mid teal:     #3A7A73
   - Mint:         #8ECFC6
   - Light mint:   #B5DFD8
   - Cream:        #F2E0C9
   - Pale:         #F8F4EF
   ========================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --dark: #1B4B47;
  --dark-deep: #0F2E2B;
  --mid: #3A7A73;
  --mint: #8ECFC6;
  --mint-light: #B5DFD8;
  --mint-pale: #DAF0EC;
  --cream: #F2E0C9;
  --cream-light: #F8F4EF;
  --white: #FFFFFF;
  --text: #1B4B47;
  --text-muted: #4A8A83;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream-light);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Floating pangolin scales (decorative) ---- */
.scales {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.scale {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--mint);
  border-radius: 2px 12px 2px 12px;
  opacity: 0.08;
  animation: float 20s infinite ease-in-out;
}

.scale:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; animation-duration: 22s; }
.scale:nth-child(2) { top: 20%; right: 10%; animation-delay: -3s; animation-duration: 18s; width: 28px; height: 28px; }
.scale:nth-child(3) { top: 50%; left: 15%; animation-delay: -7s; animation-duration: 25s; }
.scale:nth-child(4) { top: 70%; right: 20%; animation-delay: -11s; animation-duration: 20s; width: 16px; height: 16px; }
.scale:nth-child(5) { top: 85%; left: 8%; animation-delay: -4s; animation-duration: 23s; width: 24px; height: 24px; }
.scale:nth-child(6) { top: 35%; right: 5%; animation-delay: -9s; animation-duration: 19s; }
.scale:nth-child(7) { top: 60%; left: 80%; animation-delay: -14s; animation-duration: 24s; width: 14px; height: 14px; }
.scale:nth-child(8) { top: 5%; left: 60%; animation-delay: -6s; animation-duration: 21s; width: 22px; height: 22px; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(5deg); }
  50% { transform: translateY(-10px) rotate(-3deg); }
  75% { transform: translateY(-25px) rotate(4deg); }
}

/* ---- Nav ---- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(248, 244, 239, 0.8);
  border-bottom: 1px solid rgba(142, 207, 198, 0.2);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.visible {
  transform: translateY(0);
  opacity: 1;
}

nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-logo img {
  border-radius: 8px;
}

/* ---- Buttons ---- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--mid) 100%);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 8px rgba(27, 75, 71, 0.2),
    0 0 0 0 rgba(142, 207, 198, 0);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 24px rgba(27, 75, 71, 0.3),
    0 0 0 3px rgba(142, 207, 198, 0.3);
  background: linear-gradient(135deg, var(--mid) 0%, #4A9A91 100%);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 80px;
  background: linear-gradient(180deg, var(--cream-light) 0%, var(--mint-pale) 100%);
}

.hero-content {
  text-align: center;
  max-width: 640px;
}

.hero-logo {
  margin-bottom: 32px;
}

.hero-logo img {
  width: 180px;
  height: 180px;
  border-radius: 40px;
  box-shadow:
    0 20px 60px rgba(27, 75, 71, 0.15),
    0 0 0 1px rgba(142, 207, 198, 0.3);
  animation: logoEntry 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-logo img:hover {
  transform: scale(1.05) rotate(-3deg);
}

@keyframes logoEntry {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--dark);
  margin-bottom: 20px;
}

h1 em {
  font-style: normal;
  color: var(--mid);
  position: relative;
}

h1 em::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--mint);
  border-radius: 3px;
  opacity: 0.5;
  z-index: -1;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ---- Features ---- */
.features {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  background: var(--white);
}

.features h2,
.platforms h2,
.how h2 {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--cream-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--mint);
  box-shadow: 0 12px 32px rgba(27, 75, 71, 0.08);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mint-pale);
  color: var(--mid);
  border-radius: 14px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Platforms ---- */
.platforms {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  background: linear-gradient(180deg, var(--mint-pale) 0%, var(--cream-light) 100%);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-top: -32px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.platform-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
}

.platform-tag {
  padding: 10px 22px;
  background: var(--white);
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  border: 1.5px solid var(--mint-light);
  transition: all 0.2s ease;
}

.platform-tag:hover {
  border-color: var(--mid);
  background: var(--mint-pale);
}

.platform-tag.highlight {
  background: var(--dark);
  color: var(--cream);
  border-color: var(--dark);
}

.platform-tag.highlight:hover {
  background: var(--mid);
  border-color: var(--mid);
}

/* ---- How it works ---- */
.how {
  position: relative;
  z-index: 1;
  padding: 100px 0;
  background: var(--white);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 520px;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mint);
  color: var(--dark);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 14px;
}

.step-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.step-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---- CTA ---- */
.cta {
  position: relative;
  z-index: 1;
  padding: 80px 0 120px;
  background: linear-gradient(180deg, var(--cream-light) 0%, var(--mint-pale) 100%);
}

.cta-card {
  text-align: center;
  background: var(--white);
  border-radius: 28px;
  padding: 64px 40px;
  box-shadow: 0 20px 60px rgba(27, 75, 71, 0.08);
  border: 1px solid rgba(142, 207, 198, 0.3);
}

.cta-logo {
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(27, 75, 71, 0.1);
}

.cta-card h2 {
  margin-bottom: 12px;
}

.cta-card p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

/* ---- Footer ---- */
footer {
  position: relative;
  z-index: 1;
  background: var(--dark-deep);
  color: var(--mint-light);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-brand img {
  border-radius: 6px;
  opacity: 0.9;
}

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

.footer-links a {
  color: var(--mint-light);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

/* ---- Legal pages ---- */
.legal {
  position: relative;
  z-index: 1;
  padding: 100px 0 80px;
  background: var(--white);
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal ul {
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}

.legal li {
  margin-bottom: 4px;
}

.legal a {
  color: var(--mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal a:hover {
  color: var(--dark);
}

.legal code {
  background: var(--mint-pale);
  color: var(--dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

.legal strong {
  color: var(--dark);
  font-weight: 600;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mint-pale);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-table th {
  color: var(--dark);
  font-weight: 600;
  background: var(--cream-light);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero {
    min-height: auto;
    padding: 80px 24px 60px;
  }

  .hero-logo img {
    width: 140px;
    height: 140px;
    border-radius: 32px;
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .cta-card {
    padding: 48px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .platform-grid {
    gap: 8px;
  }

  .platform-tag {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}
