/* ==========================================
   MATi — Molten Alloy Technology
   Main Stylesheet
   ========================================== */

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

:root {
  --navy:      #0A1628;
  --blue:      #0057FF;
  --teal:      #00C9B1;
  --white:     #FFFFFF;
  --gray:      #F4F6F9;
  --gray-mid:  #8A96A8;
  --gray-dark: #2C3A4F;
  --text-dark: #0D1F3C;
  --text-body: #3A4A5C;
  --font:      'Inter', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.18);
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px;
  --ease: .3s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--text-body); background: var(--white); line-height: 1.6; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Typography --- */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; color: var(--text-dark); }
h1 { font-size: clamp(2.2rem,5vw,3.8rem); }
h2 { font-size: clamp(1.6rem,3.5vw,2.6rem); }
h3 { font-size: clamp(1.15rem,2vw,1.7rem); }
h4 { font-size: 1.1rem; }

.text-white { color: #fff; }
.text-teal  { color: var(--teal); }
.text-blue  { color: var(--blue); }
.text-gradient {
  background: linear-gradient(135deg, #3D8BFF, var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--gray  { background: var(--gray); }
.section--navy  { background: var(--navy); }
.section__header { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section__label {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px;
}
.section__subtitle { font-size: 1.1rem; color: var(--text-body); margin-top: 14px; line-height: 1.7; }
.divider {
  width: 56px; height: 4px; background: linear-gradient(to right, var(--blue), var(--teal));
  border-radius: 2px; margin: 20px auto;
}

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .grid-4,.grid-3,.grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border-radius: var(--r-sm); font-size: .95rem; font-weight: 600;
  font-family: var(--font); border: none; cursor: pointer;
  transition: all var(--ease); white-space: nowrap; position: relative; overflow: hidden;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 4px 20px rgba(0,87,255,.35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,87,255,.45); }
.btn--teal { background: var(--teal); color: var(--navy); box-shadow: 0 4px 20px rgba(0,201,177,.35); }
.btn--teal:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,201,177,.45); }
.btn--outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.4); }
.btn--outline:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.btn--outline-dark { background: transparent; color: var(--text-dark); border: 2px solid rgba(0,0,0,.15); }
.btn--outline-dark:hover { border-color: var(--blue); color: var(--blue); }
.btn--lg { padding: 18px 36px; font-size: 1.05rem; }
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Cards --- */
.card {
  background: #fff; border-radius: var(--r-md); padding: 36px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.06);
  transition: all var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(0,87,255,.12); }
