/* =========================================================================
   ARTHA RAKSHANAM — DESIGN SYSTEM
   Warm, rooted, insurance-first. "Artha Rakshanam" = wealth protection —
   the palette and signature motif draw on the banyan tree: deep roots,
   wide shelter, a canopy that protects many. Not corporate-cold teal.
   ========================================================================= */

:root {
  /* --- Color: "Banyan" palette --- */
  --color-canopy:        #0F5C4B;   /* primary deep teal-green */
  --color-canopy-dark:   #0A4038;   /* hover / active */
  --color-canopy-tint:   #E4EEE7;   /* sage — card/section backgrounds */
  --color-turmeric:      #E2A63B;   /* warm gold accent — CTAs, highlights */
  --color-turmeric-dark: #C58A24;
  --color-ink:           #1C2B27;   /* warm near-black text */
  --color-ink-soft:      #4B5C57;   /* secondary text */
  --color-paper:         #FBF7F0;   /* warm off-white background */
  --color-white:         #FFFFFF;
  --color-mist:          #D8E2DC;   /* borders / dividers */
  --color-rust:          #B5502E;   /* sparing use: errors, urgent notices */

  /* --- Dark mode --- */
  --color-dark-bg:        #10201B;
  --color-dark-surface:   #16302A;
  --color-dark-text:      #EAF1EC;
  --color-dark-text-soft: #A9BDB5;
  --color-dark-border:    #244038;

  /* --- Type --- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Work Sans', -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* --- Layout --- */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(28, 43, 39, 0.08);
  --shadow-md: 0 8px 24px rgba(28, 43, 39, 0.10);
  --shadow-lg: 0 16px 40px rgba(28, 43, 39, 0.14);

  --header-height: 76px;
}

/* =========================================================================
   RESET
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

body.dark-mode {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--color-ink);
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
  color: var(--color-dark-text);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--color-ink-soft); }
body.dark-mode p { color: var(--color-dark-text-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-canopy);
  font-weight: 500;
}

/* Numeric / calculator-output figures get the mono treatment site-wide */
.figure, .calc-result-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   LAYOUT
   ========================================================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }

/* Signature: organic "root line" divider — thin, hand-drawn feel */
.root-divider {
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0 14 C 150 2, 300 26, 450 14 S 750 2, 900 14 S 1050 26, 1200 14' fill='none' stroke='%230F5C4B' stroke-width='1.5' stroke-opacity='0.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  margin: 0;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-primary {
  background: var(--color-turmeric);
  color: var(--color-ink);
}
.btn-primary:hover { background: var(--color-turmeric-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  border-color: var(--color-canopy);
  color: var(--color-canopy);
}
.btn-outline:hover { background: var(--color-canopy); color: var(--color-white); }
body.dark-mode .btn-outline { border-color: var(--color-dark-text); color: var(--color-dark-text); }

/* =========================================================================
   HEADER
   ========================================================================= */
.utility-bar {
  background: var(--color-canopy-dark);
  color: rgba(255,255,255,0.85);
}
.utility-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  font-size: 0.82rem;
}
.utility-bar a { opacity: 0.9; }
.utility-bar a:hover { opacity: 1; text-decoration: underline; }
.utility-links { display: flex; gap: 20px; align-items: center; }
.theme-toggle-btn {
  background: transparent;
  border: none;
  color: inherit;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.12); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-mist);
}
body.dark-mode .site-header { background: var(--color-dark-surface); border-color: var(--color-dark-border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}
.logo-container { display: flex; align-items: center; gap: 10px; }
.logo-image { height: 40px; width: auto; }
.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-canopy);
}
body.dark-mode .logo-wordmark { color: var(--color-dark-text); }

.main-nav { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-canopy);
  border-bottom-color: var(--color-turmeric);
}
body.dark-mode .nav-links a:hover,
body.dark-mode .nav-links a.active { color: var(--color-turmeric); }

