/* ==========================================================================
   EFTI WEALTH — stylesheet
   ==========================================================================

   HOW TO USE THIS FILE
   --------------------
   Everything you are likely to want to change (colours, fonts, sizes,
   section backgrounds) is in the "SETTINGS" block directly below.
   Change a value there once and it updates everywhere on the site.

   Further down are the styles for each part of the page. Each part has a
   big comment banner, so you can search for e.g. "FOOTER" to find it.

   WHAT THE SETTINGS NAMES MEAN
   ----------------------------
   A name like  --color-accent  is called a "variable".
   It is used later in the file as  color: var(--color-accent);
   So editing it in one place changes every heading that uses it.

   CONTENTS
   --------
     1. SETTINGS (colours, fonts, spacing)
     2. RESET + BASE
     3. ACCESSIBILITY HELPERS (skip link, hidden text, focus rings)
     4. LAYOUT (container, sections)
     5. HEADER + NAVIGATION
     6. BUTTONS
     7. HERO SECTION
     8. ABOUT SECTION
     9. PREMIUM SECTION
    10. LEARNING SECTION
    11. WHAT WE DO SECTION
    12. REGULATORY COMPLIANCE SECTIONS
    13. EXPAND / COLLAPSE PANELS  ("Click to see full ...")
    14. RICH TEXT (the long legal documents + tables)
    15. CONTACT SECTION
    16. FOOTER
    17. FLOATING WHATSAPP BUTTON
    18. RESPONSIVE RULES (tablet + mobile)
    19. PRINT + REDUCED MOTION
   ========================================================================== */


/* ==========================================================================
   1. SETTINGS — edit these values to restyle the whole site
   ========================================================================== */

:root {

  /* ---- Fonts -------------------------------------------------------- */
  --font-main: 'Roboto', Arial, Helvetica, sans-serif;

  /* ---- Text colours --------------------------------------------------
     These are deliberately dark so they pass the WCAG 2.1 AA contrast
     rules on the light backgrounds used below. If you make them lighter,
     re-check the contrast before publishing.                            */
  --color-text:        #1a1a1a;   /* normal paragraph text              */
  --color-heading:     #0d141a;   /* most headings                      */
  --color-accent:      #b3261e;   /* the red used for key headings      */
  --color-accent-blue: #030496;   /* the dark blue used for sub-headings*/
  --color-link:        #0a3d91;   /* links inside text                  */
  --color-link-hover:  #030496;

  /* ---- Button colours ------------------------------------------------ */
  --color-btn-bg:         #000000;
  --color-btn-text:       #ffffff;
  --color-btn-bg-hover:   #1d1e20;

  /* ---- Section background colours ------------------------------------
     Each band of the page has its own background, same as the original. */
  --bg-header:      #ffffff;
  --bg-hero:        #e0fffc;
  --bg-about:       #ffffff;
  --bg-premium:     #f0ecff;
  --bg-learning:    #ffeaea;
  --bg-what:        #f2f2f2;
  --bg-reg-header:  #eda7a7;
  --bg-reg-1:       #e0d0d0;
  --bg-reg-2:       #ffeaea;
  --bg-reg-3:       #e6d9d9;
  --bg-reg-4:       #ebd7d7;
  --bg-reg-5:       #ffe8e8;
  --bg-reg-6:       #ffecec;
  --bg-contact:     #ffffff;
  --bg-footer:      #0d141a;
  --color-footer-text: #f2f2f2;

  /* ---- Panels (the expandable legal documents) ----------------------- */
  --bg-panel:        #ffffff;
  --color-panel-border: #8a6b6b;
  --color-expand-btn:   #1b5e20;   /* green "Click to see full ..." button */
  --color-expand-btn-hover: #14471a;

  /* ---- Focus ring (the outline keyboard users see) ------------------- */
  --color-focus: #0b57d0;
  --focus-width: 3px;

  /* ---- Spacing + sizes ----------------------------------------------- */
  --container-width: 1224px;    /* max page width on big screens */
  --gutter: 16px;               /* space at the left/right edges */
  --section-padding: 56px;      /* space above/below each section */
  --radius: 10px;

  /* ---- Base font sizes ------------------------------------------------
     Sizes use rem so they grow if a visitor increases their browser's
     default font size (a WCAG requirement).                             */
  --size-body: 1.0625rem;       /* 17px */
  --size-h1: clamp(2rem, 1.2rem + 3.4vw, 4rem);
  --size-h2: clamp(1.6rem, 1.1rem + 2.1vw, 3rem);
  --size-h3: clamp(1.3rem, 1.05rem + 1.1vw, 1.9rem);
  --size-h4: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
}


/* ==========================================================================
   2. RESET + BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  /* Stops the sticky header from covering a section you jump to.
     js/main.js measures the real header and keeps --header-height
     accurate; the 170px here is the fallback if JavaScript is off. */
  scroll-padding-top: calc(var(--header-height, 170px) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: var(--size-body);
  line-height: 1.6;
  /* Helps long legal text stay readable rather than breaking awkwardly */
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  line-height: 1.3;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
h4 { font-size: var(--size-h4); }
h5, h6 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.5em; }
li { margin-bottom: 0.4em; }

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-link-hover); }