.card__icon {
  width: 52px; height: 52px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(0,87,255,.1), rgba(0,201,177,.1));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--blue);
}
.card__title { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; }
.card__text  { font-size: .92rem; color: var(--text-body); line-height: 1.7; }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px;
  border-radius: 100px; font-size: .75rem; font-weight: 600; letter-spacing: .04em;
}
.badge--teal   { background: rgba(0,201,177,.12); color: var(--teal); }
.badge--blue   { background: rgba(0,87,255,.12);  color: var(--blue); }
.badge--green  { background: rgba(34,197,94,.12);  color: #16a34a; }
.badge--orange { background: rgba(249,115,22,.12); color: #ea6c0a; }
.badge--gray   { background: rgba(100,116,139,.1);  color: #64748b; }
.badge--yellow { background: rgba(234,179,8,.12);  color: #ca8a04; }

/* --- Table --- */
.table-wrap { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.07); }
.metrics-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.metrics-table th {
  text-align: left; padding: 13px 18px;
  background: linear-gradient(135deg, var(--navy), var(--gray-dark));
  color: #fff; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
}
.metrics-table td { padding: 13px 18px; border-bottom: 1px solid rgba(0,0,0,.06); color: var(--text-body); }
.metrics-table td:last-child { font-weight: 600; color: var(--blue); }
.metrics-table tr:last-child td { border-bottom: none; }
.metrics-table tr:nth-child(even) td { background: rgba(244,246,249,.6); }
.metrics-table tr:hover td { background: rgba(0,87,255,.03); }

/* --- Process Formula --- */
.formula-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px 28px; border-radius: var(--r-md); margin-bottom: 32px;
  background: linear-gradient(135deg, var(--navy), var(--gray-dark));
}
.formula-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.formula-chem { font-size: 1.8rem; font-weight: 800; color: #fff; font-family: 'Courier New',monospace; }
.formula-label { font-size: .68rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; }
.formula-arrow,.formula-plus { font-size: 2rem; color: var(--teal); font-weight: 300; }

/* --- Navbar --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 24px; height: 72px; display: flex; align-items: center;
  transition: all var(--ease);
}
.navbar.scrolled {
  background: rgba(10,22,40,.96); backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.navbar__inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar__logo { display: flex; align-items: center; }
/* MATi logo — inverted to white for dark navbar */
.navbar__logo-img {
  width: auto;
  height: 44px;
  display: block;
  filter: invert(1) brightness(2);
  transition: opacity var(--ease);
}
.navbar__logo-img:hover { opacity: .85; }
.navbar__menu { display: flex; align-items: center; gap: 4px; }
.navbar__link { padding: 8px 13px; border-radius: 6px; font-size: .88rem; font-weight: 500; color: rgba(255,255,255,.75); transition: all var(--ease); }
.navbar__link:hover, .navbar__link.active { color: #fff; background: rgba(255,255,255,.08); }
.navbar__link.active { color: var(--teal); background: rgba(0,201,177,.08); }
.navbar__cta {
  margin-left: 10px; padding: 9px 20px; background: var(--blue); color: #fff;
  border-radius: 6px; font-size: .88rem; font-weight: 600; transition: all var(--ease);
}
.navbar__cta:hover { background: #0046d4; transform: translateY(-1px); }
.navbar__hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: none; }
.navbar__hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all var(--ease); }
.navbar__hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }
.navbar__mobile {
  display: none; position: fixed; top: 72px; left: 0; right: 0;
  background: rgba(10,22,40,.98); backdrop-filter: blur(20px);
  padding: 20px 24px; z-index: 999; flex-direction: column; gap: 4px;
  border-top: 1px solid rgba(255,255,255,.08);
  opacity: 0; pointer-events: none; transition: opacity var(--ease);
}
.navbar__mobile.open { display: flex; opacity: 1; pointer-events: all; }
.navbar__mobile .navbar__link { padding: 13px 16px; font-size: 1rem; }
.navbar__mobile .navbar__cta  { margin: 8px 0 0; text-align: center; padding: 13px 16px; font-size: 1rem; border-radius: 8px; display: block; }
@media (max-width: 860px) { .navbar__menu { display: none; } .navbar__hamburger { display: flex; } }

/* --- Hero --- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; background: var(--navy); padding-top: 72px;
}
.hero--page { min-height: 58vh; padding: 120px 0 80px; }
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__gradient {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0A1628 0%, #0A2060 40%, #003599 65%, #006B73 100%);
}
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,87,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,87,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift { 0% { transform: translate(0,0); } 100% { transform: translate(60px,60px); } }
.hero__glow1 {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,87,255,.2) 0%, transparent 70%);
  top: -100px; right: -100px; animation: floatG 6s ease-in-out infinite alternate;
}
.hero__glow2 {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,201,177,.15) 0%, transparent 70%);
  bottom: -50px; left: 10%; animation: floatG 8s ease-in-out infinite alternate-reverse;
}
@keyframes floatG { 0% { transform: scale(1) translate(0,0); } 100% { transform: scale(1.15) translate(30px,-20px); } }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.hero__label {
  display: inline-block; padding: 6px 14px; border: 1px solid rgba(0,201,177,.4);
  border-radius: 100px; font-size: .76rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 26px;
  background: rgba(0,201,177,.06);
}
.hero__title { color: #fff; max-width: 820px; margin-bottom: 22px; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.hero__title span { background: linear-gradient(135deg, #3D8BFF, var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero__sub { font-size: 1.15rem; color: rgba(255,255,255,.72); max-width: 600px; line-height: 1.7; margin-bottom: 36px; }

/* --- Stats Row --- */
.stats-row { display: flex; gap: 48px; margin: 40px 0; flex-wrap: wrap; }
.stat-item { position: relative; padding-left: 18px; }
.stat-item::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: linear-gradient(to bottom, var(--blue), var(--teal)); border-radius: 2px; }
.stat-item__val { font-size: 2.2rem; font-weight: 800; color: #fff; line-height: 1; margin-bottom: 5px; }
.stat-item__val span { color: var(--teal); }
.stat-item__lbl { font-size: .82rem; color: rgba(255,255,255,.5); font-weight: 500; }

/* --- Scroll Animations --- */
.fade-up { opacity: 0; transform: translateY(32px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-in { opacity: 0; transition: opacity .6s ease; }
.fade-in.visible { opacity: 1; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* --- Footer --- */
.footer { background: var(--navy); color: rgba(255,255,255,.6); padding: 72px 0 32px; border-top: 1px solid rgba(255,255,255,.06); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 60px; }
.footer__brand-name { font-size: 1.15rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.footer__brand-tag  { font-size: .78rem; color: var(--teal); font-weight: 500; margin-bottom: 14px; }
/* MATi new SVG logo in footer — inverted/brightened for dark bg */
.footer__logo-img {
  height: 44px;
  width: auto;
  display: block;
  filter: invert(1) brightness(2);
  margin-bottom: 14px;
}
.footer__brand-desc { font-size: .88rem; line-height: 1.7; color: rgba(255,255,255,.45); margin-bottom: 22px; }
.footer__social { display: flex; gap: 10px; }
.footer__soc-link {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.5);
  transition: all var(--ease);
}
.footer__soc-link:hover { border-color: var(--teal); color: var(--teal); background: rgba(0,201,177,.08); }
.footer__col-title { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 18px; }
.footer__links { display: flex; flex-direction: column; gap: 9px; }
.footer__link { font-size: .88rem; color: rgba(255,255,255,.45); transition: color var(--ease); }
.footer__link:hover { color: var(--teal); }
.footer__ci { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: rgba(255,255,255,.45); margin-bottom: 10px; line-height: 1.5; }
.footer__ci svg { flex-shrink: 0; color: var(--teal); margin-top: 1px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.07); padding-top: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: rgba(255,255,255,.3); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

/* --- Toast --- */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 15px 22px;
  border-radius: var(--r-sm); font-weight: 600; font-size: .9rem;
  z-index: 9999; box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0; transition: all .4s cubic-bezier(.175,.885,.32,1.275);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast--success { background: var(--teal); color: var(--navy); }
.toast--error   { background: #ef4444; color: #fff; }

/* --- Scroll Animations --- */
.fade-up, .fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in { transform: none; }
.fade-up.visible, .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.d1 { transition-delay: .12s; }
.d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; }
