/* ==========================================================================
   Sri Meher LLC — styles
   ========================================================================== */

:root {
  --navy: #1f4270;
  --navy-deep: #16325a;
  --green: #3d7a5c;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #111c2b;
  --text: #3a4452;
  --muted: #687280;
  --line: #e2e4e8;
  --line-strong: #c9ced6;

  --radius: 8px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--navy); color: #fff; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 16px; }

/* Typography ------------------------------------------------------------- */

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.75rem); letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.35; }

.lead { font-size: clamp(1.05rem, 1.35vw, 1.18rem); max-width: 36rem; }
.label { margin-bottom: 10px; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.text-link { color: var(--navy); font-weight: 500; border-bottom: 1px solid rgba(31, 66, 112, 0.3); transition: border-color 0.25s; }
.text-link:hover { border-color: var(--navy); }

/* Split-word helpers (built by JS) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.wi { display: inline-block; will-change: transform; }

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 6px;
  background: var(--navy); color: #fff;
  font-weight: 500; font-size: 0.98rem; white-space: nowrap;
  transition: background-color 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn:hover { background: var(--navy-deep); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #e8edf4; }

/* Header ----------------------------------------------------------------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color 0.35s, box-shadow 0.35s, transform 0.5s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(247, 247, 245, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-size: 0.98rem; font-weight: 700; color: var(--navy); letter-spacing: 0.03em; text-transform: uppercase; }
.brand-text span { margin-top: 4px; font-size: 0.62rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; padding: 8px 14px;
  font-size: 0.95rem; color: var(--text);
  transition: color 0.25s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1.5px;
  background: var(--navy); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  padding-left: 20px; margin-left: 8px; border-left: 1px solid var(--line);
  font-size: 0.95rem; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.header-phone svg { color: var(--green); }
.header-phone:hover { color: var(--navy); }

.menu-toggle {
  display: none; width: 42px; height: 42px; border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.4s var(--ease); }
.menu-open .menu-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 100px var(--gutter) 36px;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open body { overflow: hidden; }
.mobile-menu nav a {
  display: block; padding: 14px 0;
  font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-menu nav a.is-active { color: var(--navy); }
.mobile-menu-foot { display: grid; gap: 6px; font-size: 0.95rem; color: var(--muted); }
.mobile-menu-foot a { color: var(--ink); font-weight: 500; }

@media (max-width: 880px) {
  .nav, .header-phone { display: none; }
  .menu-toggle { display: flex; }
}

/* Hero (home) ------------------------------------------------------------ */

.hero { padding: 150px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 24px; max-width: 17ch; }
.hero .lead { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 28px; font-size: 0.95rem; color: var(--muted); }

.hero-visual { width: 100%; max-width: 380px; aspect-ratio: 1; justify-self: end; }
.hero-mark { width: 100%; height: 100%; overflow: visible; }
.hero-mark .mark-leaf { fill: var(--navy); }
.hero-mark .mark-line { fill: none; stroke: var(--bg); stroke-width: 18; }
.hero-mark .mark-ring { fill: var(--bg); }
.mark-dot { fill: var(--green); }

@media (max-width: 880px) {
  .hero { padding: 120px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* Platforms strip -------------------------------------------------------- */

.tech { padding: 22px 0; background: var(--surface); border-block: 1px solid var(--line); }
.tech .container { display: flex; align-items: center; gap: 32px; }
.tech-label { flex: none; font-size: 0.85rem; color: var(--muted); }
.marquee {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.marquee-group span { font-size: 1.02rem; font-weight: 500; color: #4d5866; white-space: nowrap; }

@media (max-width: 640px) {
  .tech .container { flex-direction: column; align-items: flex-start; gap: 12px; }
  .marquee { width: 100%; }
}

/* Sections --------------------------------------------------------------- */

.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-white { background: var(--surface); border-block: 1px solid var(--line); }
.pt-0 { padding-top: 0; }

.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { max-width: 18ch; }
.section-head p { max-width: 30rem; justify-self: end; color: var(--muted); }

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
}

/* Home: services index --------------------------------------------------- */

.svc-index { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; border-top: 1px solid var(--line); }
.svc-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.svc-item h3 { margin-bottom: 4px; transition: color 0.25s; }
.svc-item p { font-size: 0.95rem; color: var(--muted); }
.svc-item .arrow { flex: none; margin-top: 5px; color: var(--muted); transition: transform 0.35s var(--ease), color 0.25s; }
.svc-item:hover h3, .svc-item:hover .arrow { color: var(--navy); }
.svc-item:hover .arrow { transform: translateX(4px); }

@media (max-width: 800px) { .svc-index { grid-template-columns: 1fr; } }

/* Feature grids (plain text blocks) ------------------------------------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px; }
.feature { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); }

@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; gap: 32px; } }

/* Process ---------------------------------------------------------------- */

.process-steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 44px; }
.process-line { position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--line); overflow: hidden; }
.process-fill { position: absolute; inset: 0; background: var(--navy); transform: scaleX(0); transform-origin: left center; }

.step { position: relative; }
.step::before {
  content: ""; position: absolute; top: -44px; left: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.section-white .step::before { background: var(--surface); }
.step.is-active::before { background: var(--navy); border-color: var(--navy); }
.step-num { margin-bottom: 10px; font-size: 0.85rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.4s; }
.step.is-active .step-num { color: var(--navy); }
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.95rem; color: var(--muted); }

@media (max-width: 800px) {
  .process-steps { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .process-line { display: none; }
  .step { padding: 0 0 32px 26px; border-left: 2px solid var(--line); transition: border-color 0.4s; }
  .step:last-child { padding-bottom: 0; }
  .step.is-active { border-left-color: var(--navy); }
  .step::before { top: 0; left: -9px; }
}

/* CTA band --------------------------------------------------------------- */

.cta-band { padding: clamp(64px, 8vw, 96px) 0; background: var(--navy); color: rgba(255, 255, 255, 0.78); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { max-width: 34rem; }
.cta-band p a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); transition: border-color 0.25s; }
.cta-band p a:hover { border-color: #fff; }

/* Page hero (inner pages) ------------------------------------------------ */

.page-hero { padding: clamp(130px, 16vw, 168px) 0 clamp(56px, 7vw, 80px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 8px; margin-bottom: 22px; font-size: 0.88rem; color: var(--muted); }
.crumbs a:hover { color: var(--navy); }
.page-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 56px; align-items: end; }
.page-hero h1 { max-width: 15ch; }
.page-hero .lead { color: var(--muted); }

@media (max-width: 880px) { .page-hero-grid { grid-template-columns: 1fr; } }

/* About ------------------------------------------------------------------ */

.about-intro { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px 64px; }
.prose p { margin-bottom: 20px; }
.prose p:first-child { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--ink); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { padding: clamp(28px, 4vw, 44px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.panel h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.4; font-weight: 500; letter-spacing: -0.015em; }
.panel-navy { background: var(--navy); border-color: var(--navy); }
.panel-navy .label { color: rgba(255, 255, 255, 0.6); }
.panel-navy h3 { color: #fff; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 48px; }
.fact { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.fact p { color: var(--ink); }
.fact p + p { margin-top: 4px; }
.fact p.label { color: var(--muted); }
.fact a { overflow-wrap: anywhere; }
.fact a:hover { color: var(--navy); }

@media (max-width: 880px) { .about-intro, .facts { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .duo { grid-template-columns: 1fr; } }

/* Services page ---------------------------------------------------------- */

.svc-list { border-top: 0; }
.svc {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px 64px;
  padding: clamp(36px, 5vw, 52px) 0; border-bottom: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.svc h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); letter-spacing: -0.02em; }
.svc-body > p { margin-bottom: 22px; }
.svc-points { columns: 2; column-gap: 32px; font-size: 0.95rem; }
.svc-points li { position: relative; padding: 3px 0 3px 18px; break-inside: avoid; }
.svc-points li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 8px; height: 1px; background: var(--muted); }

@media (max-width: 880px) { .svc { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .svc-points { columns: 1; } }

/* Contact ---------------------------------------------------------------- */

.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 72px); align-items: start; }

.info-block { padding: 26px 0; border-bottom: 1px solid var(--line); }
.info-block:first-child { border-top: 1px solid var(--line); }
.info-person { margin-bottom: 12px; }
.info-person strong { display: block; font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.info-person span { font-size: 0.92rem; color: var(--muted); }
.info-links { display: grid; gap: 6px; }
.info-links a, .info-address {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 500; color: var(--ink);
  overflow-wrap: anywhere;
}
.info-links a { display: inline-flex; }
.info-links a svg, .info-address svg { color: var(--green); flex: none; }
.info-links a:hover { color: var(--navy); }
.info-address { align-items: flex-start; font-weight: 400; line-height: 1.55; }
.info-address svg { margin-top: 4px; }
.info-block .text-link { display: inline-block; margin-top: 12px; font-size: 0.92rem; }

.form { padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.form h2 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); margin-bottom: 6px; }
.form > p { color: var(--muted); margin-bottom: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 0.9rem; font-weight: 500; color: var(--ink); }
.field label span { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23687280' stroke-width='1.6' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aab1bc; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(31, 66, 112, 0.12);
}
.form .btn { margin-top: 4px; }
.form-status { margin-top: 14px; font-size: 0.92rem; font-weight: 500; color: var(--green); }
.form-status:empty { display: none; }

.map {
  height: clamp(300px, 38vw, 420px); margin-top: clamp(56px, 8vw, 80px);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface);
}
.map iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(0.85); transition: filter 0.6s var(--ease); }
.map:hover iframe { filter: grayscale(0); }

@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* Footer ----------------------------------------------------------------- */

.site-footer { padding: 64px 0 28px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 40px; }
.footer-brand p { max-width: 20rem; margin-top: 16px; font-size: 0.95rem; color: var(--muted); }
.footer-grid h4 { margin-bottom: 16px; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.footer-grid ul { display: grid; gap: 9px; font-size: 0.95rem; }
.footer-grid ul a { transition: color 0.25s; overflow-wrap: anywhere; }
.footer-grid ul a:hover { color: var(--navy); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--muted);
}

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* JS pre-animation states (removed by GSAP; skipped if GSAP fails) ------- */

.js .header-inner,
.js [data-hero],
.js [data-split],
.js [data-reveal],
.js .hero-visual { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
