:root {
  --ink: #102b3f;
  --muted: #5a7184;
  --primary: #1e6793;
  --primary-deep: #15506f;
  --sky: #87bfdf;
  --surface: #ffffff;
  --wash: #eef7fb;
  --line: rgba(30, 103, 147, 0.16);
  --accent: #d13f4b;
  --shadow: 0 18px 44px rgba(16, 43, 63, 0.12);
  --radius: 8px;
  --container: min(1160px, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", "IBM Plex Sans Arabic", sans-serif;
  color: var(--ink);
  background: #f7fbfd;
  line-height: 1.85;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 5.25rem 0;
}

.section-tint {
  background: var(--wash);
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  transition: opacity 180ms ease-out, visibility 180ms ease-out;
}

.site-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  color: var(--primary-deep);
  font-weight: 900;
}

.loader-mark img {
  width: 96px;
  aspect-ratio: 1;
  object-fit: contain;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(16, 43, 63, 0.08);
}

.nav-wrap {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-inline-end: auto;
}

.brand img {
  width: 62px;
  height: 58px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brand-text {
  display: grid;
  line-height: 1.28;
}

.brand-text strong {
  font-size: 1rem;
  font-weight: 900;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  position: relative;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 180ms ease-out;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.language-switch,
.nav-toggle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary-deep);
  cursor: pointer;
  font-weight: 900;
}

.language-switch {
  min-width: 50px;
  min-height: 42px;
  padding: 0.35rem 0.8rem;
}

.language-switch:hover {
  background: var(--primary);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
}

.nav-toggle span {
  display: block;
  width: 23px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-deep);
}

.hero-shell {
  position: relative;
  overflow: clip;
  background: #eef7fb;
}

.hero-shell::after {
  content: "TMCO";
  position: absolute;
  inset-inline-end: -1rem;
  bottom: -4.8rem;
  z-index: 0;
  color: rgba(30, 103, 147, 0.06);
  font-size: clamp(7rem, 18vw, 17rem);
  font-weight: 900;
  line-height: 1;
}

.hero {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 5.75rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow,
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--primary-deep);
  font-weight: 900;
  font-size: 0.95rem;
}

.eyebrow::before,
.section-tag::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.hero-copy h1 {
  margin: 0.9rem 0 1rem;
  max-width: 780px;
  font-size: clamp(2.65rem, 6vw, 5.4rem);
  line-height: 1.08;
  font-weight: 900;
  text-wrap: balance;
}

.hero-copy p,
.section-heading p,
.intro-panel p,
.quick-contact p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out, background 180ms ease-out;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(30, 103, 147, 0.22);
}

.btn-primary:hover {
  background: var(--primary-deep);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--primary-deep);
}

.hero-points {
  display: grid;
  gap: 0.65rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}

.hero-points li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: 50%;
}

.hero-identity {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 470px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-identity::before {
  content: "";
  position: absolute;
  inset: 1.2rem;
  border: 1px solid rgba(30, 103, 147, 0.12);
}

.hero-identity img {
  width: min(82%, 420px);
  object-fit: contain;
}

.hero-identity div {
  position: absolute;
  right: 1.4rem;
  bottom: 1.2rem;
  left: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.hero-identity strong {
  font-size: 1.5rem;
  color: var(--primary-deep);
}

.hero-identity span {
  color: var(--muted);
  font-weight: 800;
}

.intro-strip {
  padding-top: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  margin-top: -2rem;
}

.intro-panel,
.intro-metrics,
.card,
.values-band,
.service-card,
.product-card,
.partner-card,
.contact-card,
.contact-form,
.quick-contact-wrap {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-panel,
.card,
.values-band,
.service-card,
.product-card,
.partner-card,
.contact-form,
.quick-contact-wrap {
  padding: 1.65rem;
}

.intro-panel h2,
.section-heading h2,
.quick-contact h2 {
  margin: 0.55rem 0 0.85rem;
  font-size: clamp(1.85rem, 3.1vw, 3rem);
  line-height: 1.27;
  font-weight: 900;
  text-wrap: balance;
}

.intro-metrics {
  display: grid;
  gap: 0;
  padding: 0.4rem 1.25rem;
}

.intro-metrics article {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.intro-metrics article:last-child {
  border-bottom: 0;
}

.intro-metrics strong,
.contact-card h3,
.footer h3 {
  display: block;
  margin-bottom: 0.28rem;
}

.intro-metrics span,
.card p,
.service-card p,
.product-card p,
.partner-card p,
.contact-card p,
.footer p,
.footer li {
  color: var(--muted);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2.35rem;
}

.about-grid,
.service-grid,
.product-grid,
.partners-grid,
.contact-grid,
.footer-grid {
  display: grid;
  gap: 1.2rem;
}

.about-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card h3,
.service-card h3,
.product-card h3,
.partner-card h3,
.contact-form h3 {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  color: var(--primary-deep);
}

.card p,
.service-card p,
.product-card p,
.partner-card p {
  margin: 0;
}

.values-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.2rem;
  background: var(--primary-deep);
  color: #fff;
}

.values-band h3 {
  margin: 0;
  font-size: 1.35rem;
}

.values-band ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.values-band li {
  padding: 0.42rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.service-grid,
.product-grid {
  grid-template-columns: repeat(2, 1fr);
}

.service-card {
  position: relative;
  min-height: 210px;
}

.service-card span {
  display: inline-flex;
  margin-bottom: 1.3rem;
  color: var(--accent);
  font-weight: 900;
}

.product-card {
  border-top: 4px solid var(--sky);
}

.partners-grid {
  grid-template-columns: repeat(2, 1fr);
}

.partner-card strong {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--accent);
  font-size: 0.92rem;
}

.partner-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: 1.25rem;
  color: var(--primary);
  font-weight: 900;
}

.partner-link::after {
  content: "←";
  margin-inline-start: 0.35rem;
}

html[dir="ltr"] .partner-link::after {
  content: "→";
}

.quick-contact-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: #fff;
}

.quick-contact-wrap > div {
  max-width: 760px;
}

.contact-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1rem;
}