.mobile-menu-toggle { display: none; background: none; border: none; color: var(--color-ink); }
body.dark-mode .mobile-menu-toggle { color: var(--color-dark-text); }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  body.dark-mode .main-nav { background: var(--color-dark-surface); }
  .main-nav.active { transform: translateX(0); }
  .nav-links { flex-direction: column; gap: 4px; width: 100%; }
  .nav-links a { display: block; padding: 14px 4px; width: 100%; border-bottom: 1px solid var(--color-mist); }
  .main-nav .btn-primary { margin-top: 16px; width: 100%; justify-content: center; }
  .mobile-menu-toggle { display: flex; }
  .utility-links span.hide-mobile { display: none; }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--color-canopy-dark);
  color: rgba(255,255,255,0.82);
  margin-top: 80px;
}
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: var(--color-turmeric); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 64px 0 40px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand h4 {
  font-family: var(--font-display);
  color: var(--color-white);
  font-size: 1.3rem;
}
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.92rem; }
.footer-column h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-column ul li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-contact li { display: flex; gap: 10px; font-size: 0.92rem; margin-bottom: 12px; align-items: flex-start; }
.footer-contact .material-symbols-outlined { font-size: 20px; color: var(--color-turmeric); }
.social-icons { display: flex; gap: 12px; margin-top: 18px; }
.social-icons a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
}
.social-icons img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.social-icons a:hover { background: var(--color-turmeric); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal-links { display: flex; gap: 18px; }

/* =========================================================================
   CALCULATOR PAGES
   ========================================================================= */
.calculator-page-container { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.calc-header { text-align: center; margin-bottom: 40px; }
.calc-header .eyebrow { display: block; margin-bottom: 10px; }
.calc-header p { max-width: 480px; margin: 8px auto 0; }

.calculator-ui {
  background: var(--color-white);
  border: 1px solid var(--color-mist);
  border-radius: var(--radius-lg);
  padding: 32px;
}
body.dark-mode .calculator-ui { background: var(--color-dark-surface); border-color: var(--color-dark-border); }

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 560px) { .input-grid { grid-template-columns: 1fr; } }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group.full-width { grid-column: 1 / -1; }
.input-group label { font-size: 0.88rem; font-weight: 500; color: var(--color-ink); }
body.dark-mode .input-group label { color: var(--color-dark-text); }
.input-group input {
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--color-mist);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  color: var(--color-ink);
}
body.dark-mode .input-group input { background: var(--color-dark-bg); border-color: var(--color-dark-border); color: var(--color-dark-text); }
.input-group input:focus { outline: none; border-color: var(--color-canopy); }

.calc-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: var(--color-canopy);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.15s ease;
}
.calc-btn:hover { background: var(--color-canopy-dark); }

.results-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px dashed var(--color-mist);
  text-align: center;
}
body.dark-mode .results-section { border-color: var(--color-dark-border); }
.results-section h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-ink-soft); margin-bottom: 8px; }
.final-amount {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 500;
  color: var(--color-canopy);
  margin: 4px 0 12px;
}
body.dark-mode .final-amount { color: var(--color-turmeric); }
.results-section > p { max-width: 440px; margin-left: auto; margin-right: auto; }

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.details-grid > div {
  background: var(--color-canopy-tint);
  border-radius: var(--radius-md);
  padding: 16px;
}
body.dark-mode .details-grid > div { background: var(--color-dark-bg); }
.details-grid p { margin: 0; font-size: 0.82rem; color: var(--color-ink-soft); display: flex; flex-direction: column; gap: 4px; }
.details-grid p span { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 500; color: var(--color-ink); }
body.dark-mode .details-grid p span { color: var(--color-dark-text); }

