/* ==========================================================================
   OrderHere Legal Center Stylesheet
   Modern, elegant, neumorphic legal layout with rich typography and responsive UX
   ========================================================================== */

:root {
  --navy: #eef1f6;
  --navy-2: #e7ebf1;
  --navy-3: #dfe4ec;
  --logo: #f09020;
  --gold: #d98a1a;
  --gold-2: #f09020;
  --gold-deep: #8f5f0a;
  --cream: #eef1f6;
  --paper: #eef1f6;
  --ink: #2b2f36;
  --ink-secondary: #4b5563;
  --muted: #6b7280;
  --line: #dbe1ea;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: -6px -6px 14px #ffffff, 8px 8px 20px #c8d0dd;
  --nm-bg: #eef1f6;
  --nm-light: #ffffff;
  --nm-dark: #c8d0dd;
  --nm-raised: -6px -6px 12px var(--nm-light), 6px 6px 14px var(--nm-dark);
  --nm-raised-sm: -3px -3px 8px var(--nm-light), 3px 3px 8px var(--nm-dark);
  --nm-inset: inset -4px -4px 9px var(--nm-light), inset 4px 4px 9px var(--nm-dark);
  --ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-serif: Neuton, ui-serif, Georgia, Cambria, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 8px;
}

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* Container */
.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* ================= Topbar Header ================= */
.legal-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 0;
  background: rgba(238, 241, 246, 0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(200, 208, 221, 0.6);
  transition: box-shadow 0.25s;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  font-size: 1.3rem;
  letter-spacing: -0.7px;
  white-space: nowrap;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.brand span:last-child b {
  color: var(--gold-2);
}

.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--nm-bg);
  box-shadow: var(--nm-raised-sm);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
  color: var(--ink);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--nm-raised);
}

.btn:active {
  box-shadow: var(--nm-inset);
  transform: translateY(0);
}

.btn-home {
  color: var(--ink);
  border-color: rgba(200, 208, 221, 0.5);
}

.btn-home:hover {
  color: var(--gold-deep);
}

.btn-wa {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  border: none;
}

.btn-wa:hover {
  background: #20bd5a;
  color: #ffffff;
}

.wa-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* ================= Hero / Banner ================= */
.legal-hero {
  padding: 46px 0 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(238, 241, 246, 0) 100%);
  border-bottom: 1px solid rgba(219, 225, 234, 0.8);
}

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.legal-breadcrumbs a {
  color: var(--ink);
  transition: color 0.2s;
}

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

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(240, 144, 32, 0.12);
  border: 1px solid rgba(240, 144, 32, 0.28);
  border-radius: 999px;
  color: var(--gold-deep);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.legal-title em {
  font-style: italic;
  color: var(--gold-2);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-summary-card {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--nm-raised-sm);
  border-left: 5px solid var(--gold-2);
  margin-top: 18px;
  font-size: 0.94rem;
  color: var(--ink-secondary);
}

.legal-summary-card strong {
  color: var(--ink);
  display: block;
  font-size: 1.02rem;
  margin-bottom: 6px;
}

/* ================= Main Layout ================= */
.legal-main {
  padding: 44px 0 80px;
}

.legal-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* Sticky Sidebar */
.legal-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-box {
  background: var(--nm-bg);
  box-shadow: var(--nm-raised);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin: 0 0 14px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all 0.2s;
}

.sidebar-nav-link:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--gold-deep);
  transform: translateX(3px);
}

.sidebar-nav-link.active {
  background: #ffffff;
  color: var(--gold-2);
  font-weight: 700;
  box-shadow: var(--nm-raised-sm);
  border-left: 3px solid var(--gold-2);
}

/* In-page Anchor Navigation */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-link {
  font-size: 0.84rem;
  color: var(--muted);
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--gold-2);
  background: rgba(255, 255, 255, 0.5);
  padding-left: 14px;
}

/* ================= Content Article ================= */
.legal-content {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 42px 48px;
  box-shadow: var(--nm-raised);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.legal-section {
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--ink);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-num {
  font-family: var(--ui);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-2);
  background: rgba(240, 144, 32, 0.12);
  padding: 3px 9px;
  border-radius: 6px;
}

.legal-section h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin: 22px 0 10px;
  font-weight: 700;
}

.legal-section p {
  color: var(--ink-secondary);
  font-size: 0.96rem;
  line-height: 1.72;
  margin: 0 0 16px;
}

.legal-section ul,
.legal-section ol {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  padding-left: 24px;
  margin: 0 0 18px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-section li strong {
  color: var(--ink);
}

/* Callout Box */
.callout {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
  background: var(--navy);
  box-shadow: var(--nm-inset);
  font-size: 0.92rem;
  color: var(--ink-secondary);
  border-left: 4px solid var(--gold-2);
}

.callout strong {
  color: var(--ink);
}

.callout-statutory {
  border-left-color: #2563eb;
  background: #f0f5ff;
  box-shadow: none;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
}

/* Contact Card Box */
.legal-contact-card {
  background: var(--nm-bg);
  box-shadow: var(--nm-raised-sm);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.contact-item {
  background: #ffffff;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--nm-raised-sm);
}

.contact-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.contact-value a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-value a:hover {
  color: var(--gold-2);
}

/* ================= Footer ================= */
footer {
  background: var(--nm-bg);
  color: var(--muted);
  padding: 34px 0 28px;
  font-size: 0.84rem;
  border-top: 1px solid rgba(200, 208, 221, 0.7);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
}

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

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(240, 144, 32, 0.16);
  margin-top: 22px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.76rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-legal-links a {
  color: var(--muted);
  transition: color 0.2s;
}

.footer-legal-links a:hover,
.footer-legal-links a.active {
  color: var(--gold-2);
  text-decoration: underline;
}

/* ================= Responsive Queries ================= */
@media (max-width: 960px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .legal-sidebar {
    position: static;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
  }

  .legal-content {
    padding: 30px 24px;
  }
}

@media (max-width: 640px) {
  .legal-header {
    padding: 10px 0;
  }

  .legal-title {
    font-size: 1.85rem;
  }

  .legal-content {
    padding: 24px 18px;
  }

  .legal-section h2 {
    font-size: 1.4rem;
    flex-direction: column;
    gap: 6px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media print {
  .legal-header,
  .legal-sidebar,
  footer,
  .nav-actions-right {
    display: none !important;
  }

  .legal-grid {
    display: block;
  }

  .legal-content {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}