.contact-card {
  padding: 1.25rem 1.35rem;
}

.contact-card p {
  margin: 0.2rem 0;
}

.contact-card a,
.footer a {
  color: var(--primary);
  font-weight: 800;
}

.map-card iframe {
  width: 100%;
  min-height: 270px;
  margin-top: 0.7rem;
  border: 0;
  border-radius: var(--radius);
}

.contact-form {
  display: grid;
  gap: 0.62rem;
}

.contact-form label {
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: #f9fcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(135, 191, 223, 0.32);
  border-color: var(--primary);
}

.contact-form button {
  margin-top: 0.4rem;
}

.form-note {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  padding-top: 4rem;
  background: #0f2738;
  color: #fff;
}

.footer-grid {
  grid-template-columns: 1.1fr 0.75fr 0.9fr;
  padding-bottom: 2rem;
}

.footer p,
.footer li,
.footer a {
  color: rgba(255, 255, 255, 0.76);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-bottom {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
  margin: 0;
}

.whatsapp-float,
.to-top {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  z-index: 999;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.whatsapp-float {
  bottom: max(1rem, env(safe-area-inset-bottom));
  min-width: 118px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #15924c;
  color: #fff;
  font-weight: 900;
}

.to-top {
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 4.25rem);
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity 180ms ease-out, visibility 180ms ease-out, transform 180ms ease-out;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 420ms ease-out, transform 420ms ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

html[dir="ltr"] .brand,
html[dir="ltr"] .hero-copy,
html[dir="ltr"] .section-heading,
html[dir="ltr"] .intro-panel,
html[dir="ltr"] .intro-metrics,
html[dir="ltr"] .card,
html[dir="ltr"] .values-band,
html[dir="ltr"] .service-card,
html[dir="ltr"] .product-card,
html[dir="ltr"] .partner-card,
html[dir="ltr"] .contact-card,
html[dir="ltr"] .contact-form,
html[dir="ltr"] .quick-contact-wrap,
html[dir="ltr"] .footer {
  text-align: left;
}

html[dir="ltr"] .nav-links a::after {
  right: auto;
  left: 0;
}

html[dir="ltr"] .whatsapp-float,
html[dir="ltr"] .to-top {
  right: max(1rem, env(safe-area-inset-right));
  left: auto;
}

@media (max-width: 980px) {
  .hero-grid,
  .intro-grid,
  .about-grid,
  .service-grid,
  .product-grid,
  .partners-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-identity {
    min-height: 390px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .language-switch {
    margin-inline-start: auto;
  }

  .nav-links {
    position: fixed;
    top: 82px;
    right: 1rem;
    left: 1rem;
    display: grid;
    gap: 0.2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 180ms ease-out, visibility 180ms ease-out, transform 180ms ease-out;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.68rem 0.35rem;
  }

  .quick-contact-wrap,
  .values-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }

  .nav-wrap {
    min-height: 76px;
  }

  .brand img {
    width: 54px;
    height: 50px;
  }

  .brand-text small {
    display: none;
  }

  .hero-copy h1 {
    font-size: 2.45rem;
  }

  .hero-identity {
    min-height: 320px;
  }

  .hero-identity div {
    display: grid;
  }

  .intro-panel,
  .card,
  .values-band,
  .service-card,
  .product-card,
  .partner-card,
  .contact-form,
  .quick-contact-wrap {
    padding: 1.25rem;
  }

  .whatsapp-float {
    right: 1rem;
    left: 1rem;
  }

  .to-top {
    right: 1rem;
    left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