strong { font-weight: 700; }


/* ==========================================================================
   3. ACCESSIBILITY HELPERS
   --------------------------------------------------------------------------
   Do not delete these. They are what makes the site usable with a
   keyboard and with a screen reader.
   ========================================================================== */

/* Text that only screen readers announce (e.g. "opens in a new tab") */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* "Skip to main content" — hidden until a keyboard user presses Tab */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 1000;
  padding: 12px 20px;
  background: #000;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.15s ease-in-out;
}
.skip-link:focus { top: 0; color: #fff; }

/* A clearly visible outline on whatever the keyboard is focused on */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow { max-width: 860px; }

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.text-center { text-align: center; }


/* ==========================================================================
   5. HEADER + NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid #e3e3e3;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header__logo { display: block; flex: 0 0 auto; }
.site-header__logo img {
  width: 132px;
  height: auto;
  border-radius: 6px;
}

.nav { margin-left: auto; }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: block;
  padding: 10px 4px;          /* keeps the tap area at least 44px tall */
  min-height: 44px;
  color: var(--color-heading);
  font-size: 1.05rem;
  text-decoration: none;
}
.nav__link:hover,
.nav__link:focus-visible { color: var(--color-accent-blue); text-decoration: underline; }

/* The current section is highlighted by js/main.js */
.nav__link[aria-current="true"] {
  color: var(--color-accent-blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ---- Social icons ---- */
.social {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;                /* 44px = minimum comfortable tap target */
  height: 44px;
  border-radius: 50%;
  color: var(--color-heading);
}
.social__link:hover { background: #ededed; color: var(--color-accent-blue); }

.social__icon { width: 22px; height: 22px; fill: currentColor; }

/* ---- Hamburger button (hidden on desktop, shown on mobile) ---- */
.nav-toggle {
  display: none;              /* switched on in the RESPONSIVE section */
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-height: 44px;
  padding: 8px 14px;
  background: #ffffff;
  color: var(--color-heading);
  border: 2px solid var(--color-heading);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle:hover { background: #f1f1f1; }

/* The three bars drawn with CSS */
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: '';
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after  { position: absolute; top: 6px; }


/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 14px 32px;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: 2px solid var(--color-btn-bg);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--color-btn-bg-hover);
  border-color: var(--color-btn-bg-hover);
  color: var(--color-btn-text);
}


/* ==========================================================================
   7. HERO SECTION
   ========================================================================== */

.section--hero {
  background: var(--bg-hero);
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero__title {
  color: var(--color-accent);
  margin-bottom: 0.4em;
}

.hero__lead {
  font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.75rem);
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 0.9em;
}


/* ==========================================================================
   8. ABOUT SECTION
   ========================================================================== */

.section--about { background: var(--bg-about); }

/* Two columns on desktop; stacks to one column on mobile automatically */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.about__media img {
  border-radius: 20px;
  width: 100%;
}

.about__cta-title { margin-top: 1.2em; }


/* ==========================================================================
   9. PREMIUM SECTION
   ========================================================================== */

.section--premium { background: var(--bg-premium); }

.premium__title { color: var(--color-accent); }

.premium__subtitle {
  color: var(--color-accent-blue);
  font-size: clamp(1.2rem, 1rem + 1vw, 2rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 1.2em;
}

.premium__terms-title {
  margin-top: 1.4em;
  font-size: 1.25rem;
}


/* ==========================================================================
   10. LEARNING SECTION
   ========================================================================== */

.section--learning { background: var(--bg-learning); }

.learning__text {
  color: var(--color-accent-blue);
  font-size: 1.15rem;
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}


/* ==========================================================================
   11. WHAT WE DO SECTION
   ========================================================================== */

.section--what { background: var(--bg-what); }

.section--what .rich-text { margin-bottom: 1.5em; }

.section--what h3 {
  margin-top: 1.2em;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
}

/* The "#Note:" box at the end of the section */
.callout {
  background: #ffffff;
  border-left: 6px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
}


/* ==========================================================================
   12. REGULATORY COMPLIANCE SECTIONS
   --------------------------------------------------------------------------
   Each document sits in its own band. The background colours alternate,
   exactly like the original site.
   ========================================================================== */

.section--reg-header {
  background: var(--bg-reg-header);
  padding-top: 36px;
  padding-bottom: 36px;
}
.section--reg-header h2 { margin-bottom: 0; }

.section--compliance {
  padding-top: 28px;
  padding-bottom: 28px;
}

.compliance-title {
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.8rem);
  margin-bottom: 0.6em;
}

/* Alternating band colours, in page order */
#investor-charter      { background: var(--bg-reg-1); }
#refund-policy         { background: var(--bg-reg-2); }
#complaint-status      { background: var(--bg-reg-3); }
#terms-and-conditions  { background: var(--bg-reg-2); }
#grievance-redressal   { background: var(--bg-reg-4); }
#disclaimer-policy     { background: var(--bg-reg-5); }
#privacy-policy        { background: var(--bg-reg-1); }
#ra-agreement          { background: var(--bg-reg-6); }


/* ==========================================================================
   13. EXPAND / COLLAPSE PANELS
   --------------------------------------------------------------------------
   These are the "Click to see full ..." sections. They use the browser's
   own <details> element, which already works with a keyboard (Enter or
   Space) and is announced correctly by screen readers.
   ========================================================================== */

.disclosure { margin: 0 0 8px; }

/* The clickable bar */
.disclosure__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 12px 20px;
  background: var(--color-expand-btn);
  color: #ffffff;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;           /* hides the default triangle */
}
.disclosure__summary::-webkit-details-marker { display: none; }

.disclosure__summary:hover { background: var(--color-expand-btn-hover); }

/* Our own arrow, which rotates when the panel opens */
.disclosure__summary::before {
  content: '';
  flex: 0 0 auto;
  width: 0; height: 0;
  border-left: 7px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 0.2s ease;
}
.disclosure[open] > .disclosure__summary::before { transform: rotate(90deg); }

/* The content that appears when opened */
.disclosure__panel {
  margin-top: 14px;
  padding: 22px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: var(--radius);
  /* Very long documents get their own scrollbar instead of pushing the
     whole page down. Remove max-height if you want them fully expanded. */
  max-height: 70vh;
  overflow-y: auto;
}


/* ==========================================================================
   14. RICH TEXT — the long legal documents, lists and tables
   ========================================================================== */

.rich-text { font-size: 1rem; }

.rich-text h4,
.rich-text h5,
.rich-text h6 {
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.rich-text p { margin-bottom: 0.9em; }

.rich-text ul { padding-left: 1.3em; }

/* Tables (the escalation matrix). They scroll sideways on a phone. */
.rich-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.95rem;
}

.rich-text th,
.rich-text td {
  border: 1px solid #555;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.rich-text thead th { background: #ececec; font-weight: 700; }

/* js/main.js wraps every table in this, so it can be scrolled on a phone */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible { outline: var(--focus-width) solid var(--color-focus); }


/* ==========================================================================
   15. CONTACT SECTION
   ========================================================================== */

.section--contact { background: var(--bg-contact); }

.contact__email { font-size: 1.25rem; font-weight: 600; }


/* ==========================================================================
   16. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--bg-footer);
  color: var(--color-footer-text);
  padding: 48px 0 32px;
}

.site-footer a { color: #9ec5ff; }
.site-footer a:hover { color: #ffffff; }

.site-footer__risk {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid #3a4651;
  font-style: italic;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.site-footer__heading {
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 0.5em;
}

.site-footer .social__link { color: var(--color-footer-text); }
.site-footer .social__link:hover { background: #26323d; color: #ffffff; }

.site-footer__accessibility {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #3a4651;
}

.site-footer__copyright {
  margin-top: 24px;
  margin-bottom: 0;
  font-size: 0.95rem;
}


/* ==========================================================================
   17. FLOATING WHATSAPP BUTTON
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #1d7a43;
  color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}
.whatsapp-float:hover { background: #145f33; color: #ffffff; }
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }


/* ==========================================================================
   18. RESPONSIVE RULES
   --------------------------------------------------------------------------
   A "media query" below means: only apply these styles when the screen is
   narrower than the given width. 900px is roughly a small tablet.
   ========================================================================== */

/* ---- Tablet and below ---- */
@media (max-width: 900px) {

  :root {
    --section-padding: 40px;
  }

  /* Show the hamburger, hide the menu until it is opened */
  .nav-toggle { display: flex; }

  .nav {
    order: 3;                 /* drops the menu onto its own row */
    flex-basis: 100%;
    margin-left: 0;
    display: none;
  }
  .nav.is-open { display: block; }

  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: 8px 0 12px;
  }

  .nav__list li { border-top: 1px solid #e6e6e6; }

  .nav__link { padding: 14px 4px; font-size: 1.1rem; }

  /* The about section becomes a single column, image first */
  .about__grid { grid-template-columns: 1fr; }
  .about__media { order: -1; max-width: 420px; margin: 0 auto; }

  .site-header__social { order: 2; margin-left: 0; }
}

/* ---- Phones ---- */
@media (max-width: 600px) {

  :root {
    --gutter: 16px;
    --section-padding: 32px;
  }

  .site-header__logo img { width: 104px; }

  .site-header__inner { gap: 10px; }

  /* Full-width buttons are easier to tap */
  .btn { display: block; width: 100%; }

  .disclosure__summary {
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius);
  }

  .disclosure__panel {
    padding: 16px;
    max-height: 60vh;
  }

  .whatsapp-float { width: 52px; height: 52px; right: 12px; bottom: 12px; }
}


/* ==========================================================================
   19. PRINT + REDUCED MOTION
   ========================================================================== */

/* Some people switch off animations in their operating system because
   motion makes them unwell. This respects that choice. WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* When the page is printed, show every collapsed document in full */
@media print {
  .site-header, .whatsapp-float, .skip-link { display: none; }
  .disclosure__panel { max-height: none; overflow: visible; border: 0; }
  .section { padding: 12px 0; background: #fff !important; }
  body { color: #000; font-size: 11pt; }
}