.calc-disclaimer { font-size: 0.8rem; color: var(--color-ink-soft); text-align: center; margin-top: 24px; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding: 80px 0 64px; text-align: center; }
.hero .eyebrow { display: block; margin-bottom: 14px; }
.hero h1 { max-width: 780px; margin: 0 auto; }
.hero .lead { max-width: 600px; margin: 20px auto 32px; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =========================================================================
   PAGE HERO (about, services, contact, etc.)
   ========================================================================= */
.page-hero { padding: 64px 0 48px; text-align: center; background: var(--color-canopy-tint); }
body.dark-mode .page-hero { background: var(--color-dark-surface); }
.page-hero h1 { margin-bottom: 10px; }
.page-hero p { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* =========================================================================
   CARDS: services, team, blog
   ========================================================================= */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-mist);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
body.dark-mode .info-card { background: var(--color-dark-surface); border-color: var(--color-dark-border); }
.info-card .icon-badge { width: 48px; height: 48px; border-radius: 12px; background: var(--color-canopy-tint); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.info-card .icon-badge .material-symbols-outlined { color: var(--color-canopy); font-size: 26px; }
body.dark-mode .info-card .icon-badge { background: var(--color-dark-bg); }
.info-card h3 { margin-bottom: 6px; }
.info-card p { font-size: 0.92rem; margin-bottom: 14px; }
.info-card .card-link { font-weight: 600; font-size: 0.9rem; color: var(--color-canopy); display: inline-flex; align-items: center; gap: 4px; }
body.dark-mode .info-card .card-link { color: var(--color-turmeric); }

.team-card { text-align: center; }
.team-card .avatar { width: 84px; height: 84px; border-radius: 50%; background: var(--color-canopy-tint); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-family: var(--font-display); font-size: 1.6rem; color: var(--color-canopy); }
body.dark-mode .team-card .avatar { background: var(--color-dark-bg); color: var(--color-turmeric); }
.team-card .role { font-size: 0.85rem; color: var(--color-turmeric-dark); font-weight: 600; margin-bottom: 10px; }
body.dark-mode .team-card .role { color: var(--color-turmeric); }

.blog-card img { border-radius: var(--radius-md); margin-bottom: 16px; aspect-ratio: 16/10; object-fit: cover; }
.blog-card .eyebrow { display: block; margin-bottom: 8px; }
.blog-card .meta { font-size: 0.8rem; color: var(--color-ink-soft); margin-top: 12px; }

/* =========================================================================
   FORMS (contact, auth)
   ========================================================================= */
.form-card { background: var(--color-white); border: 1px solid var(--color-mist); border-radius: var(--radius-lg); padding: 32px; }
body.dark-mode .form-card { background: var(--color-dark-surface); border-color: var(--color-dark-border); }
.form-group { margin-bottom: 18px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-mist);
  border-radius: var(--radius-sm);
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
body.dark-mode .form-group input, body.dark-mode .form-group textarea, body.dark-mode .form-group select { background: var(--color-dark-bg); border-color: var(--color-dark-border); color: var(--color-dark-text); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--color-canopy); }
.form-group textarea { min-height: 120px; resize: vertical; }
.submit-btn { width: 100%; padding: 14px; background: var(--color-canopy); color: var(--color-white); border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; }
.submit-btn:hover { background: var(--color-canopy-dark); }
.form-options { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 20px; }
.form-options a, .auth-switch a { color: var(--color-canopy); font-weight: 600; }
body.dark-mode .form-options a, body.dark-mode .auth-switch a { color: var(--color-turmeric); }
.auth-wrapper { max-width: 420px; margin: 60px auto; padding: 0 24px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.92rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-detail-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-detail-item .material-symbols-outlined { color: var(--color-canopy); font-size: 24px; }
body.dark-mode .contact-detail-item .material-symbols-outlined { color: var(--color-turmeric); }
.contact-detail-item strong { display: block; margin-bottom: 2px; }
.map-frame { border-radius: var(--radius-md); overflow: hidden; margin-top: 24px; border: 1px solid var(--color-mist); }
.map-frame iframe { width: 100%; height: 280px; border: 0; display: block; }

/* =========================================================================
   STATS STRIP
   ========================================================================= */
.stats-strip { background: var(--color-canopy); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; text-align: center; }
.stats-grid .counter-number { display: block; font-family: var(--font-mono); font-size: 2rem; font-weight: 500; color: var(--color-white); }
.stats-grid .stat-label { color: rgba(255,255,255,0.75); font-size: 0.88rem; margin-top: 4px; }
