/* ============================================================
   HEURISKA INVESTMENT ADVISORS — MAIN STYLESHEET
   All pages import this file. Change once, updates everywhere.
   ============================================================ */

/* ── BRAND FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@400;500;700&display=swap');

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

/* ── DESIGN TOKENS ── */
:root {
  /* Colours — warm cream background, deep maroon text/brand */
  --black:        #2b0506;   /* primary text — dark wine, 7.5:1 contrast on bg */
  --off-black:    #1c0303;   /* darker wine for hover states */
  --dark-grey:    #4d1212;   /* secondary text — still strong contrast */
  --mid-grey:     #6e2120;   /* tertiary text — readable, not faint */
  --light-grey:   #8f3a37;   /* labels, meta — warm wine, muted but legible */
  --pale-grey:    #a85c58;   /* faint dividers, disabled states */
  --rule:         #c2a3a1;   /* hairline rules on dusty rose */
  --bg:           #dabfbe;   /* main site background — light dusty rose */
  --bg-subtle:    #d0b1b0;   /* slightly deeper rose for cards/sections */
  --nav-bg:       #dabfbe;   /* NAV strip background — matches site */
  --nav-text:     #2b0506;   /* NAV text — dark wine */
  --green:        #2a7a3b;
  --green-bg:     #edf7e8;
  --red:          #a8281e;
  --red-bg:       #fbe9e6;

  /* Typography */
  --serif:  'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans:   'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2.5rem;
  --space-2xl:  4rem;
  --space-3xl:  6rem;

  /* Layout */
  --max-width:  1100px;
  --nav-height: 58px;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  6px;
  --radius-lg:  10px;
  --radius-xl:  16px;
  --border:     0.5px solid var(--rule);
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: var(--sans); }

/* ── LAYOUT UTILITIES ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.page-content {
  flex: 1;
}

/* ── ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.65s ease forwards;
}
.fade-up-1 { animation-delay: 0.10s; }
.fade-up-2 { animation-delay: 0.22s; }
.fade-up-3 { animation-delay: 0.34s; }
.fade-up-4 { animation-delay: 0.46s; }
.fade-up-5 { animation-delay: 0.58s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── TYPOGRAPHY ── */
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.display {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  color: var(--black);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.display em {
  font-style: italic;
  color: var(--dark-grey);
}

.heading-lg {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  color: var(--black);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.heading-lg em {
  font-style: italic;
  color: var(--dark-grey);
}

.heading-md {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--black);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.body-lg {
  font-size: 15px;
  color: var(--mid-grey);
  line-height: 1.85;
}

.body-md {
  font-size: 14px;
  color: var(--mid-grey);
  line-height: 1.85;
}

.body-sm {
  font-size: 13px;
  color: var(--mid-grey);
  line-height: 1.7;
}

.label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.meta {
  font-size: 12px;
  color: var(--light-grey);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--black);
  color: white;
}
.btn-primary:hover {
  background: var(--off-black);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #faf2f0;
  color: var(--black);
  border: 0.5px solid var(--pale-grey);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--light-grey);
}

.btn-ghost {
  background: transparent;
  color: var(--light-grey);
  padding: 10px 0;
}
.btn-ghost:hover { color: var(--dark-grey); }

.btn-ghost svg,
.btn-ghost-arrow svg {
  transition: transform 0.15s;
}
.btn-ghost:hover svg,
.btn-ghost-arrow:hover svg {
  transform: translateX(3px);
}

/* Arrow SVG used inline in buttons */
.arrow-icon {
  width: 14px; height: 14px;
  flex-shrink: 0;
}

/* ── DIVIDER ── */
hr.rule {
  border: none;
  border-top: var(--border);
}

hr.rule-full {
  border: none;
  border-top: var(--border);
  margin: 0;
}

