/* ================================================
   Investor First Advisors – Faithful Recreation
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

/* ---- Variables ---- */
:root {
  --blue:            rgb(93,98,249);
  --blue-accessible: rgb(48,54,210);   /* 5.2:1 on white — use for small text & buttons */
  --blue-dark:       rgb(71,71,204);
  --black:           rgb(26,26,26);
  --text:            rgb(0,0,0);
  --light-grey:      rgb(245,245,245);
  --border:          rgb(224,224,224);
  --white:           #ffffff;
  --nav-link:        #000;
  --photo-tint:      rgba(140, 140, 220, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

/* ================================================
   ACCESSIBILITY UTILITIES
   ================================================ */

/* Screen-reader-only visually hidden text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link — hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--blue-accessible);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus {
  left: 0.5rem;
  width: auto;
  height: auto;
}

/* Focus styles — keyboard only (2.4.7, 2.4.11) */
:focus-visible {
  outline: 3px solid var(--blue-accessible);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Base ---- */
body {
  font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9375rem;   /* was 15px */
  color: var(--text);
  background-color: #f5f5f5;
  line-height: 1.7;
}

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

/* Inline body links always underlined (1.4.1) */
p a, li a, td a {
  text-decoration: underline;
}

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

/* ================================================
   NAVBAR
   ================================================ */
.site-nav {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.875rem 2.5rem;   /* was 30px 40px */
  max-width: 75rem;
  margin: 0 auto;
}

.nav-logo img {
  height: 3.25rem;   /* was 52px */
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 6px;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;        /* 44px touch target (2.5.8) */
  padding: 0.375rem 0.875rem; /* was 6px 14px */
  font-size: 1rem;            /* was 16px */
  font-weight: 600;
  color: #000;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  text-decoration: none !important;
}

.nav-links a:hover {
  color: var(--blue-accessible);
}

.nav-links a.active {
  font-weight: 700;
  color: var(--blue-accessible);  /* was #5d62f9 — now 5.2:1 on white (1.4.3) */
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  min-height: 2.75rem;   /* 44px touch target */
  min-width: 2.75rem;
  justify-content: center;
  align-items: center;
}

.nav-toggle span {
  display: block;
  width: 1.5rem;   /* was 24px */
  height: 2px;
  background: var(--black);
}

/* ================================================
   HOME PAGE
   ================================================ */
.home-about {
  display: flex;
  min-height: 38.75rem;   /* was 620px */
  align-items: stretch;
}

.home-about-photo {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
}

.home-about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.home-about-text {
  flex: 0 0 50%;
  padding: 4.375rem 3.75rem;   /* was 70px 60px */
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-about-text h2 {
  font-size: 3.125rem;   /* was 50px */
  font-weight: 800;
  color: var(--blue);    /* 3:1 — passes for large text (≥18pt bold) */
  margin-bottom: 0.75rem;
}

.home-about-text p {
  font-size: 1.25rem;   /* was 20px */
  color: var(--text);
  margin-bottom: 1.875rem;
  line-height: 1.72;
  font-weight: 500;
}

.home-about-text p:last-child {
  margin-bottom: 0;
}

.home-about-text a {
  color: var(--text);
  text-decoration: underline;
}

/* Services band */
.home-services {
  background: var(--blue);
  padding: 4.375rem 2.5rem;   /* was 70px 40px */
  text-align: center;
  color: var(--white);
}

.home-services h2 {
  font-size: 3.625rem;   /* was 58px */
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 1.125rem;
  color: var(--white);
}

.home-services p {
  font-size: 1.25rem;   /* was 20px */
  font-weight: 500;
  color: #fff;
}

/* ================================================
   FOOTER (shared)
   ================================================ */
.site-footer {
  background: rgb(247,247,247);
}

.footer-inner {
  max-width: 62.5rem;
  margin: 0 auto;
  padding: 3.375rem 2.5rem 1.875rem;   /* was 54px 40px 30px */
  text-align: center;
  background-color: #fff;
}

.footer-logo {
  margin-bottom: 1.25rem;
}

.footer-logo img {
  height: 3.25rem;   /* was 52px */
  margin: 0 auto;
}

/* Footer SEBI registration — dl layout (1.3.1) */
.footer-sebi {
  font-size: 1.125rem;   /* was 18px */
  color: var(--text);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.footer-sebi dt {
  display: inline;
  font-weight: 600;
}
.footer-sebi dt::after {
  content: ': ';
}
.footer-sebi dd {
  display: inline;
  margin-inline-start: 0;
}
.footer-sebi dd::after {
  content: '';
  display: block;
  margin-bottom: 0.25rem;
}

/* Footer site-map nav — second way to navigate (2.4.5) */
.footer-nav {
  margin-bottom: 1.25rem;
}
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  justify-content: center;
}
.footer-nav a {
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.footer-nav a:hover {
  color: var(--blue-accessible);
}

/* Footer contact links list — 1.3.1 + 3.2.6 */
.footer-links-list {
  list-style: none;
  margin-bottom: 1.25rem;
}
.footer-links-list a {
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.footer-links-list a:hover {
  color: var(--blue-accessible);
  /* text-decoration: underline; */
}

.footer-copyright {
  font-size: 0.875rem;   /* was 14px */
  color: #000;
  padding-top: 1rem;
  font-weight: 500;
}

/* ================================================
   INNER PAGE LAYOUT
   ================================================ */
.page-body {
  max-width: 62.5rem;
  margin: 0 auto;
  padding: 3.75rem 2.5rem;   /* was 60px 40px */
}
#philosophy-page { padding-bottom: 2.5rem; }

/* ================================================
   PHILOSOPHY PAGE
   ================================================ */
.philosophy-principles {
  background-color: #fff;
}
.philosophy-principles-container {
  max-width: 62.5rem;
  margin: 0 auto;
  padding: 0 0 3.75rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  background-color: #fff;
}
.philosophy-heading {
  text-align: center;
  font-size: 3.5625rem;   /* was 57px */
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 0;
}
.philosophy-intro {
  width: 68%;
  margin: 0 auto;
}
.philosophy-intro ul {
  list-style: disc;
  padding-left: 1.5rem;
}
.philosophy-intro ul li {
  font-size: 1.25rem;   /* was 20px */
  margin-bottom: 0.625rem;
  line-height: 1.6;
  font-weight: 500;
}

.philosophy-principles-left {
  flex: 0 0 40%;
  padding: 1.875rem 0;
}

/* h2 because heading hierarchy h1 → h2 (was h3) */
.philosophy-principles-left h2 {
  font-size: 3rem;       /* was 48px */
  font-weight: 800;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 1.375rem;
}

.philosophy-principles-left ul {
  list-style: disc;
  padding-left: 1.375rem;
}

.philosophy-principles-left ul li {
  font-size: 1.25rem;   /* was 20px */
  margin-bottom: 0.875rem;
  line-height: 1.62;
  font-weight: 500;
}

.philosophy-principles-right {
  flex: 1;
}

.philosophy-principles-right img {
  width: 100%;
  object-fit: cover;
}

.philosophy-disclaimer {
  padding: 3rem 0.375rem;
  background: var(--light-grey);
  font-size: 1.25rem;   /* was 20px */
  color: var(--text);
  line-height: 1.7;
  max-width: 62.5rem;
  margin: 0 auto;
  font-weight: 500;
}

.philosophy-disclaimer em {
  font-style: italic;
}

/* ================================================
   DOWNLOADS PAGE
   ================================================ */
.downloads-heading {
  font-size: 3.5625rem;   /* was 57px */
  color: var(--blue);
  margin-bottom: 2.5rem;
}

.download-item {
  margin-bottom: 2.5rem;
}

/* h2 because heading hierarchy h1 → h2 (was h3) */
.download-item h2 {
  font-size: 1.875rem;   /* was 30px */
  font-weight: 800;
  color: var(--black);
  margin-bottom: 0.625rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  background: var(--blue-accessible);   /* was --blue — now 5.2:1 on white (1.4.3) */
  color: var(--white);
  font-size: 1rem;   /* was 16px */
  font-weight: 500;
  padding: 0.5625rem 1.75rem;
  min-height: 2.75rem;
  border: none;
  cursor: pointer;
  border-radius: 0;
}

.btn-download:hover {
  border: 1px solid var(--blue-accessible);
  color: var(--blue-accessible);
  background-color: transparent;
}

/* ================================================
   REGULATORY PAGE
   ================================================ */
.regulatory-heading {
  text-align: center;
  font-size: 3.5625rem;   /* was 57px */
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 2.875rem;
}

.regulatory-sub {
  font-size: 1.375rem;   /* was 22px */
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1.125rem;
}

.reg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;   /* was 13px */
  margin-bottom: 0.875rem;
}

.reg-table th {
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  padding: 0.625rem 0.75rem;
  text-align: center;
  border: 1px solid var(--black);
}

.reg-table td {
  padding: 0.5625rem 0.75rem;
  text-align: center;
  color: var(--text);
  background: var(--white);
}

.reg-footnote {
  font-size: 1.125rem;   /* was 18px */
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-weight: 500;
}

.reg-footnote a {
  text-decoration: underline;
}

.regulatory-section-gap {
  margin-top: 2.75rem;
}

/* ================================================
   CONTACT PAGE
   ================================================ */
.contact-hero {
  position: relative;
  width: 100%;
  max-width: 56.25rem;
  margin: 0 auto;
}

.contact-hero img {
  width: 100%;
  height: 20rem;   /* was 320px */
  object-fit: cover;
  display: block;
}

.contact-hero-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 0.375rem 1.375rem;
  font-size: 3.125rem;   /* was 50px */
  font-weight: 900;
  color: var(--blue);
  white-space: nowrap;
}

.contact-details {
  text-align: center;
  padding: 3.125rem 2.5rem 1.875rem;   /* was 50px 40px 30px */
  max-width: 56.25rem;
  margin: 0 auto;
}

.contact-details p {
  font-size: 1.125rem;   /* was 18px */
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.375rem;
  line-height: 1.7;
  font-style: normal;
}

.contact-details a {
  color: var(--text);
  text-decoration: none;
}

.contact-details a:hover {
  color: var(--blue-accessible);
  /* text-decoration: underline; */
}

.contact-gap {
  margin-top: 1.625rem;
}

/* Fixed contrast: #595959 on white = 7:1 (was #888 = 3.5:1, FAIL) */
.contact-small {
  font-size: 0.8125rem !important;
  color: #888 !important;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 820px) {
  .nav-inner {
    padding: 0.625rem 1.25rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 4.625rem;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.625rem 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  /* Home about */
  .home-about {
    flex-direction: column;
    height: auto;
  }

  .home-about-photo {
    flex: none;
    height: 16.25rem;   /* was 260px */
  }

  .home-about-text {
    flex: none;
    padding: 2.5rem 1.5rem;
    height: auto;
  }

  .home-about-text h2 {
    font-size: 1.875rem;   /* was 30px */
  }

  .home-about-text p {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }

  .home-services h2 {
    font-size: 2.75rem;   /* was 44px */
  }

  .home-services p {
    font-size: 1.125rem;
  }

  /* Philosophy */
  .philosophy-principles {
    flex-direction: column;
    gap: 1.875rem;
  }
  .philosophy-principles-container {
    flex-direction: column;
    gap: 1.875rem;
  }

  .philosophy-principles-left {
    flex: 100%;
    padding: 2.5rem 1.25rem;
  }

  .footer-contact-link {
    margin-bottom: 0;
    padding: 0.625rem 0;
  }

  .philosophy-intro {
    width: 100%;
    padding: 0;
  }

  /* Page body */
  .page-body {
    padding: 2.5rem 1.25rem;
  }

  /* Contact */
  .contact-hero img {
    height: 13.75rem;   /* was 220px */
  }

  .contact-hero-label {
    font-size: 1.5rem;
    padding: 0.75rem 1.875rem;
  }

  /* Footer */
  .footer-inner {
    padding: 2.5rem 1.25rem 1.5rem;
  }

  /* Tables */
  .reg-table {
    font-size: 0.6875rem;   /* was 11px */
  }

  .reg-table th,
  .reg-table td {
    padding: 0.375rem;
  }
}

@media (min-width: 821px) and (max-width: 1199px) {
  .home-about {
    min-height: 35rem;   /* was 560px */
  }

  .home-about-text {
    padding: 3.5rem 2.75rem;
  }

  .home-about-text h2 {
    font-size: 2.125rem;   /* was 34px */
  }

  .home-about-text p {
    font-size: 1.125rem;
    margin-bottom: 1.375rem;
  }

  .home-services h2 {
    font-size: 3.125rem;   /* was 50px */
  }

  .home-services p {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .home-about-text h2 {
    font-size: 1.375rem;   /* was 22px */
  }

  .home-services h2 {
    font-size: 1.5rem;   /* was 24px */
  }

  .philosophy-heading,
  .downloads-heading,
  .regulatory-heading {
    font-size: 1.625rem;   /* was 26px */
  }
  .philosophy-heading { white-space: nowrap; }

  .philosophy-principles-left h2 {
    font-size: 1.375rem;   /* was 22px */
    white-space: nowrap;
  }
  .philosophy-disclaimer { padding: 1.875rem 1.25rem; }
}

/* ================================================
   REFLOW — 320px / 400% browser zoom (1.4.10 AA)
   ================================================ */
@media (max-width: 320px) {
  .nav-inner      { padding: 0.5rem 0.75rem; }
  .nav-logo img   { height: 2.25rem; }

  .home-about-text        { padding: 1.5rem 1rem; }
  .home-about-text h2     { font-size: 1.125rem; white-space: normal; }
  .home-about-text p      { font-size: 1rem; }
  .home-services          { padding: 2rem 0.75rem; }
  .home-services h2       { font-size: 1.25rem; letter-spacing: 0; }
  .home-services p        { font-size: 0.9375rem; }

  .page-body              { padding: 1.5rem 0.75rem; }
  .footer-inner           { padding: 1.5rem 0.75rem 1rem; }

  .philosophy-heading,
  .downloads-heading,
  .regulatory-heading     { font-size: 1.25rem; white-space: normal; }
  .philosophy-principles-left h2 { font-size: 1.125rem; white-space: normal; }
  .philosophy-disclaimer  { padding: 1.25rem 0.75rem; font-size: 0.9375rem; }
  .philosophy-intro       { width: 100%; }

  .contact-hero img       { height: 10rem; }
  .contact-hero-label     { font-size: 1.125rem; padding: 0.25rem 0.5rem; white-space: normal; text-align: center; }
  .contact-details        { padding: 1.5rem 0.75rem 1rem; }
  .contact-details p      { font-size: 0.9375rem; }

  .btn-download           { padding: 0.5rem 1rem; font-size: 0.875rem; }
  .regulatory-sub         { font-size: 1rem; }
  .reg-footnote           { font-size: 0.875rem; }

  .footer-sebi            { font-size: 0.875rem; }
  .footer-nav a           { font-size: 0.875rem; }
  .footer-links-list a    { font-size: 0.75rem; }
  .footer-copyright       { font-size: 0.75rem; }
}

/* .footer-help removed — replaced by .footer-links-list (1.3.1 + 3.2.6) */

/* ================================================
   SITE MAP PAGE
   ================================================ */
.sitemap-heading {
  font-size: 3.125rem;
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.sitemap-intro {
  font-size: 1rem;
  color: #555;
  margin-bottom: 2.5rem;
  max-width: 44rem;
  line-height: 1.75;
}

/* Card grid */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.sitemap-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.sitemap-card:hover {
  box-shadow: 0 4px 18px rgba(48,54,210,0.10);
  border-color: var(--blue-accessible);
}

.sitemap-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.sitemap-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  margin: 0;
}

.sitemap-card-desc {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.65;
  flex: 1;
}

.sitemap-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue-accessible);
  text-decoration: none;
  margin-top: 0.5rem;
  min-height: 2.75rem;
  padding: 0;
}
.sitemap-card-link:hover {
  text-decoration: underline;
}
.sitemap-card-link::after {
  content: '→';
  font-size: 1rem;
  transition: transform 0.2s;
}
.sitemap-card-link:hover::after {
  transform: translateX(3px);
}

/* Section divider inside sitemap */
.sitemap-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* External link card variant */
.sitemap-card.external {
  border-style: dashed;
}
.sitemap-card.external .sitemap-card-link {
  color: #1a6fa0;
}

/* Responsive */
@media (max-width: 480px) {
  .sitemap-heading { font-size: 1.625rem; }
  .sitemap-grid    { grid-template-columns: 1fr; }
}
@media (max-width: 320px) {
  .sitemap-heading { font-size: 1.25rem; white-space: normal; }
}

/* ================================================
   SKIP LINK TARGET — clear sticky nav (2.4.11 AA)
   ================================================ */
#main-content {
  scroll-margin-top: 7rem;   /* clears sticky nav on skip-link activation */
}

/* ================================================
   REDUCED MOTION — vestibular accessibility
   ================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
