/* ==========================================================================
   TNS Secure Insurance — Stylesheet
   ========================================================================== */

:root {
  /* Brand colors */
  --navy: #173E75;
  --navy-dark: #1B3D65;
  --blue: #2F5E92;
  --teal: #19B7B2;
  --teal-light: #35C8B7;
  --aqua: #A9E7E5;
  --white: #FFFFFF;
  --bg: #F7FAFC;

  --text-main: #1B2A3A;
  --text-muted: #5A6B7C;

  --gradient-brand: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(23,62,117,0.06) 0%, rgba(25,183,178,0.08) 100%);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 4px 16px rgba(23,62,117,0.08);
  --shadow-md: 0 12px 32px rgba(23,62,117,0.12);
  --shadow-lg: 0 24px 60px rgba(23,62,117,0.16);

  --container: 1200px;
  --header-h: 70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { 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; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
h1, h2, h3, h4 { font-weight: 700; margin: 0 0 .6em; line-height: 1.2; color: var(--navy); }
p { margin: 0 0 1em; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: .8rem 1.2rem; z-index: 10000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring { width: 60px; height: 60px; animation: spin 1s linear infinite; }
.loader-ring circle { fill: none; stroke: var(--teal); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 40; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.8rem; border-radius: 50px; font-weight: 600; font-size: .95rem;
  transition: transform .25s ease, box-shadow .25s ease; white-space: nowrap;
}
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; transform: translateY(-3px); }
.btn-light { background: #fff; color: var(--navy); box-shadow: var(--shadow-md); }
.btn-light:hover { transform: translateY(-3px); }
.btn-sm { padding: .65rem 1.4rem; font-size: .85rem; }
.btn-full { width: 100%; justify-content: center; }
.icon-inline { width: 18px; height: 18px; fill: currentColor; }

.btn::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.5);
  width: 10px; height: 10px; transform: scale(0); opacity: 0; pointer-events: none;
  left: var(--rx, 50%); top: var(--ry, 50%); translate: -50% -50%;
}
.btn.rippling::after { animation: ripple .6s ease-out; }
@keyframes ripple { to { transform: scale(30); opacity: 0; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h); display: flex; align-items: center;
  background: transparent; transition: background .35s ease, box-shadow .35s ease, height .35s ease;
}
.site-header.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); height: 72px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.logo { display: flex; align-items: center; gap:0; }
.logo-mark { width: 80px; height: 80px; }
.logo-mark svg { fill: url(#none); }
.logo-mark svg path { fill: var(--teal); }
.site-header.scrolled .logo-mark svg path { fill: var(--navy); }
.logo-text { font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.logo-text em { font-style: normal; color: var(--teal); }
.logo-text.light { color: #fff; }
.logo-text.light em { color: var(--teal-light); }

.main-nav ul { display: flex; gap: 2.1rem; }
.main-nav a {
  font-weight: 500; font-size: .95rem; color: var(--navy); position: relative; padding: .3rem 0;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--teal); transition: width .25s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1.1rem; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 26px; }
.hamburger span { display: block; height: 2px; width: 100%; background: var(--navy); transition: transform .3s ease, opacity .3s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + 3.5rem) 0 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.blob-1 { width: 480px; height: 480px; background: var(--teal); top: -160px; right: -140px; }
.blob-2 { width: 380px; height: 380px; background: var(--navy); bottom: -140px; left: -120px; opacity: .25; }
.hero-icons .dot { fill: var(--teal); opacity: .5; }

.hero-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 3rem; align-items: center; padding-bottom: 5rem;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600;
  color: var(--teal); margin-bottom: .8rem;
}
.hero-copy h1 { font-size: clamp(2.4rem, 4.2vw, 3.4rem); font-weight: 800; margin-bottom: .6em; }
.hero-sub { font-size: 1.1rem; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }

.trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.6rem; }
.trust-badges li { display: flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .92rem; color: var(--navy); }
.check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .7rem; flex-shrink: 0; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 420px; }
.shield-illustration { width: min(380px, 90%); }
.ring { fill: none; stroke: var(--teal); opacity: .18; }
.ring-2 { stroke: var(--navy); opacity: .12; }
.ring-group { transform-origin: 210px 220px; animation: rotateRing 26s linear infinite; }
@keyframes rotateRing { to { transform: rotate(360deg); } }
.shield-body { filter: drop-shadow(0 18px 30px rgba(23,62,117,.28)); }
.shield-check { stroke-dasharray: 160; stroke-dashoffset: 160; animation: drawCheck 1.4s ease forwards .6s; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.float-card {
  position: absolute; display: flex; align-items: center; gap: .55rem;
  background: rgba(255,255,255,.75); backdrop-filter: blur(10px);
  padding: .6rem 1rem; border-radius: 50px; box-shadow: var(--shadow-sm);
  font-weight: 600; font-size: .82rem; color: var(--navy);
  animation: floatY 5s ease-in-out infinite;
}
.fc-dot { width: 10px; height: 10px; border-radius: 50%; }
.fc-health { background: var(--teal); } .fc-motor { background: var(--navy); }
.fc-fire { background: #E08A3C; } .fc-property { background: var(--blue); }
.fc-1 { top: 6%; left: -4%; animation-delay: 0s; }
.fc-2 { top: 22%; right: -6%; animation-delay: 1.1s; }
.fc-3 { bottom: 20%; left: -8%; animation-delay: 2.2s; }
.fc-4 { bottom: 4%; right: -2%; animation-delay: 3.1s; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.wave-divider { display: block; width: 100%; height: 90px; fill: var(--white); }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; }
.section-head { max-width: 640px; margin: 0 auto 3.2rem; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-sub { font-size: 1.05rem; }

/* ---------- About ---------- */
.about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3.5rem; align-items: center; }
.about-image { position: relative; }
.founder-frame {
  width: 100%; max-width: 320px; margin: 0 auto; aspect-ratio: 1/1.05; border-radius: var(--radius-lg);
  background: var(--gradient-soft); display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; box-shadow: var(--shadow-md);
}
.founder-placeholder { width: 70%; }
.founder-placeholder circle, .founder-placeholder path { fill: var(--navy); opacity: .35; }
.founder-badge {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  background: #fff; padding: .8rem 1.4rem; border-radius: 50px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; text-align: center; white-space: nowrap;
}
.founder-badge strong { color: var(--navy); font-size: .95rem; }
.founder-badge span { font-size: .78rem; color: var(--text-muted); }

.about-copy .mission { color: var(--navy); }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 2.2rem; }
.counter-item { text-align: left; }
.counter, .counter-suffix { font-size: 2rem; font-weight: 800; color: var(--navy); }
.counter-item p { margin: .2rem 0 0; font-size: .85rem; color: var(--text-muted); }

/* ---------- Services ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.service-card {
  background: var(--white); border-radius: var(--radius-md); padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease;
  border: 1px solid rgba(23,62,117,.06);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem;
}
.service-icon svg { width: 28px; height: 28px; fill: #fff; }
.service-card h3 { font-size: 1.15rem; }
.best-for { font-size: .88rem; color: var(--text-main); }
.card-link { color: var(--teal); font-weight: 600; font-size: .9rem; }
.card-link:hover { text-decoration: underline; }

/* ---------- Why ---------- */
.why { background: var(--white); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.why-card {
  padding: 1.8rem; border-radius: var(--radius-md); background: var(--gradient-soft);
  transition: transform .3s ease;
}
.why-card:hover { transform: translateY(-6px); }
.check-anim {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; margin-bottom: .9rem;
}
.why-card h3 { font-size: 1.05rem; }
.why-card p { font-size: .9rem; margin: 0; }

/* ---------- Industries ---------- */
.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.industry-card {
  background: var(--white); border-radius: var(--radius-sm); padding: 1.6rem 1rem; text-align: center;
  font-weight: 600; color: var(--navy); box-shadow: var(--shadow-sm);
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.industry-card:hover { transform: translateY(-6px); background: var(--gradient-brand); color: #fff; }

/* ---------- Process ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; position: relative; }
.timeline::before {
  content: ''; position: absolute; top: 22px; left: 12%; right: 12%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--teal) 0 10px, transparent 10px 20px);
}
.timeline-step { position: relative; text-align: center; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--gradient-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 1rem;
  box-shadow: var(--shadow-sm); position: relative; z-index: 1;
}
.timeline-step h3 { font-size: 1.05rem; }
.timeline-step p { font-size: .88rem; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--white); }
.testimonial-carousel { display: flex; align-items: center; gap: 1.2rem; max-width: 760px; margin: 0 auto; }
.testimonial-track { overflow: hidden; position: relative; flex: 1; }
.testimonial-slide {
  display: none; text-align: center; background: var(--gradient-soft); border-radius: var(--radius-lg);
  padding: 2.6rem 2rem; animation: fadeIn .5s ease;
}
.testimonial-slide.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.quote-icon { font-size: 3rem; color: var(--teal); line-height: 1; font-weight: 700; }
.testimonial-slide p { font-size: 1.1rem; color: var(--navy); font-style: italic; max-width: 52ch; margin: 0 auto 1.2rem; }
.stars { color: #F5B301; margin-bottom: .6rem; letter-spacing: .2rem; }
.testimonial-slide cite { font-style: normal; font-weight: 600; color: var(--text-muted); font-size: .9rem; }
.carousel-arrow {
  width: 44px; height: 44px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm);
  font-size: 1.1rem; color: var(--navy); flex-shrink: 0; transition: background .25s ease, color .25s ease;
}
.carousel-arrow:hover { background: var(--gradient-brand); color: #fff; }
.carousel-dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.6rem; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; background: var(--aqua); }
.carousel-dots button.active { background: var(--teal); width: 22px; border-radius: 6px; }

/* ---------- FAQ ---------- */
.accordion { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.accordion-item { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.3rem 1.6rem; font-weight: 600; color: var(--navy); text-align: left; font-size: 1rem;
}
.accordion-icon { transition: transform .3s ease; color: var(--teal); font-size: 1.3rem; }
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .35s ease; padding: 0 1.6rem; }
.accordion-panel p { padding-bottom: 1.3rem; margin: 0; }

/* ---------- CTA Banner ---------- */
.cta-banner { background: var(--gradient-brand); padding: 4.5rem 0; }
.cta-inner { text-align: center; }
.cta-inner h2 { color: #fff; margin-bottom: 1.6rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; }
.contact-card {
  display: flex; align-items: center; gap: 1rem; background: var(--white); padding: 1.1rem 1.3rem;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 1rem;
}
.contact-icon { font-size: 1.4rem; }
.contact-card div { display: flex; flex-direction: column; }
.contact-card strong { color: var(--navy); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.contact-form {
  background: var(--white); padding: 2.2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.form-row { margin-bottom: 1.1rem; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: .4rem; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid #E1E8ED; border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color .25s ease, box-shadow .25s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(25,183,178,.15); outline: none;
}
.form-status { font-size: .9rem; margin-top: .8rem; color: var(--teal); font-weight: 600; min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #C9D6E3; padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand p { color: #9FB1C4; margin-top: .6rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col a:hover { color: var(--teal-light); }
.social-icons { display: flex; gap: .7rem; margin-top: 1rem; }
.social-icons a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; font-size: .78rem; text-transform: uppercase;
}
.social-icons a:hover { background: var(--teal); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.4rem 0; text-align: center; font-size: .85rem; color: #8CA0B5; }

/* ---------- Floating buttons ---------- */
.float-btn {
  position: fixed; right: 24px; width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
  z-index: 900; transition: transform .25s ease;
}
.float-btn svg { width: 26px; height: 26px; fill: #fff; }
.float-btn:hover { transform: scale(1.08); }
.whatsapp-btn { background: #25D366; bottom: 96px; }
.call-btn { background: var(--gradient-brand); bottom: 24px; }

.back-to-top {
  position: fixed; left: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s ease; z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; fill: var(--navy); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 3rem; }
  .hero-visual { order: -1; min-height: 320px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .card-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-grid { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .timeline::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: #fff;
    transform: translateX(100%); transition: transform .35s ease; padding: 2rem 1.5rem; overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 1.4rem; }
  .main-nav a { font-size: 1.1rem; }
  .hamburger { display: flex; }
  .header-actions .btn-sm { display: none; }
  .trust-badges { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 4rem 0; }
  .card-grid, .why-grid, .industry-grid, .timeline, .counters { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .float-card { font-size: .72rem; padding: .5rem .8rem; }
  .testimonial-carousel { gap: .6rem; }
  .carousel-arrow { width: 36px; height: 36px; font-size: .95rem; }
}