/* ── BADGE ── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge-green  { color: var(--green); background: var(--green-bg); }
.badge-grey   { color: var(--mid-grey); background: var(--bg-subtle); }
.badge-red    { color: var(--red); background: var(--red-bg); }

/* ── TAGS ── */
.tag {
  display: inline-block;
  font-size: 11px;
  color: var(--light-grey);
  border: 0.5px solid var(--rule);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

/* ── STAT ── */
.stat-block { }
.stat-block .stat-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 5px;
}
.stat-block .stat-value {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-block .stat-value.pos { color: var(--green); }
.stat-block .stat-value.neg { color: var(--red); }
.stat-block .stat-sub {
  font-size: 11px;
  color: var(--light-grey);
  margin-top: 4px;
}

/* ── NAVIGATION ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  background: var(--nav-bg);
  border-bottom: 0.5px solid rgba(92,6,1,0.12);
}

.nav-logo {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--nav-text);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo span {
  color: rgba(92,6,1,0.6);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 13px;
  color: rgba(92,6,1,0.7);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-link:hover  { color: var(--nav-text); }
.nav-link.active { color: var(--nav-text); }

.nav-link-subtle {
  font-size: 12px;
  color: rgba(92,6,1,0.55);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}
.nav-link-subtle:hover { color: var(--nav-text); }
.nav-link-subtle svg { opacity: 0.7; transition: opacity 0.15s, transform 0.15s; }
.nav-link-subtle:hover svg { opacity: 1; transform: translate(1px, -1px); }

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  font-size: 13px;
  color: rgba(92,6,1,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
  user-select: none;
}
.nav-dropdown-toggle:hover { color: var(--nav-text); }
.nav-dropdown-toggle svg {
  transition: transform 0.2s;
}
.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(92,6,1,0.14);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-item {
  display: block;
  font-size: 13px;
  color: var(--dark-grey);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.12s, color 0.12s;
}
.nav-dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--black);
}
.nav-dropdown-item .nav-dropdown-sub {
  font-size: 11px;
  color: var(--light-grey);
  margin-top: 1px;
}

.nav-cta {
  font-size: 13px;
  color: var(--nav-text);
  text-decoration: none;
  border: 0.5px solid rgba(92,6,1,0.35);
  padding: 7px 16px;
  border-radius: var(--radius-md);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: rgba(92,6,1,0.08); border-color: rgba(92,6,1,0.55); }

/* Mobile toggle */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-mobile-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--nav-bg);
  border-bottom: 0.5px solid rgba(92,6,1,0.12);
  padding: var(--space-lg) var(--space-xl);
  z-index: 99;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: 0 8px 24px rgba(92,6,1,0.18);
}
.mobile-menu.open { display: flex; }

.mobile-menu-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(92,6,1,0.5);
  margin-top: var(--space-sm);
}

.mobile-menu a {
  font-size: 14px;
  color: rgba(92,6,1,0.8);
  text-decoration: none;
  padding: 2px 0;
}
.mobile-menu a:hover { color: var(--nav-text); }
.mobile-menu a.mobile-cta {
  font-weight: 500;
  color: var(--nav-text);
}

/* ── PAGE HEADER ── */
.page-header {
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-xl) var(--space-2xl);
  border-bottom: var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── SECTION ── */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  border-bottom: var(--border);
}

.section:last-of-type { border-bottom: none; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-lg);
}

/* ── TABS ── */
.tabs-bar {
  display: flex;
  border-bottom: var(--border);
  gap: 0;
}

.tab-item {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--light-grey);
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  transition: color 0.15s, border-color 0.15s;
  user-select: none;
  white-space: nowrap;
}
.tab-item:hover  { color: var(--mid-grey); }
.tab-item.active { color: var(--black); border-bottom-color: var(--black); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: var(--space-md); }

.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--black);
  background: #faf2f0;
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--light-grey);
}
.form-input::placeholder,
.form-textarea::placeholder { color: #ccc; }
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-note {
  font-size: 11px;
  color: var(--light-grey);
  margin-top: var(--space-sm);
  line-height: 1.6;
}

/* ── TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light-grey);
  padding: 0 12px 10px 0;
  border-bottom: var(--border);
}
.data-table th:last-child { text-align: right; padding-right: 0; }
.data-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 0.5px solid var(--rule);
  color: var(--dark-grey);
  vertical-align: middle;
}
.data-table td:last-child { text-align: right; padding-right: 0; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-subtle); }
.data-table .col-num { color: var(--light-grey); width: 32px; }
.data-table .col-pos { color: var(--green); }
.data-table .col-neg { color: var(--red); }

/* ── ASCII BARS ── */
.bar-section { }
.bar-group-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 10px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}
.bar-label-text {
  font-size: 12px;
  color: var(--mid-grey);
  width: 90px;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--black);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.bar-pct {
  font-size: 12px;
  color: var(--light-grey);
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}

