/* ============================================================
   HLS Trading — Legal Pages (Privacy, Terms, FAQ)
   Shares design tokens with landing/css/main.css
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --cream:        #faf3e8;
  --cream-mid:    #f2e8d5;
  --navy:         #1e2d4a;
  --navy-deep:    #0d1b2e;
  --coral:        #e8895a;
  --coral-hover:  #d4733f;
  --body:         #4a5060;
  --muted:        #8a8278;
  --white:        #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --max-w:        1100px;
  --max-w-content: 760px;
  --nav-h:        68px;
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── NAV ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 200;
  background: var(--cream);
  transition: box-shadow 0.3s var(--ease-std);
}
.nav.nav--scrolled {
  background: rgba(250, 243, 232, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(30, 45, 74, 0.08);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex; align-items: center; gap: 0.6rem;
  transition: opacity 0.2s;
}
.nav__logo:hover { opacity: 0.75; }
.nav__logo-img {
  height: 36px; width: auto; display: block;
}
.nav__logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 500;
  color: var(--navy); letter-spacing: 0.03em;
}
.nav__links {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav__link {
  font-size: 0.82rem; font-weight: 400;
  color: var(--navy);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.nav__link:hover { color: var(--coral); background: rgba(232, 137, 90, 0.07); }
.nav__link--cta {
  background: var(--navy); color: var(--white);
  margin-left: 0.5rem; padding: 0.5rem 1.1rem;
}
.nav__link--cta:hover { background: var(--coral); color: var(--white); }

/* Mobile burger */
.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
}
.nav__burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--navy);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }
.nav__drawer {
  display: none; flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  background: rgba(250, 243, 232, 0.98);
  border-top: 1px solid rgba(30, 45, 74, 0.08);
}
.nav__drawer.open { display: flex; }
.nav__drawer .nav__link {
  padding: 0.75rem 0; border-radius: 0;
  border-bottom: 1px solid rgba(30, 45, 74, 0.06); font-size: 1rem;
}
.nav__drawer .nav__link--cta {
  margin-left: 0; margin-top: 0.75rem; text-align: center;
  border-bottom: none; border-radius: 6px;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + clamp(3rem, 6vw, 5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  max-width: var(--max-w-content);
  margin: 0 auto;
}
.page-header__label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
  animation: fadeUp 0.6s var(--ease) 0.1s both;
}
.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}
.page-header__rule {
  width: 40px; height: 2px;
  background: var(--coral);
  transform-origin: left center;
  animation: ruleExpand 0.6s var(--ease) 0.7s both;
}
.page-header__meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 1rem;
  animation: fadeUp 0.6s var(--ease) 0.5s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ruleExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── CONTENT AREA ────────────────────────────────────────── */
.page-content {
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(5rem, 10vw, 8rem);
}

/* divider between header and content */
.page-divider {
  max-width: var(--max-w-content);
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  height: 1px;
  background: rgba(30, 45, 74, 0.08);
}

/* ── LEGAL DOCUMENT STYLES ───────────────────────────────── */
.legal-section {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  animation: fadeUp 0.6s var(--ease) both;
}
.legal-section:nth-child(1)  { animation-delay: 0.05s; }
.legal-section:nth-child(2)  { animation-delay: 0.10s; }
.legal-section:nth-child(3)  { animation-delay: 0.15s; }
.legal-section:nth-child(4)  { animation-delay: 0.20s; }
.legal-section:nth-child(5)  { animation-delay: 0.25s; }
.legal-section:nth-child(6)  { animation-delay: 0.30s; }
.legal-section:nth-child(7)  { animation-delay: 0.35s; }
.legal-section:nth-child(8)  { animation-delay: 0.40s; }

.legal-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(30, 45, 74, 0.07);
}
.legal-section p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--body);
  margin-bottom: 0.85rem;
}
.legal-section ul {
  margin: 0.5rem 0 1rem 0;
  padding: 0;
  list-style: none;
}
.legal-section ul li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--body);
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.75rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral);
  opacity: 0.7;
}
.legal-section a {
  color: var(--coral);
  border-bottom: 1px solid rgba(232, 137, 90, 0.3);
  transition: border-color 0.2s;
}
.legal-section a:hover { border-color: var(--coral); }

/* ── FAQ STYLES ──────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid rgba(30, 45, 74, 0.07);
  animation: fadeUp 0.6s var(--ease) both;
}
.faq-item:nth-child(1)  { animation-delay: 0.05s; }
.faq-item:nth-child(2)  { animation-delay: 0.10s; }
.faq-item:nth-child(3)  { animation-delay: 0.15s; }
.faq-item:nth-child(4)  { animation-delay: 0.20s; }
.faq-item:nth-child(5)  { animation-delay: 0.25s; }
.faq-item:nth-child(6)  { animation-delay: 0.30s; }
.faq-item:nth-child(7)  { animation-delay: 0.35s; }
.faq-item:nth-child(8)  { animation-delay: 0.40s; }
.faq-item:nth-child(9)  { animation-delay: 0.45s; }
.faq-item:nth-child(10) { animation-delay: 0.50s; }
.faq-item:nth-child(11) { animation-delay: 0.55s; }

.faq-toggle {
  width: 100%;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0;
  text-align: left;
}
.faq-question {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.faq-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(30, 45, 74, 0.2);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease-std), border-color 0.25s, transform 0.35s var(--ease);
  color: var(--navy);
  font-size: 0.9rem;
}
.faq-toggle:hover .faq-icon {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
}
.faq-item.open .faq-icon {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--white);
  transform: rotate(45deg);
}
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding-bottom: 1.25rem;
}
.faq-answer p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--body);
}
.faq-answer a {
  color: var(--coral);
  border-bottom: 1px solid rgba(232, 137, 90, 0.3);
  transition: border-color 0.2s;
}
.faq-answer a:hover { border-color: var(--coral); }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--navy-deep, #0d1b2e);
  color: rgba(250, 243, 232, 0.55);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}
.footer__name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 400;
  color: rgba(250, 243, 232, 0.9);
  letter-spacing: 0.03em; margin-bottom: 0.3rem;
}
.footer__tagline {
  font-size: 0.78rem; letter-spacing: 0.08em;
  color: rgba(250, 243, 232, 0.35);
}
.footer__nav {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem;
}
.footer__nav a {
  font-size: 0.82rem; letter-spacing: 0.06em;
  color: rgba(250, 243, 232, 0.5);
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--coral); }
.footer__contact { text-align: right; }
.footer__contact a {
  font-size: 0.88rem;
  color: rgba(250, 243, 232, 0.55);
  transition: color 0.2s; letter-spacing: 0.02em;
}
.footer__contact a:hover { color: var(--coral); }
.footer__bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: rgba(250, 243, 232, 0.3);
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.footer__bottom a { color: rgba(250, 243, 232, 0.35); transition: color 0.2s; }
.footer__bottom a:hover { color: rgba(250, 243, 232, 0.65); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__contact { text-align: center; }
  .footer__nav { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}