/* ── OTP WALL ── */
.otp-wall {
  position: relative;
}
.otp-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.7) 30%,
    rgba(255,255,255,0.96) 60%,
    rgba(255,255,255,1) 100%
  );
}
.otp-blur-content {
  text-align: center;
  padding: var(--space-xl);
  max-width: 340px;
}
.otp-lock-icon {
  width: 36px; height: 36px;
  border: 0.5px solid var(--rule);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-md);
  color: var(--light-grey);
}
.otp-blur-title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--black);
  margin-bottom: var(--space-sm);
}
.otp-blur-body {
  font-size: 13px;
  color: var(--mid-grey);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}
.otp-disclaimer {
  font-size: 11px;
  color: var(--light-grey);
  margin-top: var(--space-md);
  line-height: 1.6;
}

/* OTP Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: #faf2f0;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 100%;
  max-width: 360px;
  margin: var(--space-md);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}
.modal-title {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--black);
  margin-bottom: var(--space-xs);
}
.modal-subtitle {
  font-size: 13px;
  color: var(--mid-grey);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

/* Phone input */
.phone-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-md);
}
.phone-prefix {
  font-size: 14px;
  color: var(--dark-grey);
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--bg-subtle);
  white-space: nowrap;
}
.phone-input {
  flex: 1;
}

/* OTP boxes */
.otp-boxes {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-md);
  justify-content: center;
}
.otp-box {
  width: 52px; height: 56px;
  border: 0.5px solid var(--rule);
  border-radius: var(--radius-md);
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  background: #faf2f0;
}
.otp-box:focus { border-color: var(--black); }
.otp-box.error { border-color: var(--red); animation: shake 0.35s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.otp-resend {
  font-size: 12px;
  color: var(--light-grey);
  text-align: center;
  margin-bottom: var(--space-md);
}
.otp-resend button {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--light-grey);
  cursor: default;
  padding: 0;
}
.otp-resend button.active {
  color: var(--black);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-disclaimer {
  font-size: 11px;
  color: var(--light-grey);
  line-height: 1.65;
  margin-top: var(--space-md);
  text-align: center;
}

/* ── SEBI COMPLAINTS DISCLOSURE ── */
.complaints-section {
  border-top: var(--border);
}
.complaints-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}
.complaints-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  cursor: pointer;
  user-select: none;
}
.complaints-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.complaints-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pale-grey);
  flex-shrink: 0;
}
.complaints-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-grey);
}
.complaints-chevron {
  color: var(--light-grey);
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}
.complaints-chevron.open { transform: rotate(180deg); }

.complaints-body {
  display: none;
  padding-bottom: var(--space-lg);
}
.complaints-body.open { display: block; }
.complaints-body p {
  font-size: 12px;
  color: var(--light-grey);
  line-height: 1.85;
  margin-bottom: var(--space-sm);
  max-width: 760px;
}
.complaints-body p:last-child { margin-bottom: 0; }
.complaints-body a {
  color: var(--mid-grey);
  text-decoration: none;
  border-bottom: 0.5px solid var(--rule);
}
.complaints-body a:hover { color: var(--dark-grey); border-color: var(--mid-grey); }

.complaints-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 12px;
  color: var(--light-grey);
}
.complaints-table th {
  text-align: left;
  font-weight: 500;
  padding: 6px 12px 6px 0;
  border-bottom: var(--border);
  color: var(--mid-grey);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.complaints-table td {
  padding: 8px 12px 8px 0;
  border-bottom: 0.5px solid var(--rule);
  vertical-align: top;
}

/* ── FOOTER ── */
footer {
  border-top: var(--border);
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-left {
  font-size: 12px;
  color: var(--light-grey);
}
.footer-right {
  display: flex;
  gap: var(--space-lg);
}
.footer-right a {
  font-size: 12px;
  color: var(--light-grey);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-right a:hover { color: var(--mid-grey); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  :root { --space-xl: 1.25rem; }

  .nav { padding: 0 var(--space-xl); }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }

  .display { font-size: clamp(30px, 8vw, 42px); }

  .section { padding: var(--space-2xl) var(--space-xl); }

  .form-row { grid-template-columns: 1fr; }

  .otp-boxes { gap: 8px; }
  .otp-box { width: 44px; height: 50px; font-size: 18px; }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .complaints-inner { padding: 0 var(--space-xl); }
}

@media (max-width: 480px) {
  .phone-input-wrap { flex-direction: column; }
}
